本文へ移動

Hoshi Stars星

肉眼で見える星の名前・色・距離、88星座の線と境界、メシエ天体、そしてそれらを描くための7種類の図法を使えます。

「星」(ほし) は、夜空に光って見えるものです。 名前について(英語)

目次

リファレンス

データの入口(自分で用意した星やディープスカイ天体を、ライセンスと出典つきのソースとして渡し、いま画面にあるのは誰のデータかを示します)

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

最小化と gzip 圧縮をしたサイズは 7.0 kB(読み込むものをすべて含み、esbuild で計測)

リファレンスの説明と例は英語です。見出しと目次は日本語です。

エクスポート

名前種類概要
BitmapLike型What a picture needs of its bitmap: an ImageBitmap fits.
createTileStore関数A 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).
Credit型One source's part in the last drawn frame.
creditLine関数The 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.
DataSource型Either kind of source.
ImageTile型A map tile: its size in pixels and its picture.
Licence型A licence: its name and a link are always shown beside the credit.
loadRecords関数Reads 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).
MapPlace型A piece of a map, in degrees: longitude and latitude (right ascension and declination for the sky).
MAX_IN_FLIGHT定数The most loads in flight at once for one source.
MAX_RECORDS定数The most records a record source may hold.
ObjectSource型A source of deep-sky objects: a list that fits in memory (at most 200,000 records), read once.
ObjectsRead型What withObjects found.
OWN_SOURCES定数The 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.
ownCredit関数The 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.
RecordSource型A list that fits in memory (at most MAX_RECORDS records; bigger data must be tiles).
RecordsRead型What loadRecords found.
SkyPictureSource型A 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.
SourceInfo型What a source says about itself.
starSky関数The faint stars of a page, from any number of tile sources: the door's view of the sky.
StarSky型The 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.
StarSkyOptions型What starSky takes.
StarSource型A 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_BYTES定数The default budget for decoded tiles in a view, all sources together: 48 MB (a picture counts with its mipmaps, 4/3 of its bytes).
TileFetch型A fetch as the loaders use it: the address and, for a stop, a signal.
TileLoader型The part of a tile source the store uses.
TileSource型Data cut by place and by detail.
TileStats型What a tile store has done.
TileStore型A tile store: tiles by source and key, under one byte budget.
TileStoreOptions型Options for createTileStore.
Ucac4Options型What ucac4Source takes.
ucac4Source関数The package's own faint stars, UCAC4 to magnitude 12 in sky tiles, as a source: what faintSky has always loaded, through the door.
validateSource関数Refuses a source that cannot be shown honestly: it throws a TypeError at once, when a source is added, not at the first draw.
withObjects関数Adds the deep-sky objects of outside sources to the page's own.

ソースを見るGitHub で編集@johnmorrisdotca/hoshi-stars 0.47.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。