Closed edzis closed 8 years ago
There really isn't a good way to splice an already-built Object3D
into the React-generated scene graph. The best I can do is suggest two possible hacks:
THREE.Mesh
you can pull out the geometry
and material
and pass those into a <Mesh>
component.add
on a node to add your nodes as children. You would render something like <Object3D ref='splicepoint'>
and then reactinstance.refs['splicepoint']
would give you the THREE.Object3D
that was created. This is done in the tests to examine underlying threejs objects.
I need to load geometries dynamically (doing that using OBJLoader) and fail to understand how to get my resulting THREE.Group instances into the tree. Could you please share these insights?