This project is an interactive orbital simulation built with Three.js and TypeScript. It visualizes the Earth-Moon system and a controllable spacecraft, then combines that visualization with simplified but meaningful physics so users can explore orbital behavior in real time. Instead of being just a static 3D scene, it is a living model where gravity, velocity changes, and trajectory history are computed continuously and reflected immediately in the rendered world.
At a high level, the project has three central objects:
Around these objects, the project adds practical simulation features:
So this is not a pure astronomy viewer and not a pure game. It sits in the middle as an educational and exploratory simulation: visual enough to be intuitive, physical enough to be informative.
Orbital mechanics can feel abstract because most explanations are purely equation-first or animation-first. Equation-first approaches can hide intuition. Animation-first approaches can hide correctness. This project tries to bridge that gap by keeping the physics loop explicit while making every result visible in 3D.
The educational value comes from cause-and-effect:
By making these relationships immediate, the project helps users build mental models that are hard to develop from formulas alone.
The core goal is to create a real-time sandbox where a user can understand and experiment with orbital dynamics in the Earth-Moon neighborhood.
A good way to summarize the target experience is:
The project does not try to be a mission-grade propagator. The goal is conceptual clarity, interactivity, and robust behavior under user actions.
The simulation uses state vectors for moving bodies. Each state holds six values:
Every update cycle advances those states by integrating acceleration from gravity. Gravity is computed from Newtonian attraction using masses and distance. The Moon state is affected by Earth. The spacecraft state is affected by Earth and Moon.
The update loop effectively does this repeatedly:
This gives continuous motion and naturally produces orbits when initial conditions are chosen appropriately.
A key feature is that startup conditions are informed by astronomical context rather than arbitrary placeholders.
At initialization, solar and lunar observation data are sampled once for an observer location and time. From that:
This creates a useful hybrid model:
The benefit is immediate realism in starting geometry without sacrificing simulation continuity and control.
The project explicitly handles spatial orientation issues that commonly confuse users:
By exposing and adjusting these factors, the project helps users separate visual coordinate choices from physical behavior.
Earth axial tilt is implemented as a stable orientation offset on a parent transform, while Earth spin is applied to the Earth mesh itself. This separation is important because it preserves a clean tilt plus spin model.
Trajectory lines are one of the most useful learning aids in the simulation, and the project treats them as first-class behavior.
The trail system aims to be informative and stable:
This means the trail behaves more like an instrument than decoration. It answers practical questions:
The spacecraft controls are intentionally simple but physically interpretable:
This maps user input to real orbital ideas with minimal friction. A newcomer can press a button and see a meaningful consequence without reading a textbook first.
Renaming controls to action-meaning terms like boost and brake, or prograde burn and retrograde burn, improves this even more by aligning UI language with user mental models.
The simulation panel is critical because visuals alone can mislead. The panel reports:
Time rate is especially important in accelerated simulations. If each rendered frame advances large simulated intervals, users need explicit context. Showing a line like “1s = 3d” tells the truth about acceleration and helps users interpret apparent motion correctly.
This transforms the project from animation into measurement-backed simulation.
A real-time browser simulation has practical constraints, so the project uses several stability strategies:
These decisions keep frame time predictable and reduce runtime surprises. It also makes the project easier to tune for different machines.
The visual side serves comprehension first:
The project tries to avoid two extremes:
The current style aims for readable scientific visualization with game-like responsiveness.
It is useful to define what this project is not trying to do right now:
Those are valid future directions, but they are outside the present educational-interactive scope.
A practical learning flow for users can be:
This progression turns passive viewing into active understanding.
A successful version of this project is one where:
If users can predict outcomes before pressing controls, the project is doing its job.
Natural next steps, if desired, include:
These can be added incrementally while preserving current clarity.
This project is best described as a physically grounded, visually rich orbital learning sandbox. It combines astronomical startup context, Newtonian motion updates, interactive spacecraft maneuvers, bounded trajectory visualization, and live telemetry to help users connect intuition with mechanics.
The “what” is a real-time Earth-Moon-spacecraft simulator.
The “how” is state-vector propagation plus thoughtful rendering and control design.
The “goal” is understanding through interaction: seeing why orbital behavior changes, not just seeing that it changes.
That combination is what makes the project valuable.
commit 640d41a4d607ccef0fb0c95e58c8d672047714a0
Author: singh <zhang.xh.6@pg.com>
Date: Thu Apr 16 12:18:52 2026 +0800
zlv = 18
loading...