Reference · The Sun, Moon and planets: pure parts
RideInputtype
What ridePose is asked: the camera's place and its way of travel (any length), where it looks, and the shared controls' yaw, tilt and zoom.
Import it
import type { RideInput } from "@johnmorrisdotca/chikyu-earth/space";
Definition
interface RideInput {
position: Vec3;
velocity: Vec3;
look: RideLook;
yaw: number;
tilt: number;
zoom: number;
}
Members
| Name | Type | Description |
|---|---|---|
position | Vec3 | The camera's place in Earth radii from the Earth's centre, in the scene's axes. |
velocity | Vec3 | Its direction of travel, in any unit: only the direction is used. |
look | RideLook | |
yaw | number | 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. |
tilt | number | 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. |
zoom | number | 1 is the natural view; more narrows the field of view. |
Examples
import type { RideInput } from "@johnmorrisdotca/chikyu-earth/space";
const input: RideInput = { position: [1.066, 0, 0], velocity: [0, 0, -7.66], look: "down", yaw: 0, tilt: 0, zoom: 1 };
console.log(input.look);downWhat it prints (run when this page was built)