SpaceState型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
What the space view is doing: loading, live, unavailable (no WebGL), lost (the GPU took the context; it comes back by itself) or idle (another view has the page's one context).
インポート
import type { SpaceState } from "@johnmorrisdotca/chikyu-earth/space/element";
定義
type SpaceState = "loading" | "live" | "unavailable" | "lost" | "idle";
例
import type { ChikyuSpace, SpaceState } from "@johnmorrisdotca/chikyu-earth/space/element";
const stateOf = (space: ChikyuSpace): SpaceState => space.stats.state;
console.log(typeof stateOf);この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。