lookAt関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
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 { lookAt } from "@johnmorrisdotca/chikyu-earth/realistic";
定義
function lookAt(centre: GeoPoint, view: GlobeView): GeoPoint
引数
| 名前 | 型 | 説明 |
|---|---|---|
centre | GeoPoint | The home centre. |
view | GlobeView | The turn, tip, zoom and pan from the view controls. |
戻り値
GeoPoint
The place now in the middle of the disc.
例
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 }出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。