Reference · Facts, line drawings and positions
ringStripfunction
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 it
import { ringStrip } from "@johnmorrisdotca/wakusei-planets";
Definition
function ringStrip(facts: BodyFacts, width?: number): RingStrip | null
Parameters
| Name | Type | Description |
|---|---|---|
facts | BodyFacts | A body that has rings. |
width (optional) | number | The strip's width in pixels. Default 1024. |
Returns
RingStrip | null
The RGBA bytes with the inner and outer radii in body radii, or null for a body with no rings.
Examples
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.33What it prints (run when this page was built)