Update interval for more arbitrarily defined smoothness
This commit is contained in:
parent
d1e25bc77f
commit
0689f1e6df
@ -107,8 +107,8 @@ window.onload = () => {
|
|||||||
let logo = {
|
let logo = {
|
||||||
x: Math.floor(randUpTo(window.innerWidth-dvdLogo.clientWidth)),
|
x: Math.floor(randUpTo(window.innerWidth-dvdLogo.clientWidth)),
|
||||||
y: Math.floor(randUpTo(window.innerHeight-dvdLogo.clientHeight)),
|
y: Math.floor(randUpTo(window.innerHeight-dvdLogo.clientHeight)),
|
||||||
dx: 2,
|
dx: 1.2,
|
||||||
dy: 2,
|
dy: 1.2,
|
||||||
width: dvdLogo.clientWidth,
|
width: dvdLogo.clientWidth,
|
||||||
height: dvdLogo.clientHeight,
|
height: dvdLogo.clientHeight,
|
||||||
onIntersection: makeListOfFutureCollisionsAndDraw,
|
onIntersection: makeListOfFutureCollisionsAndDraw,
|
||||||
@ -117,7 +117,7 @@ window.onload = () => {
|
|||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
updateLogo(logo, window.innerWidth-logo.width, window.innerHeight-logo.height);
|
updateLogo(logo, window.innerWidth-logo.width, window.innerHeight-logo.height);
|
||||||
drawLogo(logo, dvdLogo);
|
drawLogo(logo, dvdLogo);
|
||||||
}, 22);
|
}, 12);
|
||||||
|
|
||||||
drawNewPaths = () => makeListOfFutureCollisionsAndDraw(logo, window.innerWidth-logo.width, window.innerHeight-logo.height);
|
drawNewPaths = () => makeListOfFutureCollisionsAndDraw(logo, window.innerWidth-logo.width, window.innerHeight-logo.height);
|
||||||
drawNewPaths();
|
drawNewPaths();
|
||||||
|
Loading…
Reference in New Issue
Block a user