4.3 KiB
4.3 KiB
@suaveplan/geo-planet - Configurable planet surface geometry from PlanetConfig — ellipsoid, atmosphere, satellites, and orbital elements.
Summary
Configurable planet surface geometry from PlanetConfig — ellipsoid, atmosphere, satellites, and orbital elements.
Documentation tree
- atmospheric — (no submodules)
- atmospheric — (no submodules)
- planet-surface — (no submodules)
- planet-surface — (no submodules)
- types — (no submodules)
- types — (no submodules)- atmospheric — (no submodules)- planet-surface — (no submodules)- planet-surface — (no submodules)- types — (no submodules)- schemas — The
schemasmodule exposes Zod runtime schemas mirroring every public type declared intypes.ts. Validation is the… - types — (no submodules)- atmospheric — (no submodules)- planet-surface — (no submodules)- planet-surface — (no submodules)- types — (no submodules)- schemas — The
schemasmodule exposes Zod runtime schemas mirroring every public type declared intypes.ts. Validation is the… - types — (no submodules)- atmospheric — (no submodules)- planet-surface — (no submodules) - planet-surface — (no submodules)- types — (no submodules) - schemas — The
schemasmodule exposes Zod runtime schemas mirroring every public type declared intypes.ts. Validation is the… - types — (no submodules)
Install
bun add @suaveplan/geo-planet
Quick start
import { PlanetSurface, PlanetConfigSchema } from "@suaveplan/geo-planet";
const config = PlanetConfigSchema.parse({
name: "Mars",
mass: 6.39e23,
radius: 3_396_200,
polarRadius: 3_376_200,
surfaceGravity: 3.72,
rotationPeriod: 88_620,
axialTilt: 25.2,
atmosphere: null,
satellites: [],
});
const surface = new PlanetSurface(config);
console.log(surface.distance(a, b, "kilometre"));