import React, { Suspense } from 'react'
import { useGLTF } from '@react-three/drei'
const MagicRoom = () => {
// Importing model
const Model = () => {
const gltf = useGLTF('./libs/the_magic_room/scene.gltf', true)
return <primitive object={gltf.scene} dispose={null} scale={1} />
}
return (
<Suspense fallback={null}>
<Model />
</Suspense>
)
}
export default MagicRoom
我正在尝试使用primitive
在 react-fiber 中导入 gltf 模型,但它给出了上述错误