Skip to content

Type Alias: BodyConfig

ts
type BodyConfig = PlanetConfig | StarConfig;

Discriminated union of the two body shapes. Narrow on config.type === 'star' (or 'planetary') before reading type-specific fields.

The discriminant encodes every structural difference between the two branches at compile time — assigning a planet-only field on a star config (e.g. metallicBands next to type: 'star') is rejected by the type-checker, and vice-versa.

Distribué sous la licence indiquée dans le dépôt.