ringBand

Three thin colored rings around the center, the rainbow edge of a lens or a halo.

ringBand(slots: {center: ArgSpec; spread: ArgSpec; width: ArgSpec}): LightPart

Import light from shaders/std and use light.ringBand.

Returns an RGB, not a field. The red ring sits at center + spread, green at center, blue at center - spread, each width wide, all in the frame's distance unit. A positive spread puts red outside, as a real lens does.

Parameters

NameTypeNotes
slots{center: ArgSpec; spread: ArgSpec; width: ArgSpec}

Example

const rings = withFrame(radialFrame(p('center')), ringBand({center: p('radius'), spread: 0.01, width: 0.02}))(params)

See also

  • flareHalo — The rainbow halo ring of a lens flare, drawn across the canvas from the light.
  • glowPoint — A soft glow at the center of a radial frame with no hard edge.