Reference · The realistic Earth's pure parts
lookAtfunction
Where the view is centred on the globe: the home centre, turned by yaw (west) and tipped by tilt (south), held to the poles; a drag right is yaw and a drag up is tilt, and the ground follows the pointer.
Import it
import { lookAt } from "@johnmorrisdotca/chikyu-earth/realistic";
Definition
function lookAt(centre: GeoPoint, view: GlobeView): GeoPoint
Parameters
| Name | Type | Description |
|---|---|---|
centre | GeoPoint | The home centre. |
view | GlobeView | The turn, tip, zoom and pan from the view controls. |
Returns
GeoPoint
The place now in the middle of the disc.
Examples
import { lookAt } from "@johnmorrisdotca/chikyu-earth/realistic";
console.log(lookAt({ lon: 10, lat: 80 }, { yaw: 25, tilt: 30, zoom: 1, panX: 0, panY: 0 }));{ lon: -15, lat: 50 }What it prints (run when this page was built)