WakuseiState型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
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 type { WakuseiState } from "@johnmorrisdotca/wakusei-planets/element";
定義
type WakuseiState = "line" | "loading" | "still" | "live" | "lost" | "unavailable";
例
import type { WakuseiState } from "@johnmorrisdotca/wakusei-planets/element";
const done = (state: WakuseiState): boolean => state === "live" || state === "line";
console.log(done("still"));この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。