diff --git a/cube.js b/cube.js index 97843fd..498eeb2 100644 --- a/cube.js +++ b/cube.js @@ -111,7 +111,7 @@ const orientation = { { const mouse = { down: false, - lastMove: 0, + lastMove: -10_000, previous: null, }; @@ -207,6 +207,10 @@ const orientation = { velocity.z = 0; } + if (window.performance.now() - mouse.lastMove > 10_000) { + velocity = new Vec3(1, 1, -1); + } + const axis = new Vec3(velocity.x, velocity.y, velocity.z) .normalize() .scale(theta);