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

FigureNametype

The name of the picked figure and where to draw it, centred on x, with its baseline at y: clear above the figure, and never over a star's name.

Import it

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

Definition

interface FigureName {
    text: string;
    x: number;
    y: number;
    anchor: "middle";
}

Members

NameTypeDescription
textstring

The name with the look's case applied.

xnumber

The centre of the text and its baseline, in the page's pixels. It sits above the top of the figure; where the figure reaches the top of the view it goes below; and it steps clear of any box passed to update as avoid.

ynumber
anchor"middle"

Examples

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

const draw = (name: FigureName): string => `${name.text} at ${Math.round(name.x)},${Math.round(name.y)}`;
console.log(typeof draw);
function

What it prints (run when this page was built)

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