mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
tank model and collision
This commit is contained in:
1 parent
9968b2c83d
commit
9e4d9c7968
19 files changed
+278
-206
No files matched your search
@@ -1,10 +1,9 @@
|
||||
import { asset } from "@blitzkit/core";
|
||||
import { useLoader } from "@react-three/fiber";
|
||||
import { GLTFLoader } from "three-stdlib";
|
||||
import { useDispose } from "./useDispose";
|
||||
|
||||
export function useArmor(id: number) {
|
||||
const path = asset(`3d/tanks/armor/${id}.glb`);
|
||||
const path = `/api/tanks/${id}/collision.glb`;
|
||||
const gltf = useLoader(GLTFLoader, path);
|
||||
|
||||
useDispose(gltf, path);
|
||||
|
||||
Reference in new issue
Block a user