discCover関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A mask for a round body, such as the Earth seen from space: every spot within radius pixels of its centre is covered.
インポート
import { discCover } from "@johnmorrisdotca/hoshi-stars/sky-labels";
定義
function discCover(x: number, y: number, radius: number): CoverMask
引数
| 名前 | 型 | 説明 |
|---|---|---|
x | number | The centre's x in pixels. |
y | number | The centre's y in pixels. |
radius | number | The radius in pixels. |
戻り値
CoverMask
A mask for StarNames.update.
例
import { discCover } from "@johnmorrisdotca/hoshi-stars/sky-labels";
const earth = discCover(400, 700, 300);
console.log(earth(400, 500), earth(400, 300));true false出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。