You are browsing as a guest. Sign up (or log in) to start making projects!

4h 59m 50s logged

๐ŸŒŒ Project Overview

Stardance is an interactive, browser-based gravity simulator built using p5.js.

The goal is to simulate orbital mechanics, planetary mass interactions, and cosmic chaotic systems through a clean, modern dashboard interface.

๐Ÿ› ๏ธ Tech Stack

Frontend : HTML5, CSS3

Graphics/Simulation Engine : p5.js

Fonts : Orbitron & Inter

๐Ÿ“… Current Progress

Whatโ€™s Working:

Core UI Layout : Implemented a sleek, responsive sidebar control panel using frosted glass visual effects (backdrop-filter).

Dashboard Telemetry: Real-time tracking elements ready for planet count, total mass, simulation runtime, and FPS.

Simulation Controls:Fully configured range sliders for dynamic adjustments to Spawn Mass, Simulation Speed, and camera settings (Zoom and Rotation).

Preset Engine Architecture: Buttons configured to swap between pre-calculated gravity scenarios: Solar System, Binary Stars, Galaxy Spirals, Planetary Rings, Black Holes, and Chaos.

Data Persistence: Hooks added for exporting state to JSON/PNG and importing custom orbital systems.

Recent Changes:

Applied a deep-space galaxy background across the canvas space to contrast against the bright orbital trajectories.

Structured modular JavaScript engine architecture (planet.js , presets.js,physics.js, sketch.js) to decouple physics math from render routines.

๐Ÿ›‘ Current Challenges & Next Steps

  1. Orbital Physics : Fine-tuning the gravitational constant in physics.js so planets donโ€™t immediately sling out of bounds or collapse into the central mass on spawn.

  2. Performance Tuning: Optimizing the $O(N^2)$ particle-to-particle attraction loops when the Chaos preset spawns high planet counts.

  3. Tail rendering: Ensuring the p5.js canvas buffer correctly handles alpha-blended paths for smooth planetary trails.

๐Ÿ’ก Lessons Learned

When building canvas-heavy overlay interfaces, keeping a strict coordinate distinction between screen space (UI) and world space (simulation physics) is essential to keep zoom and pan gestures functioning correctly.

0
4

Comments 0

No comments yet. Be the first!