本文へ移動

Chikyu Earth地球

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

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

目次

リファレンス

リアルな地球の計算部分

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

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

エクスポート

名前種類概要
ATMOSPHERE_OUTER定数The glow reaches this many radii from the centre; the globe at 1x is drawn to fit inside it.
chooseTier関数The width to hold for a layer when the globe's disc has radius radiusPx device pixels: the smallest shipped width that gives TEXELS_PER_RADIUS_PIXEL texels per pixel, else the largest, never more than cap, never less than the smallest.
createGate関数A rate gate for the draw: asks that come faster than minMs apart become one, and the last ask is never lost, so a burst of changes costs one draw.
discRadius関数The disc's radius in CSS pixels in a box of width x height at zoom: it fits the glow in the box at 1x.
frameCap関数The frame rate cap for this device: maxFps (30 by default), lower on a small device.
Gate型A rate gate for the draw: what createGate returns.
julianDay関数Julian day number of a moment in milliseconds since the Unix epoch.
Layer型One of the pictures the realistic Earth and the space view draw with: day, night, clouds, water and moon.
LightMode型How the Earth is lit: sun (the true light, with the night side dark and the city lights on it), lit (always lit, as if by daylight from the camera's side, the day picture and no city lights: the night side is never a black frame) or boost (the true terminator, with the night side raised so the land and coasts read).
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.
MAX_TEXTURE定数The most pixels across a texture the package ever asks the GPU for.
subsolarPoint関数The point where the Sun is at the zenith at ms: latitude is the Sun's declination, longitude runs west at 15 degrees an hour.
TEXELS_PER_RADIUS_PIXEL定数Texels across the whole circumference wanted per device pixel of the globe's radius: 3 is a little under 2 pi, so a texel is a little larger than a pixel.
textureBytes関数Bytes of GPU memory a texture of this width costs, with its mipmaps, at 4 bytes a pixel (the most it can be).
textureCap関数The cap for this device: low-memory phones stop at 2048, and the GPU's own limit and the option are never passed.
ThreeParts型The parts of three.js the Earth and the space view use.
TIERS定数The widths each layer is shipped in (every picture is 2:1, so the height is half).
unitVector関数A point on the globe as a unit vector: +z is longitude 0 on the equator, +x east, +y north.

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

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