リファレンス · データの入口(自分で用意した星やディープスカイ天体を、ライセンスと出典つきのソースとして渡し、いま画面にあるのは誰のデータかを示します)
starSky関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
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 { starSky } from "@johnmorrisdotca/hoshi-stars/door";
定義
function starSky(options?: StarSkyOptions): StarSky
引数
| 名前 | 型 | 説明 |
|---|---|---|
options (省略可) | StarSkyOptions | The sources to start with, the budget, and the two callbacks. |
戻り値
StarSky
The sky.
例
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);この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。