polyhedra-viewer
polyhedra-viewer copied to clipboard
[Refactor] Switch to react-three-fiber
The app currently uses X3DOM which does what we want, but comes with some severe limitations:
- Has a fixed rotation system -- as far as I can tell, you can't "turn off" the ability to rotate the scene with the mouse, meaning we can't make scenes with, say, multiple polyhedra in a top-down view.
- Outdated, doesn't support builders and requires a custom webpack loader to run.
- Much smaller community than three.js
I've been meaning to switch to THREE.js for a while, and now that react-three-fiber exists it seems like the perfect opportunity!
The main issues for this are:
- Creating a version of
<PolyhedronGeometry>
allows polyhedra with more than three vertices per face. (when I tried it out a while back, I couldn't figure out how to get the lighting to not light each of the coplanar faces separately. - Finding a control system that mimics X3DOM's (TrackballControls should work!)
- replicating the current materials, colors, and options.
Moving to Three.js also means that we no longer need toxiclibsjs.