Sfoglia il codice sorgente

Smoothing the bouncing

Kirk Trombley 5 anni fa
parent
commit
03794e4ad6
1 ha cambiato i file con 4 aggiunte e 4 eliminazioni
  1. 4 4
      app.py

+ 4 - 4
app.py

@@ -144,8 +144,8 @@ def get_status_page():
         }
         </style>
         <script>
-            let vx = 5;
-            let vy = 3;
+            let vx = 3;
+            let vy = 2;
             const buffer = 5;
 
             const hitLR = (el, bounding) => {
@@ -169,13 +169,13 @@ def get_status_page():
                 el.style.top = el.offsetTop + vy + 'px';
                 setTimeout(function() {
                     mover(el, bounding);
-                }, 50);
+                }, 30);
             }
 
             setTimeout(() => mover(
                 document.getElementById("bouncer"),
                 document.getElementById("bounceBox")
-            ), 50);
+            ), 30);
         </script>
         <body>
             <div id="bounceBox">