fbx and obj loaders #677
Replies: 3 comments 5 replies
-
You can follow this example from the recipes: https://github.com/react-spring/react-three-fiber/blob/master/api.md#useloader-experimental But of course using your desired loader. If you want to contribute, it would be cool having some more ready to use loaders for drei ( useObjLoader, useFbxLoader ) |
Beta Was this translation helpful? Give feedback.
-
Ah, thanks. I didn't want to starting implementing my own code if it already existed. I'll take a look at that. As an asside, i found this to convert my fbx to gltf. https://github.com/facebookincubator/FBX2glTF |
Beta Was this translation helpful? Give feedback.
-
really there's nothing in here that would cause any difference, you can use anything in three as you always did. you just pack it into reacts designated peripherals: state, effects, memo const [scene, set] = useState()
useEffect(() => void new FBXLoader().load(url, set), [url])
return model ? <primitive object={scene} /> : null useLoader is just a convenience hook that wraps the above into suspense const scene = useLoader(FBXLoader, url)
return <primitive object={scene} /> pseudo code, i dont know if fbxloader returns a scene from memory but you get the point |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Looking for guidence on how to approach loading fbx/obj files. Dreis gltf loader works fine, but i can't find anything about using three's obj or fbx loader.
Not entirely sure how to go about leveraging threejs's existing loaders.
Beta Was this translation helpful? Give feedback.
All reactions