firtoz / react-three-renderer

Render into a three.js canvas using React.
https://toxicfork.github.com/react-three-renderer-example/
MIT License
1.49k stars 155 forks source link

Can't add more than one material to mesh component #185

Open imakatman opened 7 years ago

imakatman commented 7 years ago

I need to add multiple meshBasicMaterials into my mesh in order to render a boxGeometry with a different meshBasicMaterial for each segment. Like this example: https://threejs.org/examples/?q=panorama#canvas_geometry_panorama

Is this something that we should be able to do once you build the MeshFaceMaterial?

Thanks a lot, your react adaption of THREEjs is great! :)

ettubrutesbro commented 7 years ago

check out #67 - the maintainer posted a workaround. there's no meshfacematerial component yet, so you have to do things the 'three way' instead of the 'react way' (that's my rudimentary understanding). i just got a version of it working myself, i could post that code too if it's needed 👍