Reference · The <wakusei-body> element
WakuseiStatetype
What the element is doing: line (an SVG), loading (waiting for three.js or a picture), still (a picture of the 3D look, nothing running), live (drawing), lost (the GPU took the context; it comes back by itself) or unavailable (no WebGL: the line drawing is shown).
Import it
import type { WakuseiState } from "@johnmorrisdotca/wakusei-planets/element";
Definition
type WakuseiState = "line" | "loading" | "still" | "live" | "lost" | "unavailable";
Examples
import type { WakuseiState } from "@johnmorrisdotca/wakusei-planets/element";
const done = (state: WakuseiState): boolean => state === "live" || state === "line";
console.log(done("still"));