Reference · The <wakusei-space> element: the Earth, Moon, Sun and planets in their places
Ridingtype
What the camera is riding along with now: the target, the body it goes round, how (from or follow), where it looks, and the distance kept for a point.
Import it
import type { Riding } from "@johnmorrisdotca/wakusei-planets/space/element";
Definition
type Riding = RideState;
Members
| Name | Type | Description |
|---|---|---|
target | RideTarget | |
around | "sun" | "mercury" | "venus" | "earth" | "mars" | "jupiter" | "saturn" | "uranus" | "neptune" | "pluto" | "moon" | The body the target goes round: the Earth for a body of the view or a point (unless said), the planet for a moon. |
view | "from" | "follow" |
|
look | RideLook | |
distanceKm | number | For |
Examples
import type { Riding } from "@johnmorrisdotca/wakusei-planets/space/element";
const describe = (ride: Riding | null): string => (ride ? `${ride.view} ${typeof ride.target === "string" ? ride.target : "a point"}` : "not riding");
console.log(typeof describe);