PortraitOptions型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Options for a pose when no date is given. Angles are in degrees: tilt leans the pole on the page, pitch is how far the viewer looks over the pole, phase is the Sun–body–viewer angle and spin the longitude at the middle of the disc.
インポート
import type { PortraitOptions } from "@johnmorrisdotca/wakusei-planets";
定義
interface PortraitOptions {
tilt?: number;
pitch?: number;
phase?: number;
spin?: number;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
tilt (省略可) | number | undefined | The axial tilt on the page: how far the north pole leans to the right of straight up. Default: the body's own tilt (turned to 120 or less). |
pitch (省略可) | number | undefined | How far the viewer looks over the north pole: 0 sees the equator edge-on, 90 looks straight down at the pole. Default 12, or 22 for a body with rings. |
phase (省略可) | number | undefined | The Sun–body–viewer angle: 0 is full, 90 half, 180 new. Default 38. |
spin (省略可) | number | undefined | The longitude at the middle of the disc, degrees east. Default: the longitude of the body's best-known side. |
例
import { portrait, type PortraitOptions } from "@johnmorrisdotca/wakusei-planets";
const options: PortraitOptions = { tilt: 20, pitch: 15, phase: 60 };
console.log(portrait("jupiter", options).light.length);3出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。