From 7443f75347ab3011d052971bdacfe7b6b9a75815 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Sun, 28 Sep 2025 13:12:16 -0500 Subject: [PATCH] fix: less aggressive light manager --- .../components/TankSandbox/components/Lighting.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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 a69311b48..b45e44376 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 @@ -5,7 +5,6 @@ import { useRef, useState } from "react"; import { Color, SpotLight, SpotLightHelper } from "three"; import { degToRad } from "three/src/math/MathUtils.js"; import { isHalloween } from "../../../../../../core/blitzkit/isHalloween"; -import { Tankopedia } from "../../../../../../stores/tankopedia"; import { HelpingSpotLight } from "../../../../../HelpingSpotLight"; const LIGHTS_COUNT = 5; @@ -19,7 +18,6 @@ const TARGET_FRAME_RATE = 30; export function Lighting() { const [cast, setCast] = useState(true); - const revealed = Tankopedia.use((state) => state.revealed); const topLight = useRef(null!); const frontLight = useRef(null!); @@ -31,7 +29,7 @@ export function Lighting() { const samples = useRef([]); useFrame(({ clock }) => { - if (!cast || !revealed) return; + if (!cast || clock.elapsedTime < TARGET_FRAME_RATE * N) return; const dt = clock.elapsedTime - last.current; last.current = clock.elapsedTime;