Reference · The <wakusei-space> element: the Earth, Moon, Sun and planets in their places
SpaceStatetype
What the space view is doing: loading, live, unavailable (no WebGL), lost (the GPU took the context; it comes back by itself).
Import it
import type { SpaceState } from "@johnmorrisdotca/wakusei-planets/space/element";
Definition
type SpaceState = "loading" | "live" | "unavailable" | "lost";
Examples
import type { SpaceState, WakuseiSpace } from "@johnmorrisdotca/wakusei-planets/space/element";
const stateOf = (space: WakuseiSpace): SpaceState => space.stats.state;
console.log(typeof stateOf);