リファレンス · <wakusei-space> 要素 (地球・月・太陽・惑星をその位置に)
SpaceState型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
What the space view is doing: loading, live, unavailable (no WebGL), lost (the GPU took the context; it comes back by itself).
インポート
import type { SpaceState } from "@johnmorrisdotca/wakusei-planets/space/element";
定義
type SpaceState = "loading" | "live" | "unavailable" | "lost";
例
import type { SpaceState, WakuseiSpace } from "@johnmorrisdotca/wakusei-planets/space/element";
const stateOf = (space: WakuseiSpace): SpaceState => space.stats.state;
console.log(typeof stateOf);この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。