From f1c50c2531859198ac33a9510e09c3d1bd1bcf14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Thu, 24 Oct 2024 15:37:14 -0500 Subject: [PATCH] fix: consistent lighting in static mode --- .../components/TankSandbox/components/Lighting.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 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 eb0024360..de8562d90 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 @@ -2,10 +2,14 @@ import { Environment } from '@react-three/drei'; import { useModel } from '../../../../../../hooks/useModel'; import { Duel } from '../../../../../../stores/duel'; import { TankopediaPersistent } from '../../../../../../stores/tankopediaPersistent'; +import { TankopediaDisplay } from '../../../../../../stores/tankopediaPersistent/constants'; export function Lighting() { const protagonist = Duel.use((state) => state.protagonist); + const display = TankopediaPersistent.use((state) => state.display); const { hasPbr } = useModel(protagonist.tank.id); + const isBrighterLighting = + hasPbr && display !== TankopediaDisplay.StaticArmor; const showEnvironment = TankopediaPersistent.use( (state) => state.showEnvironment, ); @@ -17,13 +21,13 @@ export function Lighting() {