From d2c919227a163c9901f1ed457e7c0a36e469bab8 Mon Sep 17 00:00:00 2001 From: RGBCube Date: Wed, 20 Dec 2023 07:28:49 +0300 Subject: [PATCH] Start spinning slowly and slowly speed up --- cube.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cube.js b/cube.js index 498eeb2..a76bab1 100644 --- a/cube.js +++ b/cube.js @@ -208,7 +208,8 @@ const orientation = { } if (window.performance.now() - mouse.lastMove > 10_000) { - velocity = new Vec3(1, 1, -1); + const impulse = new Vec3(1, 1, -1); + velocity = Vec3.sum(impulse.scale(effectiveDelta * 3), velocity); } const axis = new Vec3(velocity.x, velocity.y, velocity.z)