polyhedra-viewer icon indicating copy to clipboard operation
polyhedra-viewer copied to clipboard

[Refactor] Switch to react-three-fiber

Open tesseralis opened this issue 5 years ago • 0 comments

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:

  1. 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.
  2. Finding a control system that mimics X3DOM's (TrackballControls should work!)
  3. replicating the current materials, colors, and options.

Moving to Three.js also means that we no longer need toxiclibsjs.

tesseralis avatar Feb 22 '20 23:02 tesseralis