Skip to content

RipplesEffect

Source: RipplesEffect.h

RipplesEffect

class RipplesEffect
src/light/effects/RipplesEffect.h:22

Inherits: EffectBase

Water-ripple effect: distance from the center drives a wave phase.

RipplesEffect card RipplesEffect controls

Each column of the floor takes a phase from its distance to the center. One pixel per column then lights at the height that phase gives, so the surface ripples.

Public Attributes

uint8_t speed = 50 : How fast the ripples travel, where 0 freezes them.

uint8_t interval = 128 : The wavefront spacing, where low gives tight rings.

Public Methods

virtual inline const char * tags() const override : Catalog tags: MoonLight origin, a water ripple.

virtual inline Dim dimensions() const override : The surface fills a volume, so all three axes are used.

virtual inline void defineControls() override : Publish the ripple's speed and its spacing.

virtual inline void tick() override : Light one pixel per floor column, at the height its wave phase gives.

More info

It is genuinely 3D

The effect writes a height across y, so it wants real depth to read as a surface. A flat layout collapses it to a single row, which is honest rather than a failure. WaterRippleEffect simulates a real wave equation on a plane instead.

Float trig runs in the loop, since the integer preference is for per-light color work.