Skip to the content

Hoshi Stars星

The stars you can see without a telescope, with names, colours and distances; the 88 constellations with their lines and boundaries; the Messier objects; and seven map projections to draw them on.

Hoshi is the Japanese word 星 for a star. About the name

Contents

Reference · Names on the brightest stars and the constellation figures as faint lines, for a sky you draw yourself: a count or a magnitude, the figure under the pointer at full strength, a body that covers part of the sky, and a look set by settings alone

lineStrengthFromAttributefunction

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 it

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

Definition

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

Parameters

NameTypeDescription
valuestring | null | undefined

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

Returns

number | undefined

The strength, or undefined when the lines are off.

Examples

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

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

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/hoshi-stars 0.47.0.