Skip to content

Documentation / @interstellar-tools/types / GalaxyInterface

Interface: GalaxyInterface ​

Defined in: celestial-bodies/galaxies.ts:59

Represents a galaxy in the universe simulation.

Galaxy Properties:

  • Name (name): The galaxy's official designation.
  • Type (type): The morphological classification (e.g., Spiral, Elliptical).
  • Diameter (diameter): Measured in light-years.
  • Distance (distance): The distance from the Milky Way, also in light-years.
  • Black Hole (blackHole): The central supermassive black hole.

Example ​

ts
const milkyWay: GalaxyInterface = {
  id: 'milky-way',
  name: 'Milky Way',
  type: 'Spiral',
  diameter: { value: 105700, unit: 'lightyears' },
  distance: { value: 0, unit: 'lightyears' },
  blackHole: sagittariusA
};

Properties ​

blackHole ​

ts
blackHole: BlackHoleInterface;

Defined in: celestial-bodies/galaxies.ts:71

Central black hole of the galaxy.


diameter ​

ts
diameter: DistanceInterface;

Defined in: celestial-bodies/galaxies.ts:67

Diameter of the galaxy in light-years.


distance ​

ts
distance: DistanceInterface;

Defined in: celestial-bodies/galaxies.ts:69

Distance from the Milky Way in light-years.


id ​

ts
id: string;

Defined in: celestial-bodies/galaxies.ts:61

Stable identifier, used by parent references. Never translated.


name ​

ts
name: string;

Defined in: celestial-bodies/galaxies.ts:63

Name of the galaxy.


type ​

ts
type: string;

Defined in: celestial-bodies/galaxies.ts:65

Morphological classification of the galaxy.