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 · The data door: hand the package your own stars or objects as a source with its own licence and credit, and see whose data is on the screen

starSkyfunction

The faint stars of a page, from any number of tile sources: the door's view of the sky. Each source is checked when it is added; tiles load only when the view asks (load), under one byte budget, at most six at a time per source, and nothing is sent at rest; a source switched off or removed has its loads aborted and its tiles freed; a tile that fails, is not a faint tile or holds a number that is not finite is counted and never drawn; and credits() names the sources that drew something in the last stars call.

Import it

import { starSky } from "@johnmorrisdotca/hoshi-stars/door";

Definition

function starSky(options?: StarSkyOptions): StarSky

Parameters

NameTypeDescription
options (optional)StarSkyOptions

The sources to start with, the budget, and the two callbacks.

Returns

StarSky

The sky.

Examples

import { starSky, ucac4Source } from "@johnmorrisdotca/hoshi-stars/door";

const sky = starSky({ sources: [ucac4Source()], onChange: () => console.log("draw again") });
await sky.load({ rightAscension: 299, declination: 40, radius: 2 }, 12);
console.log(sky.stars({ rightAscension: 299, declination: 40, radius: 2 }, 12, 500).stars.length);

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