Effect Page Template - AlbertGBarber/PixelSpork GitHub Wiki
See the Documentation Guide for help understanding each page section.
| Effect Sample (see here for sample info) |
|
|
The effect is adapted to work on segment lines for 2D use.
Supports color modes for both the main and background colors.
These are allocated dynamically, so, to avoid memory fragmentation, when you create the effect, you should set numTwinkles to the maximum value you expect to use. See Memory Management for more details.
Warning, this effect uses dynamic memory allocation related to <>. If you plan changing <> during runtime you should set its length to the maximum expected value when you create the effect. This helps prevent memory fragmentation while ensuring that you have enough memory to run the effect. You can read more about memory management here. Also note that if you create this effect without a pattern (ie using your palette as the pattern), a pattern will be created dynamically. This is also true if you call setPaletteAsPattern() later.
-
SegmentSetPS* segSet -- The Segment Set the effect will draw on. See common vars
segSetentry for more details. -
palettePS* palette (optional, see constructors) -- The set of colors the effect will use. See palettes. It is a pointer. See common vars
paletteentry for more details. -
patternPS* pattern (optional, see constructors) -- The color pattern the effect will use. See patterns. It is a pointer. See common vars
patternentry for more details. -
uint8_t numColors (optional, see constructors) -- The number of randomly chosen colors for the effect. The colors will be placed into the effect's local palette,
paletteTempfor use. -
CRGB color (optional, see constructors) -- A single color for the effect. The color will be placed into the effect's local palette,
paletteTempfor use. -
CRGB* bgColor -- The color used for background pixels. Is a pointer, allowing you to bind it to an external color. By default it's bound the effect's local,
bgColorOrigcolor. See common varsbgColorentry for more details. -
uint16_t Var -- Blah.
-
uint16_t* rate -- Update rate (ms). Is a pointer, allowing you to bind it to an external variable. By default it's bound the effect's local variable,
rateOrig. See common varsrateentry for more.
-
uint8_t colorMode (default 0) -- The colorMode use for the effect, also see common vars
colorModeentry for more details. -
uint8_t bgColorMode (default 0) -- The colorMode used for the background pixels, also see common vars
colorModeentry for more details. -
CRGB bgColorOrig -- The default target of the effect's
bgColorpointer. Will be set to the passed inBgColorfrom the constructor. See common varsbgColorentry for more details. -
CRGB rateOrig -- The default target of the effect's
ratepointer. Will be set to the passed inRatefrom the constructor. See common varsrateentry for more details. -
bool fillBg (default false) -- If true, then all pixels will be re-colored with each update(), rather than just drawing those that have changed. See common vars
fillBgentry for more details. -
uint8_t sat and val (both default 255) -- HSV saturation and "value" values for rainbow mode. See Common Vars "sat and hue" entry for more.
-
bool active (default true) -- If false, the utility/effect will be disabled (updates() will be ignored). See common vars
activeentry for more details. -
bool showNow (default true) -- Controls if the effect "draws" during each update cycle by calling
FastLED.show(). Common to all effects. See common varsshowNowentry for more details. -
type var (default 255) -- desc
-
void someFunction( uint16_t someArg );
blah
-
void setPaletteAsPattern();
Sets the effect pattern to match the current effect palette. See Common Functions for more.
-
void setPatternAsPattern(patternPS &inputPattern, uint16_t colorLength, uint16_t spacing);
Takes an input pattern and creates a color pattern from with streamers of
colorLengthandspacingbackground spaces in-between. A short-hand for turning a short pattern into a full pattern for the effect. See Common Functions for more. -
void reset();
Restarts the effect from its initial state.
-
void update();
Updates the effect.
- bool var -- desc