From 43a21265e77fe87b04b137938d61c51b955d4d90 Mon Sep 17 00:00:00 2001 From: Julie Winchester Date: Mon, 17 Feb 2025 13:29:53 -0600 Subject: [PATCH] Replace GLTF primitive with drei Clone to support multiple instances of same file in scene --- src/components/gltf.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/gltf.tsx b/src/components/gltf.tsx index 3631e77..b7f1ec8 100644 --- a/src/components/gltf.tsx +++ b/src/components/gltf.tsx @@ -1,5 +1,5 @@ import { useRef } from 'react'; -import { useGLTF } from '@react-three/drei'; +import { Clone, useGLTF } from '@react-three/drei'; // import { a } from '@react-spring/three'; import { Group } from 'three'; import { SrcObj } from '@/types/Src'; @@ -18,13 +18,12 @@ export const GLTF = ({ url, position = [0, 0, 0], rotation = [0, 0, 0], scale = }; }); const ref = useRef(null); - const modelRef = useRef(); return ( <> {/* @ts-ignore: https://github.com/pmndrs/react-spring/issues/1515 */} - + );