FireEffect
Source:
FireEffect.h
FireEffect¶
src/light/effects/FireEffect.h:14Inherits:
EffectBase
Fire2012-style heat field: sparks at the base rise and cool as they go.
Author: Mark Kriegsman's Fire2012 (FastLED); MoonLight adapts MatrixFireFast by toggledbits, https://github.com/toggledbits/MatrixFireFast
A cell's heat is its palette index, cold at the low end and hottest at the high. So the Lava palette gives the classic look, and Ocean or Forest turn the flame blue or green. The spark count scales with width, so a wide base lights across its whole length.
Public Attributes¶
uint8_t cooling = 55
: How fast a cell loses heat as it rises.
uint8_t sparking = 120
: How often the base throws a new spark.
Public Methods¶
virtual inline const char * tags() const override
: Catalog tags: FastLED origin, David Jupijn and Rising Step.
virtual inline Dim dimensions() const override
: Iterates y and x, so the heat buffer covers the z=0 plane and extrude fills a volume.
virtual inline void defineControls() override
: Publish the cooling rate and the spark rate.
virtual inline void prepare() override
: Size the heat grid to the z=0 plane, which extrude fills through a volume.
virtual inline void tick() override
: Cool the field, let the heat rise, spark the base, then render it through the palette.