This commit is contained in:
math-pixel
2026-04-28 16:54:00 +02:00
parent b523e98bea
commit e8f621d35f
16 changed files with 17457 additions and 2 deletions
+38 -2
View File
@@ -21,7 +21,28 @@ import {
TEST_SCENE_TRIGGER_SOUND_PATH,
} from "@/data/testSceneConfig";
import { useOctreeGraphNode } from "@/hooks/useOctreeGraphNode";
import type { OctreeReadyHandler } from "@/types/3d";
import type { OctreeReadyHandler } from "@/types/3d";;import { SimpleModel } from "@/components/3d";
import { useGLTF } from "@react-three/drei";
// Dans votre composant
// ---
import { AnimatedModel, useAnimatedModel } from "@/components/3d";
const MODEL_PATH = "/models/elec/model.gltf";
function AnimationTester(): React.JSX.Element {
const { scene } = useGLTF("/models/elec/model.gltf");
return (
<primitive
object={scene.clone()}
position={[0, 0, -5]}
scale={[1, 1, 1]}
/>
);
}
interface TestSceneProps {
onOctreeReady: OctreeReadyHandler;
@@ -84,7 +105,22 @@ export function TestScene({
/>
</mesh>
</TriggerObject>
</Physics>
<AnimatedModel
modelPath={MODEL_PATH}
defaultAnimation="Idle"
position={[0, 0, -5]}
>
<AnimationTester />
</AnimatedModel>
{/* <SimpleModel
modelPath="/models/electricenne/model.gltf"
position={[0, 1, -5]}
scale={1}
/> */}
</>
);
}
}