本文へ移動

Hoshi Stars星

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

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

目次

リファレンス · いちばん明るい星の名前と、うすい星座の線 (自分で描く空のために。個数か等級で選べます。ポインターが乗っている星座は濃く表示でき、空をおおうものにも対応し、見た目は設定だけで変えられます)

FigureLinesSettings型

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

What the lines are.

インポート

import type { FigureLinesSettings } from "@johnmorrisdotca/hoshi-stars/sky-labels";

定義

interface FigureLinesSettings {
    strength?: number;
    reach?: number;
    dotRadius?: number;
    maxLength?: number;
    lang?: NameLanguage;
    culture?: Culture | undefined;
    style?: Partial<LabelStyle>;
}

メンバー

名前型説明
strength (省略可)number | undefined

How strong the lines are when not under the pointer, 0 to 1. 0 draws nothing at all, and DEFAULT_LINE_STRENGTH (0.16) is used when left out.

reach (省略可)number | undefined

How near a line the pointer must be to pick its figure, in pixels. 14 by default; a finger may want more.

dotRadius (省略可)number | undefined

The radius in pixels of a star's dot, which a figure's name must not cover: 3 by default.

maxLength (省略可)number | undefined

A line longer than this many pixels is left out: a page that draws the whole sky flat uses it to drop the lines that cross the seam. Left out, no line is dropped for its length.

lang (省略可)NameLanguage | undefined

The language of the figure's name when it is picked: en gives the Latin name (Canis Major), ja the Japanese (おおいぬ座). en by default. In a culture's sky a constellation is named the same way, an asterism by its English name (Subaru, Big Dipper) or in Japanese by its reading in kana (すばる), and a figure with no name in the language by its own (北斗).

culture (省略可)Culture | undefined

The sky culture whose figures are drawn (japanese or chinese from @johnmorrisdotca/hoshi-stars/cultures/…, or one made with defineCulture): its figures, in its order, each keyed by its id. Left out, the 88 constellations of the IAU. A new culture in set lets the picked figure go.

style (省略可)Partial<LabelStyle> | undefined

The look of the picked figure's name (labelStyle); a quiet plain default.

例

import type { FigureLinesSettings } from "@johnmorrisdotca/hoshi-stars/sky-labels";

const settings: FigureLinesSettings = { strength: 0.2, lang: "ja", reach: 16 };
console.log(settings.strength);
0.2

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

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

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