本文へ移動

Hoshi Stars星

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

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

目次

リファレンス · 星座の線

Figure型

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

The stick figure of one constellation.

インポート

import type { Figure } from "@johnmorrisdotca/hoshi-stars/lines";

定義

interface Figure {
    constellation: Constellation;
    stars: Star[];
    segments: Array<[
        Star,
        Star
    ]>;
}

メンバー

名前型説明
constellationConstellation

The constellation the figure is drawn in.

starsStar[]

The stars the figure uses, each once, in the order the figure first reaches them.

segments[Star, Star][]

The lines to draw, each a pair of stars of the constellation, no pair twice. Empty where the figure is one star.

例

import { figureOf, type Figure } from "@johnmorrisdotca/hoshi-stars/lines";

const orion: Figure = figureOf("Ori");
console.log(orion.constellation.name, orion.stars.length, orion.segments.length);
Orion 8 8

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

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

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