diff --git a/packages/website/src/components/Tankopedia/HeroSection/components/TankSandbox/components/Lighting.tsx b/packages/website/src/components/Tankopedia/HeroSection/components/TankSandbox/components/Lighting.tsx index 7e69f49c6..a5d6fa550 100644 --- a/packages/website/src/components/Tankopedia/HeroSection/components/TankSandbox/components/Lighting.tsx +++ b/packages/website/src/components/Tankopedia/HeroSection/components/TankSandbox/components/Lighting.tsx @@ -38,19 +38,19 @@ export function Lighting() { draft.revealed = true; }); - t0.current = clock.elapsedTime - REVEAL_ANIMATION_TIME; + t0.current = performance.now() / 1000 - REVEAL_ANIMATION_TIME; }, []); useFrame(({ invalidate }) => { if (transition.current) { transition.current = false; - t0.current = clock.elapsedTime; + t0.current = performance.now() / 1000; } const x = clamp( - (clock.elapsedTime - t0.current) / animationTime.current, + (performance.now() / 1000 - t0.current) / animationTime.current, 0, - 2 + 2, ); const t = (0.5 * Math.sin(Math.PI * (x + 0.5)) + 0.5) ** 2;