portrait関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A pose from a tilt, a pitch, a phase and a spin: the body as a portrait, with the Sun a little above the left. The same arguments always give the same pose.
インポート
import { portrait } from "@johnmorrisdotca/wakusei-planets";
定義
function portrait(id: BodyId, options?: PortraitOptions): Pose
引数
| 名前 | 型 | 説明 |
|---|---|---|
id | BodyId | The body's name. |
options (省略可) | PortraitOptions | The pose's tilt, pitch, phase and spin. |
戻り値
Pose
The pose, as unit vectors in the viewer's frame.
例
import { portrait } from "@johnmorrisdotca/wakusei-planets";
const pose = portrait("mars", { phase: 90 });
console.log(pose.light[0] < -0.9);true出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。