This commit is contained in:
tresabhi committed 2026-08-06 20:01:50 -05:00
1 parent 13cda7aec0
commit b26c5137f3
53 files changed
+236 -932

No files matched your search

+2 -1
View File
@@ -1,10 +1,11 @@
import { alias } from "@blitzkit/core";
import { useLoader } from "@react-three/fiber";
import { Mesh, MeshStandardMaterial } from "three";
import { GLTFLoader } from "three-stdlib";
import { useDispose } from "./useDispose";
export function useModel(id: number) {
const path = `/api/tanks/${id}/model.glb`;
const path = alias("api", `/tanks/${id}/model.glb`);
const gltf = useLoader(GLTFLoader, path);
useDispose(gltf, path);