blend関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A frame between two others, t from 0 to 1. The spin goes the short way round, so a step under half a turn is right.
インポート
import { blend } from "@johnmorrisdotca/chikyu-earth/space";
定義
function blend(a: Frame, b: Frame, t: number): Frame
引数
| 名前 | 型 | 説明 |
|---|---|---|
a | Frame | The earlier frame. |
b | Frame | The later frame. |
t | number | How far from |
戻り値
Frame
The frame at that fraction.
例
import { blend, frameAt } from "@johnmorrisdotca/chikyu-earth/space";
const start = Date.UTC(2026, 10, 2);
const middle = blend(frameAt(start), frameAt(start + 1000), 0.5);
console.log(middle.ms - start);500出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。