aboveAxes関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The camera of the view above a satellite: where it stands from the satellite (a unit vector, to be multiplied by the height) and the way its picture's top points. With no turn and no tip the camera is straight above the satellite, looking straight down at it, the way the satellite is going at the top of
the picture. yaw turns the picture about the satellite (the top points the other way round the satellite); tilt tips the camera back (positive) or ahead of the satellite (negative), so it looks down at it from behind or in front.
インポート
import { aboveAxes } from "@johnmorrisdotca/chikyu-earth/space";
定義
function aboveAxes(position: Vec3, velocity: Vec3, yaw: number, tilt: number): { offset: Vec3; up: Vec3; }
引数
| 名前 | 型 | 説明 |
|---|---|---|
position | Vec3 | The satellite's place from the Earth's centre. |
velocity | Vec3 | Its velocity. |
yaw | number | The turn of the picture about the satellite, in radians. |
tilt | number | How far the camera is tipped back from straight above, in radians. |
戻り値
{ offset: Vec3; up: Vec3; }
The unit offset of the camera from the satellite, and the unit vector at the top of its picture.
例
import { aboveAxes } from "@johnmorrisdotca/chikyu-earth/space";
const view = aboveAxes([1.07, 0, 0], [0, 0, 1], 0, 0);
console.log(view.offset, view.up);[ 1, 0, 0 ] [ 0, 0, 1 ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。