RainbowEffect
Source:
RainbowEffect.h
RainbowEffect¶
src/light/effects/RainbowEffect.h:12Inherits:
EffectBase
Palette-cycling diagonal rainbow effect, and the default the tests reach for.
Author: FastLED rainbow (Mark Kriegsman), via the predecessor, https://github.com/ewowi/MoonLight/blob/main/src/MoonLight/Nodes/Effects/E_FastLED.h
A pixel's hue comes from its own x plus y, walked by the clock, so the bands run diagonally.
Public Attributes¶
uint8_t speed = 20
: How fast the rainbow cycles, where a whole one a second reads too fast.
Public Methods¶
virtual inline const char * tags() const override
: Catalog tags: MoonLight origin.
virtual inline Dim dimensions() const override
: Writes the z=0 slice, which extrude duplicates through a volume.
virtual inline void defineControls() override
: Publish the cycle speed.
virtual inline void tick() override
: Walk the phase, then color each pixel by its diagonal position.