Feature型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A thing a line drawing shows on a body's surface, placed by longitude and latitude in degrees (angular sizes in degrees): a circle, an oval, a band of latitude or a line.
インポート
import type { Feature } from "@johnmorrisdotca/wakusei-planets";
定義
type Feature = {
kind: "circle";
lon: number;
lat: number;
radius: number;
fill?: boolean;
} | {
kind: "oval";
lon: number;
lat: number;
rx: number;
ry: number;
fill?: boolean;
} | {
kind: "band";
lat: number;
} | {
kind: "line";
points: readonly (readonly [
number,
number
])[];
close?: boolean;
};
例
import { BODIES, type Feature } from "@johnmorrisdotca/wakusei-planets";
const features: readonly Feature[] = BODIES.jupiter.features ?? [];
console.log(features.length);12出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。