It builds on the simpler 2D implementation.
In fact, it was implemented mostly via:
- Refactor away direct knowledge of 2D nature of the system.
- Add 3D Support as via an alternate renderer and vector generator.
- Benefiting from the fact that p5.js Vector easily supports both 2D and 3D vectors.
Following the principle put forth by Kent Beck:
for each desired change, make the change easy (warning: this may be hard), then make the easy change
(No interactivity implemented yet).