Frame型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Where everything is at one moment: positions in astronomical units from the Earth's centre, in scene axes (x to the vernal equinox, y north, z toward -y of the equator).
インポート
import type { Frame } from "@johnmorrisdotca/chikyu-earth/space";
定義
interface Frame {
ms: number;
sun: Vec3;
moon: Vec3;
planets: Record<PlanetName, Vec3>;
spin: number;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
ms | number | |
sun | Vec3 | |
moon | Vec3 | |
planets | Record<"Mercury" | "Venus" | "Mars" | "Jupiter" | "Saturn" | "Uranus" | "Neptune" | "Pluto", Vec3> | |
spin | number | Greenwich sidereal time, in degrees: how far the Earth has turned against the stars. |
例
import { frameAt, type Frame } from "@johnmorrisdotca/chikyu-earth/space";
const frame: Frame = frameAt(Date.UTC(2026, 10, 2, 12));
console.log(Object.keys(frame.planets).length, frame.spin.toFixed(0));8 222出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。