commit 2375d926c98c5343e35513701fcd11a4dc8140fc
parent b16b71b4fd2045f4941cf8026694ea748f199d60
Author: tongong <tongong@gmx.net>
Date: Sat, 31 Aug 2019 18:13:39 +0200
added slider functions
Diffstat:
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/scripts/interface.js b/scripts/interface.js
@@ -45,4 +45,16 @@ function initIconAnimation() {
ANGLE_FACTOR = this.value / 50 + 0.5;
ANGLE = SIZE * ANGLE_FACTOR;
}, false);
+ randomSlider.addEventListener('change', function() {
+ RANDOM_FACTOR = this.value / 100;
+ refreshTime = millis();
+ }, false);
+ sizeSlider.addEventListener('change', function() {
+ if (this.value >= MAX_STATE) {
+ MAX_STATE = this.value;
+ } else {
+ MAX_STATE = this.value;
+ refreshTime = millis();
+ }
+ }, false);
}
\ No newline at end of file
diff --git a/scripts/main.js b/scripts/main.js
@@ -58,7 +58,7 @@ function initVars() {
}
function draw() {
- background(80);
+ background(0);
if (refreshTime != 0) {
addHeight = (millis() - refreshTime) / 1000 * HEIGHT;
diff --git a/styles.css b/styles.css
@@ -44,6 +44,7 @@
background-color: #000000;
border-radius: 20px;
padding: 15px;
+ padding-top: 0;
-webkit-transition: right 500ms ease-in;
-moz-transition: right 500ms ease-in;
transition: right 500ms ease-in;