From 8b726c12d9a36cbb1dfcade621eb0231015b846f Mon Sep 17 00:00:00 2001 From: tresabhi <43380238+tresabhi@users.noreply.github.com> Date: Wed, 16 Apr 2025 23:20:44 -0500 Subject: [PATCH] fix: invalidate frams on reveal --- .../components/TankSandbox/components/InitialFogReveal.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/website/src/components/Tankopedia/HeroSection/components/TankSandbox/components/InitialFogReveal.tsx b/packages/website/src/components/Tankopedia/HeroSection/components/TankSandbox/components/InitialFogReveal.tsx index fef37b28b..6c21567b6 100644 --- a/packages/website/src/components/Tankopedia/HeroSection/components/TankSandbox/components/InitialFogReveal.tsx +++ b/packages/website/src/components/Tankopedia/HeroSection/components/TankSandbox/components/InitialFogReveal.tsx @@ -1,4 +1,4 @@ -import { useThree } from '@react-three/fiber'; +import { invalidate, useThree } from '@react-three/fiber'; import { useEffect } from 'react'; import type { Fog } from 'three'; import { fogAnimationTime, fogFar0, fogFar1, forNear0, forNear1 } from '..'; @@ -25,6 +25,7 @@ export function InitialFogReveal() { fog.near = near; fog.far = far; + invalidate(); if (x >= 1) { fog.near = forNear0;