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

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

7.0 kB minified and gzipped, with everything it imports (measured with esbuild)

Exports

NameKindWhat it is
BitmapLiketypeWhat a picture needs of its bitmap: an ImageBitmap fits.
createTileStorefunctionA tile store for a view: loads the tiles of every source by key and keeps them under one budget of bytes (default 48 MB, all sources together).
CredittypeOne source's part in the last drawn frame.
creditLinefunctionThe credit line for what a view drew: each source's credit with its licence name, and "non-commercial" or "share-alike" whenever the source says so, so a page cannot hide the terms of the data it uses.
DataSourcetypeEither kind of source.
ImageTiletypeA map tile: its size in pixels and its picture.
LicencetypeA licence: its name and a link are always shown beside the credit.
loadRecordsfunctionReads a record source once, when it is added: the list is frozen, a record with a non-finite number (a NaN or an infinity in any number finite names) is skipped and counted, and a list over MAX_RECORDS is refused whole (bigger data must be tiles).
MapPlacetypeA piece of a map, in degrees: longitude and latitude (right ascension and declination for the sky).
MAX_IN_FLIGHTconstantThe most loads in flight at once for one source.
MAX_RECORDSconstantThe most records a record source may hold.
ObjectSourcetypeA source of deep-sky objects: a list that fits in memory (at most 200,000 records), read once.
ObjectsReadtypeWhat withObjects found.
OWN_SOURCESconstantThe package's own data, as sources, written from the rows of NOTICE.md: the Yale Bright Star Catalogue, UCAC4 and the deep-sky list from Wikidata.
ownCreditfunctionThe credit of one of the package's own sources, for the part of a page the door does not draw: the bright stars of the Yale catalogue are drawn from the main entry, so a page puts ownCredit("yale-bsc", count) first in its credit line.
RecordSourcetypeA list that fits in memory (at most MAX_RECORDS records; bigger data must be tiles).
RecordsReadtypeWhat loadRecords found.
SkyPictureSourcetypeA source of a picture of the sky in tiles (a survey, an all-sky photograph): a map source, which uses the family's one map shape.
SourceInfotypeWhat a source says about itself.
starSkyfunctionThe faint stars of a page, from any number of tile sources: the door's view of the sky.
StarSkytypeThe faint stars of a page from any number of sources: loads the tiles a patch needs from each and answers from the ones it has.
StarSkyOptionstypeWhat starSky takes.
StarSourcetypeA source of stars in tiles: the place is a round patch of sky (FaintField), the detail is the faintest magnitude wanted, and a tile is the decoded FaintTile (parallel arrays of right ascension, declination, magnitude and B-V).
TILE_BUDGET_BYTESconstantThe default budget for decoded tiles in a view, all sources together: 48 MB (a picture counts with its mipmaps, 4/3 of its bytes).
TileFetchtypeA fetch as the loaders use it: the address and, for a stop, a signal.
TileLoadertypeThe part of a tile source the store uses.
TileSourcetypeData cut by place and by detail.
TileStatstypeWhat a tile store has done.
TileStoretypeA tile store: tiles by source and key, under one byte budget.
TileStoreOptionstypeOptions for createTileStore.
Ucac4OptionstypeWhat ucac4Source takes.
ucac4SourcefunctionThe package's own faint stars, UCAC4 to magnitude 12 in sky tiles, as a source: what faintSky has always loaded, through the door.
validateSourcefunctionRefuses a source that cannot be shown honestly: it throws a TypeError at once, when a source is added, not at the first draw.
withObjectsfunctionAdds the deep-sky objects of outside sources to the page's own.

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