Reference · The <chikyu-earth-realistic> element
EarthStatetype
What the realistic Earth is doing: loading its pictures, live and drawing, unavailable (no WebGL), lost (the GPU took the context; it comes back by itself) or idle (another view has the page's one WebGL context; press or focus it to take it).
Import it
import type { EarthState } from "@johnmorrisdotca/chikyu-earth/realistic/element";
Definition
type EarthState = "loading" | "live" | "unavailable" | "lost" | "idle";
Examples
import type { ChikyuEarthRealistic, EarthState } from "@johnmorrisdotca/chikyu-earth/realistic/element";
const describe = (earth: ChikyuEarthRealistic): EarthState => earth.stats.state;
console.log(typeof describe);