リファレンス · 星座の文化 (図形と文化の型、自分で作る文化)
Culture型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A sky culture: a named set of figures. Import one from its own entry point and pass it to constellations, constellation, starsIn, figures and figureOf.
インポート
import type { Culture } from "@johnmorrisdotca/hoshi-stars/culture";
ほかのエクスポート元: @johnmorrisdotca/hoshi-stars/sky-labels
定義
interface Culture {
readonly id: string;
readonly names: Readonly<{
en: string;
ja: string;
}>;
asterisms(): readonly Asterism[];
find(text: string): Asterism | undefined;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
id | string | A short key for an address or a setting: |
names | Readonly<{ en: string; ja: string; }> | The culture's name in English and in Japanese. |
asterisms | (): readonly Asterism[] | The culture's figures, in a fixed order. Parsed once. |
find | (text: string): Asterism | undefined | One figure by any of its names (ignoring case, accents, tone marks and katakana against hiragana), its reading or its id; |
例
import { japanese } from "@johnmorrisdotca/hoshi-stars/cultures/japanese";
console.log(japanese.id, japanese.names.ja, japanese.asterisms().length);japanese 日本の伝統 106出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。