---
title: "Mru 2049"
url: https://docs.mru.space/lab/2049/
description: "A browser flight simulator on real astronomical data: controls, URL switches, architecture and the Float64 floating-origin coordinate system."
---

[Docs](https://docs.mru.space/) / [Lab](https://docs.mru.space/lab/2049/) / Mru 2049

# Mru 2049

A browser flight simulator on real astronomical data. Fly anywhere in the solar system and out to the nearby stars. Its purpose is to show scale. There is no combat, economy or progression.

TypeScript three.js · WebGPU 109,389 stars no server

## Run it

```
npm install
npm run dev
npm run check   # types, tests and lint
```

The data files in `public/` are committed, so a fresh clone flies without building any assets.

## Controls

| Input | Effect |
| --- | --- |
| Mouse | Pitch and yaw, rate based |
| Space | Full throttle. The ship handles the arrival |
| W / S | Throttle, logarithmic, 1 m/s to 1000 light years per second |
| Shift | Hold for ten times the throttle rate |
| A / D | Roll |
| X | Full stop |
| O | Match orbit with the nearest body |
| F | Find an object by name |

## URL switches

- **?webgl**: Force the WebGL2 backend
- **?debug=sky**: The star pass alone, amplified 400×
- **?debug=scene**: The scene pass alone, with no sky
- **?debug=depth**: Linear depth
- **?debug=alpha**: The scene pass's alpha channel

## How it is put together

```
sim     Ship state, date, flight. All Float64. Never imports three.js
ephem   Body positions and orientations from astronomy-engine
scene   Meshes, materials, and the per-frame rebase
render  Renderer, post chain, auto-exposure, textures
stars   Star catalogue, point-source flux, the instanced star field
input   Keyboard, pointer and touch, into one control struct
ui      HUD and panels. Never renders inside the frame loop
tools   Build-time scripts. Their output is committed
```

## The coordinate system

-   **Float64 on the CPU.** All state is metres in the heliocentric J2000 mean equatorial frame. It never enters a shader.
-   **Floating origin.** The camera sits at exactly (0,0,0) and never moves.
-   **Reverse-Z depth**, behind a runtime toggle.
-   **Distant-body rescale.** Anything past 1e8 m is drawn at 1e8 m and scaled to keep its angular size.

Updated Sep 2026 · [Edit on GitHub](https://github.com/mruspace/docs/edit/main/src/pages/lab/2049.astro) · [Questions? Request information](https://mru.space/contact/)
