a229fb2721
Satellites, end to end: CelesTrak element sets behind the same TTL cache
the weather and the flights use, served as TLEs rather than as positions,
and propagated in the browser with SGP4.
Sending elements is the same trick `flights/plan.ts` plays and it has a
better excuse here — a TLE *is* the closed form, valid for days either
side of its epoch, so one cacheable fetch every six hours replaces a poll
and every viewer agrees about where everything is.
Two things are worth knowing about the shape of it:
- There is no region parameter. An aeroplane at 10,000 m is local and
a satellite at 550 km is above the horizon for a circle two thousand
kilometres across, so one catalogue serves both boards and the client
decides what is above its own horizon. Only the observer is per-city,
which is why `main.ts` shares the elements and rebuilds the catalogue.
- The layer draws on a dome, because it cannot draw anywhere else.
`world.metres(550_000)` is 21,000 scene units against a far plane at
3,000. Azimuth and elevation are real; the radius carries nothing.
Off by default: a clone that started pulling CelesTrak on `npm run dev`
would have volunteered somebody else's bandwidth for its onboarding.
Godmode gets the two dials that point at the sky rather than at the
light — fabricated traffic, which composes with a live ADS-B feed instead
of replacing it, and a switch for the satellite layer with a count beside
it. Both are god-only lies about the inputs, in the manner of the weather
override.
`satellite.js` is the second runtime dependency this package has taken.
Its entry point star-exports an Emscripten build that cannot be shaken
out, so `noWasmPropagator` in the Vite config cuts it: 308 kB of WASM
loader for a bulk propagator nothing calls, against 26 kB for the SGP4
that does the work.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
29 lines
699 B
JSON
29 lines
699 B
JSON
{
|
|
"name": "@lumbridge/tera",
|
|
"version": "0.1.0",
|
|
"description": "Tera — the map view of Lumbridge Simulate. Cities from above; with Spaces, offices you can walk into.",
|
|
"license": "Apache-2.0",
|
|
"type": "module",
|
|
"main": "src/index.ts",
|
|
"workspaces": [
|
|
"server"
|
|
],
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "tsc --noEmit && vite build",
|
|
"test": "node --test \"src/test/*.test.ts\"",
|
|
"typecheck": "tsc --noEmit",
|
|
"preview": "vite preview"
|
|
},
|
|
"dependencies": {
|
|
"satellite.js": "^7.1.0",
|
|
"three": "^0.182.0"
|
|
},
|
|
"devDependencies": {
|
|
"@types/three": "^0.182.0",
|
|
"playwright": "^1.62.1",
|
|
"typescript": "^5.7.2",
|
|
"vite": "^7.3.6"
|
|
}
|
|
}
|