Reference · Markers on the globe
Posetype
The view: the point of the Earth at the middle of the disc, the disc's radius and its centre, in CSS pixels.
Import it
import type { Pose } from "@johnmorrisdotca/chikyu-earth/markers";
Definition
interface Pose {
lon: number;
lat: number;
radius: number;
cx: number;
cy: number;
}
Members
| Name | Type | Description |
|---|---|---|
lon | number | |
lat | number | |
radius | number | |
cx | number | |
cy | number |
Examples
import { project, type Pose } from "@johnmorrisdotca/chikyu-earth/markers";
const pose: Pose = { lon: 10, lat: 20, radius: 100, cx: 150, cy: 150 };
console.log(project(10, 20, pose));{ x: 150, y: 150, z: 1 }What it prints (run when this page was built)