SineEffect
Source:
SineEffect.h
SineEffect¶
src/light/effects/SineEffect.h:15Inherits:
EffectBase
Effect of a moving sine wave across the layer.

Red, green and blue each follow a sine along one axis, a third of a turn apart. So the box glows through shifting colors that scroll with time. A flat layout holds its depth term constant, which reads as a red and green wash.
Public Attributes¶
uint8_t frequency = 1
: How many waves cross the box.
uint8_t amplitude = 255
: Peak brightness.
uint8_t bpm = 30
: How fast the field scrolls.
Public Methods¶
virtual inline const char * tags() const override
: Catalog tags for the visual catalog.
virtual inline Dim dimensions() const override
: Each axis drives its own color channel.
virtual inline void defineControls() override
: Publish the wave's frequency, its brightness and its speed.
virtual inline void tick() override
: Walk the phase, then write each channel from its own axis.