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

TileStoreOptionstype

Options for createTileStore.

Import it

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

Definition

interface TileStoreOptions {
    budgetBytes?: number;
    maxInFlight?: number;
    maxTiles?: number;
    onChange?: () => void;
}

Members

NameTypeDescription
budgetBytes (optional)number | undefined

The bytes of decoded tiles held, all sources together. Default TILE_BUDGET_BYTES.

maxInFlight (optional)number | undefined

The most loads in flight for one source. Default MAX_IN_FLIGHT.

maxTiles (optional)number | undefined

The most tiles held, all sources together, as well as the byte budget. Default: no limit.

onChange (optional)(() => void) | undefined

Called when a tile has arrived, failed or been refused, so the view can redraw.

Examples

import type { TileStoreOptions } from "./data-door.ts";

const options: TileStoreOptions = { budgetBytes: 24 * 1024 * 1024, maxTiles: 256, onChange: () => draw() };

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