本文へ移動

Wakusei Planets惑星

太陽・惑星・衛星を、線画、陰影つきの絵、表面の地図で描きます。実際の大きさ・傾き・自転つきで、任意の日時の衛星の位置も分かります。

「惑星」(わくせい) は、太陽のまわりを回る大きな星のことです。 名前について(英語)

目次

リファレンス · データ・線画・位置

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

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/wakusei-planets 0.24.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。