CoolFace
Datasetpublic

Snapkitty/orbital-one

orbital-one Browser spacecraft simulator and headless flight-model SDK. Launch from the pad, fly a two-stage ascent to orbit — or import the sim engine directly into your own project. SnapKitty West / SNAPKITTYWEST — MIT License — 2026 What It Is A browser 3D spacecraft simulator built on Three.js + Vite, with a zero-dependency TypeScript SDK that exposes all 8 sim modules for headless use in Node, Deno, Bun, or any bundler. import { createState } from… See the full description on the dataset page: https://huggingface.co/datasets/Snapkitty/orbital-one.

sourceHugging Facemitupdated 15d agoView on Hugging Face
0likes77downloads
Dataset Card

orbital-one

Browser spacecraft simulator and headless flight-model SDK.

Launch from the pad, fly a two-stage ascent to orbit — or import the sim engine directly into your own project.

SnapKitty West / SNAPKITTYWEST — MIT License — 2026


What It Is

A browser 3D spacecraft simulator built on Three.js + Vite, with a zero-dependency TypeScript SDK that exposes all 8 sim modules for headless use in Node, Deno, Bun, or any bundler.

ts
import { createState } from './src/sim/state.js';
import { tick }        from './src/sim/physics.js';
import { telemetry }   from './src/sim/telemetry.js';

const s = createState();
for (let i = 0; i < 6000; i++) tick(s);  // 100 simulated seconds
console.log(telemetry(s).altitude);       // metres above surface

Repository

orbital-one/
├── src/
│   ├── sim/
│   │   ├── state.ts        Mission state (vehicle, fuel, orbit elements)
│   │   ├── physics.ts      Tick-based physics integrator
│   │   ├── guidance.ts     Ascent + orbital guidance laws
│   │   ├── navigation.ts   Inertial navigation system
│   │   ├── propulsion.ts   Engine model (thrust, Isp, staging)
│   │   ├── mission.ts      Mission sequencer (pre-launch → orbit → coast)
│   │   ├── telemetry.ts    Telemetry snapshot (altitude, velocity, apoapsis...)
│   │   └── math.ts         Orbital mechanics primitives (Kepler, RK4)
│   ├── render/world.ts     Three.js scene (planet, vehicle, trajectory trail)
│   ├── ui/
│   │   ├── cockpit.ts      Flight deck HUD
│   │   └── instruments.ts  Instrument panel (altitude tape, velocity, TWR)
│   ├── audio.ts            Engine audio (Web Audio API)
│   ├── input.ts            Keyboard + gamepad bindings
│   └── main.ts             App entry point
├── tests/
│   ├── flight.test.ts      Headless physics tests
│   ├── browser/flight.spec.ts  Playwright end-to-end
│   └── profile.ts          Performance profile harness
└── docs/verification.md    Simulation verification notes

Sim Modules — SDK Reference

ModuleExportDescription
statecreateState()Fresh mission state
physicstick(state)Advance simulation 1/60 s
guidanceguidanceUpdate(state)Pitch program + orbit insertion
navigationnavUpdate(state)Inertial position/velocity
propulsionpropulsionTick(state)Thrust, Isp, staging events
missionmissionSequencer(state)Phase transitions
telemetrytelemetry(state)Snapshot (altitude, velocity, apoapsis, etc.)
mathkeplerStep, rk4Orbital mechanics primitives

All modules are zero-dependency TypeScript. package.json exports map wires every entry point.


Quick Start

sh
npm ci && npm run dev        # browser app → http://127.0.0.1:5173
npm test                     # headless physics tests
npm run test:browser         # Playwright (requires Chrome)
npm run build                # → dist/ (static, serve over HTTP)

Requires Node.js 22.12+.


Stack

LayerTool
3D renderingThree.js r180
BundlerVite 7
LanguageTypeScript 5.9
TestsVitest + Playwright
LicenseMIT

Related Repos

RepoDescription
SNAPKITTYWEST/sovSovereign Package Switchboard
SNAPKITTYWEST/mantraDeterministic auditable language
GitHubSource + CI