FaintSkytype
The faint stars of a page: loads the tiles a patch of sky needs, and answers from the ones it has.
Import it
import type { FaintSky } from "@johnmorrisdotca/hoshi-stars/faint";
Definition
interface FaintSky {
load(field: FaintField, limit?: number): Promise<void>;
stars(field: FaintField, limit?: number, max?: number): {
stars: FaintStar[];
depth: number;
loaded: boolean;
};
readonly size: number;
}
Members
| Name | Type | Description |
|---|---|---|
load | (field: FaintField, limit?: number): Promise<void> | Fetch the tiles the patch needs for stars to |
stars | (field: FaintField, limit?: number, max?: number): { stars: FaintStar[]; depth: number; loaded: boolean; } | The stars of the patch from the tiles that are here (see |
size | number | How many tiles are here. |
Examples
import { faintSky } from "@johnmorrisdotca/hoshi-stars/faint";
const sky = faintSky();
const orion = { rightAscension: 83.8, declination: -5.4, radius: 1 };
await sky.load(orion, 11);
console.log(sky.stars(orion, 11, 1000).stars.length);