mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 03:59:50 +02:00
feat: remove naked lighting
This commit is contained in:
1 parent
8863ac5fde
commit
70bd54e03b
2 files changed
+3
-9
No files matched your search
+2
-8
@@ -9,11 +9,7 @@ import { TankopediaDisplay } from '../../../../../../stores/tankopediaPersistent
|
|||||||
|
|
||||||
const LIGHTS_COUNT = 5;
|
const LIGHTS_COUNT = 5;
|
||||||
|
|
||||||
interface LightingProps {
|
export function Lighting() {
|
||||||
naked?: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function Lighting({ naked }: LightingProps) {
|
|
||||||
const protagonist = Duel.use((state) => state.protagonist);
|
const protagonist = Duel.use((state) => state.protagonist);
|
||||||
const display = TankopediaEphemeral.use((state) => state.display);
|
const display = TankopediaEphemeral.use((state) => state.display);
|
||||||
const { hasPbr } = useModel(protagonist.tank.id);
|
const { hasPbr } = useModel(protagonist.tank.id);
|
||||||
@@ -25,9 +21,7 @@ export function Lighting({ naked }: LightingProps) {
|
|||||||
<Environment
|
<Environment
|
||||||
files="https://dl.polyhaven.org/file/ph-assets/HDRIs/hdr/1k/winter_river_1k.hdr"
|
files="https://dl.polyhaven.org/file/ph-assets/HDRIs/hdr/1k/winter_river_1k.hdr"
|
||||||
environmentIntensity={isBrighterLighting ? 1.5 : 1}
|
environmentIntensity={isBrighterLighting ? 1.5 : 1}
|
||||||
environmentRotation={
|
environmentRotation={new Euler(0, degToRad(180), 0)}
|
||||||
new Euler(0, degToRad(180), naked ? degToRad(-45) : 0)
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
{display === TankopediaDisplay.ShootingRange && (
|
{display === TankopediaDisplay.ShootingRange && (
|
||||||
<>
|
<>
|
||||||
|
|||||||
+1
-1
@@ -200,7 +200,7 @@ export const TankSandbox = forwardRef<HTMLCanvasElement, TankSandboxProps>(
|
|||||||
{display === TankopediaDisplay.StaticArmor && (
|
{display === TankopediaDisplay.StaticArmor && (
|
||||||
<StaticArmor thicknessRange={thicknessRange} />
|
<StaticArmor thicknessRange={thicknessRange} />
|
||||||
)}
|
)}
|
||||||
<Lighting naked={naked} />
|
<Lighting />
|
||||||
</Suspense>
|
</Suspense>
|
||||||
</Canvas>
|
</Canvas>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in new issue
Block a user