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

FigureLinesSettingstype

What the lines are.

Import it

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

Definition

interface FigureLinesSettings {
    strength?: number;
    reach?: number;
    dotRadius?: number;
    maxLength?: number;
    lang?: NameLanguage;
    culture?: Culture | undefined;
    style?: Partial<LabelStyle>;
}

Members

NameTypeDescription
strength (optional)number | undefined

How strong the lines are when not under the pointer, 0 to 1. 0 draws nothing at all, and DEFAULT_LINE_STRENGTH (0.16) is used when left out.

reach (optional)number | undefined

How near a line the pointer must be to pick its figure, in pixels. 14 by default; a finger may want more.

dotRadius (optional)number | undefined

The radius in pixels of a star's dot, which a figure's name must not cover: 3 by default.

maxLength (optional)number | undefined

A line longer than this many pixels is left out: a page that draws the whole sky flat uses it to drop the lines that cross the seam. Left out, no line is dropped for its length.

lang (optional)NameLanguage | undefined

The language of the figure's name when it is picked: en gives the Latin name (Canis Major), ja the Japanese (おおいぬ座). en by default. In a culture's sky a constellation is named the same way, an asterism by its English name (Subaru, Big Dipper) or in Japanese by its reading in kana (すばる), and a figure with no name in the language by its own (北斗).

culture (optional)Culture | undefined

The sky culture whose figures are drawn (japanese or chinese from @johnmorrisdotca/hoshi-stars/cultures/…, or one made with defineCulture): its figures, in its order, each keyed by its id. Left out, the 88 constellations of the IAU. A new culture in set lets the picked figure go.

style (optional)Partial<LabelStyle> | undefined

The look of the picked figure's name (labelStyle); a quiet plain default.

Examples

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

const settings: FigureLinesSettings = { strength: 0.2, lang: "ja", reach: 16 };
console.log(settings.strength);
0.2

What it prints (run when this page was built)

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