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

designationWidthfunction

The width a star's catalogue letter (α Ori) takes in pixels in the look's small monospace, 0.6 of its size a letter; 0 where it is not drawn.

Import it

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

Definition

function designationWidth(designation: string, style: LabelStyle): number

Parameters

NameTypeDescription
designationstring

The text, or an empty text for a star with none.

styleLabelStyle

A complete look.

Returns

number

The width in pixels.

Examples

import { designationWidth, labelStyle } from "@johnmorrisdotca/hoshi-stars/sky-labels";

console.log(designationWidth("α Ori", labelStyle()), designationWidth("α Ori", labelStyle({ designation: "none" })));
27 0

What it prints (run when this page was built)

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