feat: custom shaders

This commit is contained in:
TrèsAbhi committed 2024-01-09 22:31:34 -06:00
1 parent a7d8f08522
commit 4a6b5e3aa9
9 files changed
+176 -46

No files matched your search

@@ -5,39 +5,23 @@ import { useTankopedia } from '../../../../../stores/tankopedia';
export function SceneProps() {
const showGrid = useTankopedia((state) => state.model.showGrid);
if (!showGrid) return null;
return (
<>
{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')}
/>
</>
)}
<directionalLight
position={[1, 1, -1]}
intensity={2}
castShadow
color={'rgb(225, 225, 255)'}
<InfiniteGridHelper
size1={1 / 5}
size2={1}
distance={20}
color={new Color('#ffffff')}
/>
<directionalLight
position={[-1, 1, 1]}
intensity={1}
castShadow
color={'rgb(225, 225, 255)'}
<InfiniteGridHelper
position={[0, 1e-4, 0]}
size1={0}
size2={100}
distance={25}
color={new Color('red')}
/>
<ambientLight intensity={0.25} />
</>
);
}