stills関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The numbered stills for reduced motion: the keel just laid, evenly spaced moments, and the finished ship.
インポート
import { stills } from "@johnmorrisdotca/uchusen-rockets";
定義
function stills(steps: readonly PlayStep[], count?: number): PlayFrame[]
引数
| 名前 | 型 | 説明 |
|---|---|---|
steps | readonly PlayStep[] | The ship's build order. |
count (省略可) | number | How many stills. Fewer than 2 becomes the start and the end. |
戻り値
PlayFrame[]
One frame per still, from the start to the end.
例
import { stills } from "@johnmorrisdotca/uchusen-rockets";
const frames = stills([{ slot: "drive", start: 0, days: 10 }], 3);
console.log(frames.length, frames[0].day, frames[2].day);3 0 10出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。