mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 03:59:50 +02:00
feat: armors
This commit is contained in:
1 parent
652f36ba6c
commit
f5c00643e4
14 files changed
+2472
-3040
No files matched your search
@@ -27,14 +27,21 @@ export function Page({ id }: PageProps) {
|
||||
function Model({ id }: { id: string }) {
|
||||
const gltf = useLoader(GLTFLoader, asset(`/tanks/${id}/collision/hull.glb`));
|
||||
|
||||
console.log(gltf);
|
||||
|
||||
return jsxTree(gltf.scene, {
|
||||
mesh: () => ({
|
||||
mesh: (mesh) => ({
|
||||
material: new MeshBasicMaterial({
|
||||
color: `rgb(${randInt(0, 255)}, ${randInt(0, 255)}, ${randInt(
|
||||
0,
|
||||
255,
|
||||
)})`,
|
||||
}),
|
||||
onClick: (event) => {
|
||||
if (!(mesh.material instanceof MeshBasicMaterial)) return;
|
||||
event.stopPropagation();
|
||||
console.log(mesh.material.name)
|
||||
},
|
||||
}),
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user