Files
blitzkit/src/app/tools/tankopedia/[id]/components/Lighting.tsx
T

26 lines
696 B
TypeScript
Raw Normal View History

2024-01-29 15:27:21 -06:00
import { Environment } from '@react-three/drei';
2024-01-22 15:42:49 -06:00
import { useModel } from '../../../../../hooks/useModel';
2024-01-22 18:04:13 -06:00
import { useDuel } from '../../../../../stores/duel';
2024-01-22 15:42:49 -06:00
2024-01-22 18:04:13 -06:00
export function Lighting() {
const protagonist = useDuel((state) => state.protagonist!);
const { hasPbr } = useModel(protagonist.tank.id);
2024-01-22 15:42:49 -06:00
2024-01-09 22:31:34 -06:00
return (
<>
2024-01-29 15:53:47 -06:00
<Environment preset="warehouse" />
2024-01-29 15:27:21 -06:00
{/* <directionalLight
2024-01-09 22:31:34 -06:00
position={[1, 1, -1]}
2024-01-22 15:42:49 -06:00
intensity={hasPbr ? 3 : 5}
2024-01-09 22:31:34 -06:00
castShadow
color={'rgb(225, 225, 255)'}
/>
<directionalLight
position={[-1, 1, 1]}
2024-01-22 15:42:49 -06:00
intensity={hasPbr ? 2 : 4}
2024-01-09 22:31:34 -06:00
castShadow
2024-01-16 14:20:43 -06:00
color={'rgb(240, 255, 240)'}
2024-01-29 15:27:21 -06:00
/> */}
2024-01-09 22:31:34 -06:00
</>
);
}