-
I am trying to spawn a model when I click. I am currently spawning a cube on click but I am trying to load an OBJ and MTL files that I have. I have come across a lot of GLTF ways of doing it but cannot find any way to get it to work with just the OBJ and MTL. Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
its the same. useLoader(OBJLoader, url). or if you want use three loaders raw as they come, there is no difference in r3f. |
Beta Was this translation helpful? Give feedback.
-
So I have tried a few things and cannot get it to work. I have tried: ` function OBJ({name, ...props}) { export default OBJ and also: function OBJ({name, ...props}) { export default OBJ` I get no errors except for the fact that it spits out warnings of unexpected line: From what I can see it spits out the entire index.html file per line. |
Beta Was this translation helpful? Give feedback.
its the same. useLoader(OBJLoader, url). or if you want use three loaders raw as they come, there is no difference in r3f.