本文へ移動

Chikyu Earth地球

世界の国の輪郭を線で描いた地球儀です。地球と同じ速さで回ります。宇宙から見たような地球と、好きな場所の目印も使えます。

「地球」(ちきゅう) は、私たちが住む星の名前です。 名前について(英語)

目次

リファレンス · リアルな地球の計算部分

gridTilesInView関数

リファレンスの説明と例は英語です。見出しと目次は日本語です。

The tiles of one level of a source's own grid that are in view. Only the columns and rows under the box are tested, so a fine matrix (hundreds of columns) is not walked. A tile that misses the Earth is left out.

インポート

import { gridTilesInView } from "@johnmorrisdotca/chikyu-earth/realistic";

定義

function gridTilesInView(level: MapGridLevel, extent: MapGrid["extent"], camera: TileCamera, sun?: readonly [number, number, number]): VisibleTile[]

引数

名前型説明
levelMapGridLevel

A level of the source's grid.

extent{ west: number; south: number; east: number; north: number; }

The Earth's extent, from the same grid.

cameraTileCamera

The camera.

sun (省略可)readonly [number, number, number] | undefined

The Sun's direction as the camera sees it, for each tile's ndl; left out, ndl is 1.

戻り値

VisibleTile[]

The tiles in view, the nearest to the middle of the box first.

例

import { gibsGrid } from "@johnmorrisdotca/chikyu-earth/door";
import { gridTilesInView } from "@johnmorrisdotca/chikyu-earth/realistic";

const grid = gibsGrid("250m");
console.log(gridTilesInView(grid.levels[6]!, grid.extent, { lon: 0, lat: 0, width: 800, height: 600, panX: 0, panY: 0, radius: 8000 }).length > 0);
true

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/chikyu-earth 0.51.1 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。