Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I load an external model in react-three #104

Open
aiumasou opened this issue May 17, 2017 · 3 comments
Open

How do I load an external model in react-three #104

aiumasou opened this issue May 17, 2017 · 3 comments

Comments

@aiumasou
Copy link

I want to load external models such as obj/mtl , is there any way?In react-three ' module, there are object3D, mesh etc., how to use them to load file in obj format?

@Izzimach
Copy link
Owner

You still haave to load an OBJ file using threejs as show here, and then extract the geometry/material. Then pass that mesh/material into a <Mesh> node.

It's not ideal, but splicing threejs nodes into a react-three scene graph would just be a big mess IMHO.

@aiumasou
Copy link
Author

thanks,I did what you said . now the problem is that no mesh show in screen. The mesh's really loaded, but i can't see it. What could be the cause?

@Izzimach
Copy link
Owner

I'm not sure, take a look at this old example and see if you are loading models in a similar manner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants