本文へ移動

Hoshi Stars星

肉眼で見える星の名前・色・距離、88星座の線と境界、メシエ天体、そしてそれらを描くための7種類の図法を使えます。

「星」(ほし) は、夜空に光って見えるものです。 名前について(英語)

目次

リファレンス · 暗い星 (UCAC4の約300万個、12等まで。見ている空の部分のタイルだけを読み込みます)

FaintSky型

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

The faint stars of a page: loads the tiles a patch of sky needs, and answers from the ones it has.

インポート

import type { FaintSky } from "@johnmorrisdotca/hoshi-stars/faint";

定義

interface FaintSky {
    load(field: FaintField, limit?: number): Promise<void>;
    stars(field: FaintField, limit?: number, max?: number): {
        stars: FaintStar[];
        depth: number;
        loaded: boolean;
    };
    readonly size: number;
}

メンバー

名前型説明
load(field: FaintField, limit?: number): Promise<void>

Fetch the tiles the patch needs for stars to limit that are not here yet. Resolves when they are all here, and rejects if one could not be fetched (the others stay).

stars(field: FaintField, limit?: number, max?: number): { stars: FaintStar[]; depth: number; loaded: boolean; }

The stars of the patch from the tiles that are here (see faintStarsIn), and loaded: whether every tile the patch needs is here, so that nothing is missing.

sizenumber

How many tiles are here.

例

import { faintSky } from "@johnmorrisdotca/hoshi-stars/faint";

const sky = faintSky();
const orion = { rightAscension: 83.8, declination: -5.4, radius: 1 };
await sky.load(orion, 11);
console.log(sky.stars(orion, 11, 1000).stars.length);

ソースを見るGitHub で編集@johnmorrisdotca/hoshi-stars 0.47.0 のソースから作成しました。

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