Gravit is a small browser-based 2D physics sandbox.
It lives under the utilities section of my site and is mostly a place to experiment with gravity, object spawning, terrain drawing, collisions, camera controls, and simple physics interactions.
Gravit is a client-side canvas app built with plain HTML, CSS, and JavaScript.
The app provides a simple 2D workspace where objects can be spawned, selected, dragged, launched, erased, and dropped into terrain. It has adjustable gravity, multiple boundary behaviors, shape tools, terrain tools, grid snapping, undo/redo, camera controls, and a small inspector for selected objects.
This is not meant to be a polished game engine. It is more of a browser-based physics toy and utility sandbox.
Implemented shape modules include:
Terrain is represented as static line segments.
Terrain modes:
Point terrain can be confirmed or cancelled from the topbar.
Grab modes include:
Holding Shift forces direct dragging.
The app includes a toggleable grid with configurable grid size.
Snap behavior can be enabled separately for:
The inspector shows spawned bodies and selected-body properties.
Editable properties:
Camera controls include:
The implementation details are documented separately:
Current state: usable prototype.
The core sandbox works, including object spawning, terrain, collisions, camera controls, local settings, configurable hotkeys, and undo/redo.