endless_marble_run.mov
This repository hosts the script and assets for the Endless Marble Run: a 3D simulation of modular blocks generating an infinite marble run, similar to CUBORO™ marble run system, using the p5js library.
The collision checking is implemented from scratch and limited to sphere interaction with points. It is possible to view the collision information by setting the debug
flag in the code to true
.
Note
In some rare cases the ball may get stuck or fall off the track, in these situations the simulation has to be restarted.
One limitation is that the cubes cannot be traversed more than once, which would add excessive complexity to the code.
Either view the animation on GitHub pages, edit the code in the p5js editor or clone the repository and run locally.
Click on the canvas to switch between following mode and first-person-view mode.
Double-click toggles the full-screen mode.
The assets were created using JSCAD. To view and edit them load the contents of assets/boxes.js
to the JSCAD editor.
This software licensed under MIT license.