本文へ移動

Chikyu Earth地球

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

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

目次

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

TileCamera型

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

Where the camera is, as the realistic Earth draws it: the place in the middle of the disc, the box in CSS pixels, the pan, and the disc's radius in CSS pixels.

インポート

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

定義

interface TileCamera {
    lon: number;
    lat: number;
    width: number;
    height: number;
    panX: number;
    panY: number;
    radius: number;
    perspective?: TilePerspective;
}

メンバー

名前型説明
lonnumber
latnumber
widthnumber
heightnumber
panXnumber
panYnumber
radiusnumber
perspective (省略可)TilePerspective | undefined

A camera of the space view, which has a real place and a perspective, in place of the disc: when given, lon, lat, panX, panY are not read and radius is the disc's radius at the nearest ground.

例

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

const camera: TileCamera = { lon: 10, lat: 20, width: 800, height: 600, panX: 0, panY: 0, radius: 900 };
console.log(camera.radius);
900

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

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

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