Reference · The <wakusei-space> element: the Earth, Moon, Sun and planets in their places
RideOptionstype
How a ride along is done: view from (the default) puts the camera at the target looking at the body it goes round, follow keeps it a distance from the target looking at it (distanceKm,
3000 by default, for a point of your own; a body or a moon is kept at the distance the zoom says); look down (the default) or horizon is where a camera at the target points; around is the
body a point of your own goes round (the Earth by default); smooth (the default) glides from the old camera to the new one in about a second and a bit, and jumps instead for a reader who asked for reduced motion.
Import it
import type { RideOptions } from "@johnmorrisdotca/wakusei-planets/space/element";
Definition
interface RideOptions {
view?: "from" | "follow";
look?: RideLook;
distanceKm?: number;
around?: SpaceBody;
smooth?: boolean;
}
Members
| Name | Type | Description |
|---|---|---|
view (optional) | "from" | "follow" | undefined | |
look (optional) | RideLook | undefined | |
distanceKm (optional) | number | undefined | |
around (optional) | "sun" | "mercury" | "venus" | "earth" | "mars" | "jupiter" | "saturn" | "uranus" | "neptune" | "pluto" | "moon" | undefined | |
smooth (optional) | boolean | undefined |
Examples
import type { RideOptions } from "@johnmorrisdotca/wakusei-planets/space/element";
const options: RideOptions = { view: "from", look: "horizon", around: "mars" };
console.log(options.look);