Load .drc file
#1911
Replies: 1 comment 2 replies
-
you can load it as you always would, nothing stops you from using THREE.DracoLoader as it is. useloader just wraps around that, to integrate it into suspense, but it doesn't do anything more than if you have trouble loading the file it's most likely a path issue. can't find the file and/or the wasm decoder. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi All
The past few days I have been working with R3F. Seems cool and easier for react based apps. The challenge I'm having right now is, I can't seem to load drc files. I have tried to use useLoader but to no avail, any help is apprciated.
Here is a sample code snippet I have used.
const { scene } = useLoader(DRACOLoader, '/51614191_scaled.drc', loader => { const dracoLoader = new DRACOLoader(); dracoLoader.setDecoderPath('/draco/'); dracoLoader.setDecoderConfig({ type: 'js' }); dracoLoader.preload(); }) as any;
Beta Was this translation helpful? Give feedback.
All reactions