mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-25 03:29:51 +01:00
basic tankopedia layout
This commit is contained in:
1 parent
26bb350709
commit
699b445f79
14 files changed
+125
-301
No files matched your search
@@ -50,11 +50,11 @@ export function TankopediaLoadout({ characteristics }: TankopediaLoadoutProps) {
|
||||
);
|
||||
|
||||
return (
|
||||
<Section>
|
||||
<>
|
||||
{showModules && <Modules />}
|
||||
<Equipment />
|
||||
<Consumables characteristics={characteristics} />
|
||||
</Section>
|
||||
{/*<Consumables characteristics={characteristics} />*/}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
.sandbox {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
|
||||
.canvas {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
import { Canvas, useLoader } from "@react-three/fiber";
|
||||
import { OrbitControls } from "@react-three/drei";
|
||||
import styles from "./index.module.css";
|
||||
import { GLTFLoader } from "three-stdlib";
|
||||
|
||||
export function TankopediaSandbox() {
|
||||
return (
|
||||
<div className={styles.sandbox}>
|
||||
<Canvas shadows className={styles.canvas}>
|
||||
{!import.meta.env.SSR && <Content />}
|
||||
</Canvas>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function Content() {
|
||||
const gltf = useLoader(GLTFLoader, "/amogos.glb");
|
||||
|
||||
return (
|
||||
<>
|
||||
<group scale={4}>
|
||||
<primitive object={gltf.scene} />
|
||||
</group>
|
||||
|
||||
<ambientLight />
|
||||
<pointLight castShadow position={[3, 10, 5]} intensity={1000} />
|
||||
|
||||
<mesh receiveShadow position={[0, -1, 0]} rotation={[-Math.PI / 2, 0, 0]}>
|
||||
<planeGeometry args={[30, 30]} />
|
||||
<meshStandardMaterial color="green" />
|
||||
</mesh>
|
||||
|
||||
<OrbitControls />
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user