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 · Sky cultures: the figure and culture types, and your own culture

defineCulturefunction

Makes a culture from a function that lists its figures. The figures are made on first use and shared after.

Import it

import { defineCulture } from "@johnmorrisdotca/hoshi-stars/culture";

Definition

function defineCulture(id: string, names: Culture["names"], make: () => Asterism[]): Culture

Parameters

NameTypeDescription
idstring

The culture's key.

namesReadonly<{ en: string; ja: string; }>

Its name in English and Japanese.

make() => Asterism[]

Lists the figures.

Returns

Culture

The culture.

Examples

import { defineCulture } from "@johnmorrisdotca/hoshi-stars/culture";

const mine = defineCulture("mine", { en: "Mine", ja: "私の" }, () => [
  { id: "w", name: "W", names: { en: "The W" }, readings: {}, aka: [], about: "", kind: "asterism", group: undefined, missing: 0, chains: [[21, 168, 264, 403, 542]] },
]);
console.log(mine.find("the w")?.chains);
[ [ 21, 168, 264, 403, 542 ] ]

What it prints (run when this page was built)

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