本文へ移動

Wakusei Planets惑星

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

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

目次

リファレンス · 日付ごとの太陽・月・惑星の位置を、二つの縮尺で。カメラの計算つき

RideInput型

リファレンスの説明と例は英語です。見出しと目次は日本語です。

What ridePose is asked: the camera's place from the centre of the body it goes round and its way of travel (any length), that body's radius in the unit of the place, where it looks, and the shared controls' yaw, tilt and zoom.

インポート

import type { RideInput } from "@johnmorrisdotca/wakusei-planets/space";

定義

interface RideInput {
    position: Vec3;
    velocity: Vec3;
    radius: number;
    look: RideLook;
    yaw: number;
    tilt: number;
    zoom: number;
}

メンバー

名前型説明
positionVec3

The camera's place from the centre of the body it goes round, in any unit, in the scene's axes.

velocityVec3

Its direction of travel, in any unit: only the direction is used.

radiusnumber

The radius of the body it goes round, in the unit of position (1 when the place is in radii of that body).

lookRideLook
yawnumber

The shared controls' yaw in degrees (a drag across the view is 180): turns the camera to look along its picture's left, so the ground moves right. 0 has the way it is going at the top of the picture.

tiltnumber

The shared controls' tilt in degrees (a drag down the view is 60): tips the camera to look towards the bottom of its picture, so the ground moves up.

zoomnumber

1 is the natural view; more narrows the field of view.

例

import type { RideInput } from "@johnmorrisdotca/wakusei-planets/space";

const input: RideInput = { position: [1.066, 0, 0], velocity: [0, 0, -7.66], radius: 1, look: "down", yaw: 0, tilt: 0, zoom: 1 };
console.log(input.look);
down

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

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

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