2024-03-03 17:42:53 -06:00
|
|
|
import { useLoader } from '@react-three/fiber';
|
|
|
|
|
import { TextureLoader } from 'three';
|
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-03-03 17:42:53 -06:00
|
|
|
const show = useTankopediaPersistent(
|
|
|
|
|
(state) =>
|
|
|
|
|
state.model.visual.showGrid && !state.model.visual.showEnvironment,
|
2024-02-01 12:28:56 -06:00
|
|
|
);
|
2024-03-03 17:42:53 -06:00
|
|
|
const texture = useLoader(TextureLoader, 'https://i.imgur.com/6QjSn1e.png');
|
2024-01-06 18:17:04 -06:00
|
|
|
|
2024-03-03 17:42:53 -06:00
|
|
|
if (!show) return null;
|
2024-01-09 22:31:34 -06:00
|
|
|
|
2024-01-03 13:07:45 -06:00
|
|
|
return (
|
2024-03-03 17:42:53 -06:00
|
|
|
<mesh rotation={[-Math.PI / 2, 0, 0]}>
|
|
|
|
|
<planeGeometry args={[10, 10]} />
|
|
|
|
|
<meshBasicMaterial map={texture} transparent />
|
|
|
|
|
</mesh>
|
2024-01-03 13:07:45 -06:00
|
|
|
);
|
|
|
|
|
}
|