Skip to content

SphereInput

github-actions[bot] edited this page Sep 21, 2026 · 1 revision

Interface: SphereInput

Imported from @elite-dangerous-almanac/galaxy-map.

What a host passes to addSpheres. The type states the contract and the reader holds it: every field is still checked at run time, because the data comes from a file or a network call the compiler does not see.

The index signature lets a record carry fields the reader drops.

Indexable

[field: string]: unknown

A field the reader drops.

Properties

categories?

readonly optional categories?: readonly string[]

The names of categories the table holds, in the order the sphere reads them. The first one that is on for shapes gives the colour, where the sphere carries none.


color?

readonly optional color?: readonly [number, number, number]

Red, green and blue, each from 0 to 255. A sphere that names a category may leave it out and take the colour of the first category it names that is on.


name?

readonly optional name?: string

What the shape stands for. The map draws no label for it.


opacity?

readonly optional opacity?: number

How deep the shell reads at its middle. The default is 0.18.


position

readonly position: readonly [number, number, number]

The centre in game coordinates, in light years.


primaryCategory?

readonly optional primaryCategory?: undefined

The two names categories replaces. Each one is never, so a shape that carries it fails the compile. The index signature below turns off TypeScript's excess-property check, so without the pair the old name would compile and the reader would drop it.


radius

readonly radius: number

The radius in light years. It is above 0.


secondaryCategories?

readonly optional secondaryCategories?: undefined

Clone this wiki locally