eh3rrera / earth-moon-vr

A simple app using React VR
MIT License
65 stars 23 forks source link

How can I add new models to the scene ? #1

Open Rebaiahmed opened 6 years ago

eh3rrera commented 6 years ago

Did you follow the tutorial at https://www.pluralsight.com/guides/front-end-javascript/getting-started-with-react-vr?

You need a model in obj format (they normally have an accompanied mtl file with the textures), put it in the static_assets directory and use the Model component:

<Model
  source={{
    obj: asset('sculpture.obj'),
    mtl: asset('sculpture.mtl'),
  }}
/>

Then, you can modify its style and apply transformations to move it or rotate it.

GPL420 commented 3 years ago

I WANT FULL EXPLANATION VIDEO OR DOCUMENT

GPL420 commented 3 years ago

YOUR TUTORIAL LINK IS NOT WORK SIR PLEASE HELP ME

eh3rrera commented 3 years ago

Hi @GPL420,

Thanks, I just updated the tutorial link: https://www.pluralsight.com/guides/getting-started-with-react-vr

However, React VR is not maintained anymore. The project was deprecated in favor of React 360 (https://github.com/facebookarchive/react-360), but to the best of my knowledge, this project is also abandoned now.

If you want to do something with WebVR, I recommend you take a look at A-Frame (https://aframe.io). I don't have tutorials about this framework but you can search for some and the official site has a good one: https://aframe.io/aframe-school/#/1.

I hope this helps!