My personal site cherry.computer
htmx tailwind axum askama

Prevent floating point imprecision in rotation

Clamp the rotation value to less than 2*pi so that it doesn't start
getting less precise (and eventually overflowing!) as the rotation is
increased during the session.

+1
+1
frontend/src/ts/logo.ts
··· 46 46 47 47 if (text) { 48 48 text.rotation.y += elapsed * 0.006; 49 + text.rotation.y %= 2 * Math.PI; 49 50 } 50 51 51 52 renderer.render(scene, camera);