Reference · The realistic Earth's pure parts
Gatetype
A rate gate for the draw: what createGate returns.
Import it
import type { Gate } from "@johnmorrisdotca/chikyu-earth/realistic";
Definition
interface Gate {
request(): void;
soon(): void;
cancel(): void;
setMinMs(minMs: number): void;
}
Members
| Name | Type | Description |
|---|---|---|
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). |
Examples
import { createGate, type Gate } from "@johnmorrisdotca/chikyu-earth/realistic";
const gate: Gate = createGate(33, () => console.log("draw"));
gate.request();
gate.cancel();drawWhat it prints (run when this page was built)