SatelliteScreen型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Where a satellite is on the screen now: in CSS pixels from the view's top left (which may lie outside the box), whether it can be seen, which edge it lies beyond, whether it is behind the camera, whether the Earth hides it, and how high it is.
インポート
import type { SatelliteScreen } from "@johnmorrisdotca/chikyu-earth/space";
定義
interface SatelliteScreen {
x: number;
y: number;
visible: boolean;
heightKm: number;
edge: ScreenEdge | null;
behind: boolean;
occluded: boolean;
estimated: boolean;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
x | number | |
y | number | |
visible | boolean | Inside the box, in front of the camera and not hidden by the Earth. |
heightKm | number | Height above the mean Earth radius, in kilometres, at the moment drawn. |
edge | ScreenEdge | null | The edge the satellite lies beyond, or |
behind | boolean | The satellite is behind the camera. The picture would put it on the opposite side, so |
occluded | boolean | The Earth hides the satellite: the line from the camera meets the globe before the satellite. False at the limb, in front, and when the satellite is only behind the camera. |
estimated | boolean | Its place is an estimate ( |
例
import type { SatelliteScreen } from "@johnmorrisdotca/chikyu-earth/space";
const seen = (place: SatelliteScreen | null): boolean => place !== null && place.visible;
console.log(typeof seen);function出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。