feat: armors

This commit is contained in:
tresabhi committed 2025-03-20 00:18:00 -05:00
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)
},
}),
});
}