From 0689f1e6df5995f4ef973993d7af71a3b1aaef8e Mon Sep 17 00:00:00 2001 From: Logan Hunt Date: Fri, 10 Jun 2022 00:35:51 -0700 Subject: [PATCH] Update interval for more arbitrarily defined smoothness --- dvd-logo/js/script.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dvd-logo/js/script.js b/dvd-logo/js/script.js index 870ec11..df85b61 100644 --- a/dvd-logo/js/script.js +++ b/dvd-logo/js/script.js @@ -107,8 +107,8 @@ window.onload = () => { let logo = { x: Math.floor(randUpTo(window.innerWidth-dvdLogo.clientWidth)), y: Math.floor(randUpTo(window.innerHeight-dvdLogo.clientHeight)), - dx: 2, - dy: 2, + dx: 1.2, + dy: 1.2, width: dvdLogo.clientWidth, height: dvdLogo.clientHeight, onIntersection: makeListOfFutureCollisionsAndDraw, @@ -117,7 +117,7 @@ window.onload = () => { setInterval(() => { updateLogo(logo, window.innerWidth-logo.width, window.innerHeight-logo.height); drawLogo(logo, dvdLogo); - }, 22); + }, 12); drawNewPaths = () => makeListOfFutureCollisionsAndDraw(logo, window.innerWidth-logo.width, window.innerHeight-logo.height); drawNewPaths();