Rotolo is a single-file browser-based physics toy where colorful balls bounce and collide inside a rotating hexagon. Built with pure HTML, CSS, and JavaScript, it runs in any modern browser with no external libraries.
Try it online or download the index.html file and open it in your browser.
Use the left panel to tweak settings, change themes, or try different overlay modes.
- Dynamic physics: Balls collide with each other and the hexagon walls with realistic momentum and restitution.
- Configurable simulation:
- Ball count up to 80
- Adjustable gravity (positive or negative)
- Air drag
- Bounciness
- Rotation speed
- Hexagon size
- Ball size range
- Themes: Neon, Aurora, Sunset, Mono, Ocean, Candy, Citrus, Ember
- Overlays:
- Off
- Numbers — show ball IDs
- Faces — simple faces that subtly aim in motion direction
- Velocity — arrows indicating speed and direction
- Responsive canvas: Automatically scales to the window size
- Randomizer: Instantly generates a new set of random parameters
- Keyboard controls:
- Space — Pause/Resume
- R — Reset
- L — Cycle overlay modes
- Download the latest release HTML file.
- Open it in Chrome, Edge, Firefox, or Safari.
- Adjust settings using the left panel.
- Interact:
- Left-click balls to push them
- Right-click inside the hexagon to spawn a new ball
Mobile browsers are not officially supported, though it may run on high-end devices.