2026-02-12 22:43:23 -06:00
2026-02-12 22:42:52 -06:00
2025-12-28 01:42:36 -06:00
2025-12-31 20:01:48 -06:00
2025-12-29 11:40:34 -06:00
2026-01-05 16:13:28 -06:00
2026-01-05 01:30:32 -06:00
2025-12-27 17:10:34 -06:00
2025-12-29 14:14:01 -06:00
2025-12-27 21:20:37 -06:00
2026-01-05 02:02:32 -06:00
2025-12-28 11:28:04 -06:00
2026-01-29 11:28:39 -06:00
2026-01-03 13:10:38 -06:00
2025-12-31 15:56:01 -06:00
2025-12-27 17:10:34 -06:00
2025-12-27 17:10:34 -06:00
2026-01-29 11:28:39 -06:00
2026-02-12 22:42:52 -06:00
2026-01-04 16:45:40 -06:00
2026-01-29 11:28:39 -06:00
2026-01-05 00:45:04 -06:00
2026-01-05 01:30:32 -06:00
2026-02-12 22:42:52 -06:00
2026-01-04 13:29:19 -06:00
2026-01-03 18:40:04 -06:00
2026-01-01 13:02:12 -06:00
2025-12-27 17:10:34 -06:00
2026-01-29 11:28:39 -06:00
2026-01-29 11:28:39 -06:00
2026-01-03 13:10:38 -06:00

Gravity Simulator

Runs in a browser. Just serve index.html and associated css and js.

Uses npm for eslint.

Screenshots

A binary pair orbiting a larger partner

A greater mass attracts others which had been on escape trajectories

A small object orbits a more massive binary pair

TODO

  • Selection Box
  • Feature: Object List
  • Feature: Object Detail
  • Feature: Zoom to Object
  • Feature: Teleport Object
  • Enhancement: Create Time class and refactor to use
  • Enhancement: Create Vector class and refactor to use
  • Enhancement: Create Panning class and refactor to use
  • Enhancement: Handle pointerleave or other mechanism when window loses focus
  • Enhancement: Calculate Work as FxD as measure of energy flux
  • Feature: Automatically slow time when energy flux is greater
  • Enhancement: Add z-axis (Initially nothing changes, z = 0)
  • Feature: Isometric 3d View
  • Feature: Grid
  • Feature: Polar Coordinates
  • Feature: Cylindrical Coordinates
  • Feature: Spherical Coordinates
  • Feature: Camera Velocity Display
  • Enhancement: World State Snapshots
  • Feature: List / Save / Load World States
  • Enhancement: Save / Load Snapshots from Local Storage
  • Feature: Import / Export / Share Snapshots
  • Feature: Left Button Panning
  • Feature: Middle Button Pause
  • Feature: Parameter Slider (Invisible, mouse/touch drag)
  • Enhancement: Zoom Easing
  • Feature: 2-touch Pan & Zoom Either continuous zoom, or discrete with animation of bounding box proposed changes
  • Feature: Multi-touch Mass Create
  • Feature: Camera Rotation
    • 2-touch Rotation
    • Spinning Frame
  • Feature: Undo
    • Undo "Clear Traces" Action
    • In general have a user action history
    • Point-in-time restoral of world state (Marked points, i.e. Snapshots)
  • Feature: Time Control: Reverse Time
  • Feature: Lossy Rescaling To Widen Zoom (Handling overflow/underflow)
  • Enhancement: Track farthest reaches, min/max in each dimension (x, y)
  • Fix: Unpause panning when initiated while sim is paused
  • Enhancement: Refactor to use viewOrigin as center of display canvas
  • Feature: Dark Matter
    • Enhancement: Clumps of dark matter to help gather stray objects in the universe
Description
Gravity Simulator Runs in browser Just serve html, css, js
https://laddhoffman.com/gravity/
Readme 1.9 MiB
Languages
JavaScript 95.4%
CSS 2.7%
Shell 1.4%
HTML 0.5%