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

FigureOnScreentype

One figure on the screen: where its lines are in FigureLines.segments, and its name's spot. The objects are reused by the next update.

Import it

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

Definition

interface FigureOnScreen {
    abbreviation: string;
    start: number;
    end: number;
    left: number;
    top: number;
    right: number;
    bottom: number;
    x: number;
}

Members

NameTypeDescription
abbreviationstring

The constellation's IAU abbreviation (Ori); in a culture's sky, the figure's id (Ori for a constellation, subaru, bei3-dou3).

startnumber

The figure's lines are the segments from start up to (not including) end; the same number means none are in view.

endnumber
leftnumber

The box the figure's lines in view take: its left, top, right and bottom edges.

topnumber
rightnumber
bottomnumber
xnumber

The middle of that box across: where its name is centred.

Examples

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

const lines = (figure: FigureOnScreen): number => figure.end - figure.start;
console.log(typeof lines);
function

What it prints (run when this page was built)

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