Reference · The <chikyu-space> element
RideOptionstype
How a ride along is done: view from (the default) puts the camera at the body looking at the Earth, follow keeps it a fixed distance from the body looking at it (distanceKm, 3000 by default,
for a satellite; a planet or the Moon is kept at the distance the zoom says); look down (the default) or horizon is where a camera at the body points; 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/chikyu-earth/space/element";
Definition
interface RideOptions {
view?: "from" | "follow";
look?: RideLook;
distanceKm?: number;
smooth?: boolean;
}
Members
| Name | Type | Description |
|---|---|---|
view (optional) | "from" | "follow" | undefined | |
look (optional) | RideLook | undefined | |
distanceKm (optional) | number | undefined | |
smooth (optional) | boolean | undefined |
Examples
import type { RideOptions } from "@johnmorrisdotca/chikyu-earth/space/element";
const options: RideOptions = { view: "from", look: "horizon" };
console.log(options.look);