CultureFigure型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
One figure of a sky culture, as stars and lines: the stars of the culture's figure that the catalogue holds.
インポート
import type { CultureFigure } from "@johnmorrisdotca/hoshi-stars/lines";
定義
interface CultureFigure {
asterism: Asterism;
stars: Star[];
segments: Array<[
Star,
Star
]>;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
asterism | Asterism | The figure: its names, reading, kind and how many of its stars we do not hold ( |
stars | Star[] | 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, no pair twice. Empty where the figure is one star. |
例
import { figureOf, type CultureFigure } from "@johnmorrisdotca/hoshi-stars/lines";
import { japanese } from "@johnmorrisdotca/hoshi-stars/cultures/japanese";
const subaru: CultureFigure = figureOf("昴", japanese);
console.log(subaru.asterism.names.en, subaru.stars.length, subaru.segments.length);Subaru 6 5出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。