facebookarchive / react-360

Create amazing 360 and VR content using React
https://facebook.github.io/react-360
Other
8.73k stars 1.23k forks source link

How customize React vr component #178

Closed light564 closed 7 years ago

light564 commented 7 years ago

How to make a React vr compoent. ex: Line. I don't know how to import RCTBaseMesh.

amberroy commented 7 years ago

We have a Plane component that could be used to simulate a line, if you make it very thin. :) To make a Line component you would follow the example of the Box and add code to both the runtime and the React side: https://github.com/facebook/react-vr/blob/master/ReactVR/js/Views/Plane.js https://github.com/facebook/react-vr/blob/master/Libraries/Mesh/Plane.js

Does this address your use case?

light564 commented 7 years ago

I should make a line.js in ReactVR and Libraries? But not in my project?

mikearmstrong001 commented 7 years ago

a single line is very low level, it seems you would need many for the component to be useful. Is this correct for your use case.

For our native React VR I implemented a model based on subset of a SVG path definition this seems a more useful component. Agreed ?

light564 commented 7 years ago

OK, i will use model to finish my project.(sorry for my poor english)