Gate型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A rate gate for the draw: what createGate returns.
インポート
import type { Gate } from "@johnmorrisdotca/chikyu-earth/realistic";
定義
interface Gate {
request(): void;
soon(): void;
cancel(): void;
setMinMs(minMs: number): void;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
request | (): void | Ask for |
soon | (): void | Like |
cancel | (): void | Forget a run that is waiting. |
setMinMs | (minMs: number): void | Change the least time between runs (a lower frame rate on a battery). |
例
import { createGate, type Gate } from "@johnmorrisdotca/chikyu-earth/realistic";
const gate: Gate = createGate(33, () => console.log("draw"));
gate.request();
gate.cancel();draw出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。