gravity/Readme.md
2026-01-05 00:45:04 -06:00

2.4 KiB

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