ringStrip関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The strip of a body's rings, made from its ring bands: where each band is it stops light and has its tone, with fine ringlets in it and soft edges.
インポート
import { ringStrip } from "@johnmorrisdotca/wakusei-planets";
定義
function ringStrip(facts: BodyFacts, width?: number): RingStrip | null
引数
| 名前 | 型 | 説明 |
|---|---|---|
facts | BodyFacts | A body that has rings. |
width (省略可) | number | The strip's width in pixels. Default 1024. |
戻り値
RingStrip | null
The RGBA bytes with the inner and outer radii in body radii, or null for a body with no rings.
例
import { BODIES, ringStrip } from "@johnmorrisdotca/wakusei-planets";
const strip = ringStrip(BODIES.saturn, 256);
console.log(strip?.width, strip?.inner.toFixed(2), strip?.outer.toFixed(2));256 1.11 2.33出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。