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

32 lines
796 B
TypeScript
Raw Normal View History

2024-01-03 13:07:45 -06:00
import { Color } from 'three';
import InfiniteGridHelper from '../../../../../components/InfiniteGridHelper';
2024-01-22 16:54:07 -06:00
import { useTankopediaPersistent } from '../../../../../stores/tankopedia';
2024-01-03 13:07:45 -06:00
export function SceneProps() {
2024-01-22 16:54:07 -06:00
const showGrid = useTankopediaPersistent(
2024-01-21 10:34:52 -06:00
(state) => state.model.visual.showGrid,
);
2024-02-01 12:28:56 -06:00
const showEnvironment = useTankopediaPersistent(
(state) => state.model.visual.showEnvironment,
);
2024-01-06 18:17:04 -06:00
2024-02-01 12:28:56 -06:00
if (!showGrid || showEnvironment) return null;
2024-01-09 22:31:34 -06:00
2024-01-03 13:07:45 -06:00
return (
<>
2024-01-09 22:31:34 -06:00
<InfiniteGridHelper
size1={1 / 5}
size2={1}
distance={20}
color={new Color('#ffffff')}
2024-01-05 15:22:00 -06:00
/>
2024-01-09 22:31:34 -06:00
<InfiniteGridHelper
position={[0, 1e-4, 0]}
size1={0}
size2={100}
distance={25}
color={new Color('red')}
2024-01-05 15:22:00 -06:00
/>
2024-01-03 13:07:45 -06:00
</>
);
}