リファレンス · 日付ごとの太陽・月・惑星の位置を、二つの縮尺で。カメラの計算つき
planetOrbit関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The path a planet takes round the Sun, as count + 1 points round one trip from where the planet is at ms, from the Sun, in astronomical units and the scene's axes.
インポート
import { planetOrbit } from "@johnmorrisdotca/wakusei-planets/space";
定義
function planetOrbit(id: SpacePlanet, ms: number, count?: number): Vec3[]
引数
| 名前 | 型 | 説明 |
|---|---|---|
id | "mercury" | "venus" | "mars" | "jupiter" | "saturn" | "uranus" | "neptune" | "pluto" | The planet. |
ms | number | The moment the path starts at, in milliseconds since the Unix epoch. |
count (省略可) | number | How many segments to cut the trip into. |
戻り値
Vec3[]
count + 1 points; the last is near the first.
例
import { planetOrbit } from "@johnmorrisdotca/wakusei-planets/space";
const points = planetOrbit("jupiter", Date.UTC(2026, 10, 2), 12);
console.log(points.length);13出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。