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

43 lines
1.0 KiB
TypeScript
Raw Normal View History

2024-01-03 13:07:45 -06:00
import { Color } from 'three';
import InfiniteGridHelper from '../../../../../components/InfiniteGridHelper';
2024-01-06 18:17:04 -06:00
import { useTankopedia } from '../../../../../stores/tankopedia';
2024-01-03 13:07:45 -06:00
export function SceneProps() {
2024-01-06 18:17:04 -06:00
const showGrid = useTankopedia((state) => state.model.showGrid);
2024-01-03 13:07:45 -06:00
return (
<>
2024-01-06 18:17:04 -06:00
{showGrid && (
<>
<InfiniteGridHelper
size1={1 / 5}
size2={1}
distance={20}
color={new Color('#ffffff')}
/>
<InfiniteGridHelper
position={[0, 1e-4, 0]}
size1={0}
size2={100}
distance={25}
color={new Color('red')}
/>
</>
)}
2024-01-03 13:07:45 -06:00
2024-01-05 15:22:00 -06:00
<directionalLight
position={[1, 1, -1]}
intensity={2}
castShadow
color={'rgb(225, 225, 255)'}
/>
<directionalLight
position={[-1, 1, 1]}
intensity={1}
castShadow
color={'rgb(225, 225, 255)'}
/>
2024-01-03 13:07:45 -06:00
<ambientLight intensity={0.25} />
</>
);
}