Reference · Markers on the globe
SurfacePointtype
A point of the Earth's surface as one picture shows it: where it falls (CSS pixels in the box), which way is straight up from the ground there on the screen (upX, upY: a direction whose
length is how much of an upright stick the reader sees, 0 looking straight down on it and 1 seeing it side on) and facing, the cosine between the ground's upright and the way to the camera
(above 0 the point faces the reader, at or below it is on the far side).
Import it
import type { SurfacePoint } from "@johnmorrisdotca/chikyu-earth/markers";
Definition
interface SurfacePoint {
x: number;
y: number;
upX: number;
upY: number;
facing: number;
}
Members
| Name | Type | Description |
|---|---|---|
x | number | |
y | number | |
upX | number | |
upY | number | |
facing | number |
Examples
import type { SurfacePoint } from "@johnmorrisdotca/chikyu-earth/markers";
const middle: SurfacePoint = { x: 210, y: 210, upX: 0, upY: 0, facing: 1 };
console.log(middle.facing);1What it prints (run when this page was built)