slideAt関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
How far a slide has paid out, in metres. Anything that is not a slide stays at 0.
インポート
import { slideAt } from "@johnmorrisdotca/uchusen-rockets";
定義
function slideAt(motion: Motion, seconds: number, speed?: MotionSpeed): number
引数
| 名前 | 型 | 説明 |
|---|---|---|
motion | Motion | What the group does. |
seconds | number | How long since the show began. |
speed (省略可) | MotionSpeed | 1 for real speed, 10 for ten times. |
戻り値
number
The distance in metres, from its stowed end to its open end, or 0 when it is not a slide.
例
import { slideAt, type Motion } from "@johnmorrisdotca/uchusen-rockets";
const mast: Motion = { ship: "fleet-kyotori", group: "mast", kind: "slide", travel: 12, period: 16, note: "The mast telescopes." };
console.log(slideAt(mast, 8));12出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。