mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: some icon only lighting
This commit is contained in:
1 parent
0f3d230f42
commit
8863ac5fde
3 files changed
+11
-5
No files matched your search
+2
-2
@@ -298,10 +298,10 @@ export function Controls({ naked }: ControlsProps) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
camera.position.set(...inspectModeInitialPosition);
|
camera.position.set(...inspectModeInitialPosition);
|
||||||
orbitControls.current.target.set(0, gunHeight / 2, 0);
|
orbitControls.current.target.set(0, gunHeight / (naked ? 4 : 2), 0);
|
||||||
orbitControls.current.enablePan = true;
|
orbitControls.current.enablePan = true;
|
||||||
orbitControls.current.enableZoom = true;
|
orbitControls.current.enableZoom = true;
|
||||||
camera.fov = 25;
|
camera.fov = naked ? 20 : 25;
|
||||||
}
|
}
|
||||||
|
|
||||||
camera.updateProjectionMatrix();
|
camera.updateProjectionMatrix();
|
||||||
|
|||||||
+8
-2
@@ -9,7 +9,11 @@ import { TankopediaDisplay } from '../../../../../../stores/tankopediaPersistent
|
|||||||
|
|
||||||
const LIGHTS_COUNT = 5;
|
const LIGHTS_COUNT = 5;
|
||||||
|
|
||||||
export function Lighting() {
|
interface LightingProps {
|
||||||
|
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);
|
||||||
@@ -21,7 +25,9 @@ export function Lighting() {
|
|||||||
<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={new Euler(0, degToRad(180), 0)}
|
environmentRotation={
|
||||||
|
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 />
|
<Lighting naked={naked} />
|
||||||
</Suspense>
|
</Suspense>
|
||||||
</Canvas>
|
</Canvas>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in new issue
Block a user