本文へ移動

Hoshi Stars星

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

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

目次

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

lineStrengthFromAttribute関数

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

The strength from the attribute constellation-lines, read as text. Off (undefined) when the attribute is missing, 0, off or false; constellation-lines with no value is the default strength (0.16); a number is the strength, held to 0 up to 1.

インポート

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

定義

function lineStrengthFromAttribute(value: string | null | undefined): number | undefined

引数

名前型説明
valuestring | null | undefined

The value of constellation-lines, or null when the attribute is missing.

戻り値

number | undefined

The strength, or undefined when the lines are off.

例

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

console.log(lineStrengthFromAttribute("0.3"), lineStrengthFromAttribute(""), lineStrengthFromAttribute(null), lineStrengthFromAttribute("0"));
0.3 0.16 undefined undefined

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

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

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