リファレンス · 88星座それぞれの絵 (明るい版と暗い版)
FigureThumbnailInput型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
What to draw for a figure of a sky culture: its name for the picture's <title>, the stars it joins and the lines between them.
インポート
import type { FigureThumbnailInput } from "@johnmorrisdotca/hoshi-stars/thumbnails";
定義
interface FigureThumbnailInput {
title: string;
stars: ReadonlyArray<Star>;
segments: ReadonlyArray<readonly [
Star,
Star
]>;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
title | string | The name for the picture's |
stars | readonly Star[] | The stars of the figure, drawn inside a soft outline round them; one star is also ringed. |
segments | readonly (readonly [Star, Star])[] | The lines of the figure, each a pair of its stars. |
例
import { figureOf } from "@johnmorrisdotca/hoshi-stars/lines";
import { japanese } from "@johnmorrisdotca/hoshi-stars/cultures/japanese";
import { type FigureThumbnailInput } from "@johnmorrisdotca/hoshi-stars/thumbnails";
const subaru = figureOf("昴", japanese);
const input: FigureThumbnailInput = { title: "昴", stars: subaru.stars, segments: subaru.segments };
console.log(input.stars.length);6出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。