feat add model loading diagnostics

This commit is contained in:
Tom Boullay
2026-05-02 00:14:47 +02:00
parent 4d7d2efdcc
commit 1d64582383
13 changed files with 218 additions and 29 deletions
+7 -2
View File
@@ -1,5 +1,5 @@
import { useMemo } from "react";
import { useGLTF } from "@react-three/drei";
import { useLoggedGLTF } from "@/hooks/three/useLoggedGLTF";
import type { Vector3Tuple } from "@/types/three/three";
export interface SimpleModelConfig {
@@ -24,7 +24,12 @@ export function SimpleModel({
receiveShadow = true,
children,
}: SimpleModelProps): React.JSX.Element {
const { scene } = useGLTF(modelPath);
const { scene } = useLoggedGLTF(modelPath, {
scope: "SimpleModel",
position,
rotation,
scale,
});
const model = useMemo(() => scene.clone(true), [scene]);
const parsedScale =