Closed Izzimach closed 9 years ago
Any progress on this? Is there a way I can help?
What about implementing a Canvas component in ReactTHREE/ReactPIXI that uses DOM canvas in default implementation but users can create and pass in their own implementations for other platforms?
You'll have to create an abstraction over react-three, react-pixi, and whatever the react-opengl suggestion uses (needs a specific example of an OpenGL scene graph/rendering library).
For native OpenGL version a completely new version of threejs would be needed which maintains and renders the scene graph in native data structures. This should probably wait until React 0.14. The initial version will probably run on desktop first (via Qt or FLTK) since I haven't worked much on iOS or Android.
The initial upgrade to use 0.14 is at b8f8ce1faee5eca52066e345f58a63827f924a9c which works with React 0.14.0-rc1
with minimal changes. Hopefully this means an easy transition when 0.14 comes out for real.
Version 0.7.0
using React 0.14
is up and published. Tested it with r3test but there may be broken bits.
In addition to just updating the code to work with 0.14, some changes to consider:
<canvas>
element and place theScene
under it. This removes most dependence on the DOM although getting mouse events will have to be handled/abstracted away. Removing all DOM reference makes it easier to do item 3, which is: