File size: 4,244 Bytes
266ecb1
 
 
1be09c7
 
 
266ecb1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1be09c7
266ecb1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1be09c7
266ecb1
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
---
language:
- en
license: other
license_name: sovereign-leviathan-sl-agpl3-001
license_link: https://huggingface.co/datasets/SNAPKITTYWEST/orbital-one/blob/main/LICENSE
tags:
- typescript
- simulation
- spacecraft
- physics
- three-js
- browser
- sdk
- zero-dependencies
- sovereign
- snapkitty
- flight-model
- telemetry
- guidance
task_categories:
- other
size_categories:
- n<1K
pretty_name: orbital-one — Browser Spacecraft Simulator + SDK
---

# 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 — Sovereign Leviathan covenant (SL-AGPL3-001) — 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

| Module | Export | Description |
|---|---|---|
| state | `createState()` | Fresh mission state |
| physics | `tick(state)` | Advance simulation 1/60 s |
| guidance | `guidanceUpdate(state)` | Pitch program + orbit insertion |
| navigation | `navUpdate(state)` | Inertial position/velocity |
| propulsion | `propulsionTick(state)` | Thrust, Isp, staging events |
| mission | `missionSequencer(state)` | Phase transitions |
| telemetry | `telemetry(state)` | Snapshot (altitude, velocity, apoapsis, etc.) |
| math | `keplerStep`, `rk4` | Orbital 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

| Layer | Tool |
|---|---|
| 3D rendering | Three.js r180 |
| Bundler | Vite 7 |
| Language | TypeScript 5.9 |
| Tests | Vitest + Playwright |
| License | Sovereign Leviathan covenant (SL-AGPL3-001) |

---

## Related Repos

| Repo | Description |
|---|---|
| [SNAPKITTYWEST/sov](https://huggingface.co/datasets/SNAPKITTYWEST/sov) | Sovereign Package Switchboard |
| [SNAPKITTYWEST/mantra](https://huggingface.co/datasets/SNAPKITTYWEST/mantra) | Deterministic auditable language |
| [GitHub](https://github.com/SNAPKITTYWEST/orbital-one) | Source + CI |