-
-
Notifications
You must be signed in to change notification settings - Fork 0
Effect Page Template
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
segSet
entry 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
palette
entry for more details. -
patternPS* pattern (optional, see constructors) -- The color pattern the effect will use. See patterns. It is a pointer. See common vars
pattern
entry 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,
paletteTemp
for use. -
CRGB color (optional, see constructors) -- A single color for the effect. The color will be placed into the effect's local palette,
paletteTemp
for 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,
bgColorOrig
color. See common varsbgColor
entry 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 varsrate
entry for more.
-
uint8_t colorMode (default 0) -- The colorMode use for the effect, also see common vars
colorMode
entry for more details. -
uint8_t bgColorMode (default 0) -- The colorMode used for the background pixels, also see common vars
colorMode
entry for more details. -
CRGB bgColorOrig -- The default target of the effect's
bgColor
pointer. Will be set to the passed inBgColor
from the constructor. See common varsbgColor
entry for more details. -
CRGB rateOrig -- The default target of the effect's
rate
pointer. Will be set to the passed inRate
from the constructor. See common varsrate
entry 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
fillBg
entry 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
active
entry 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 varsshowNow
entry 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
colorLength
andspacing
background 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
- Overview
- Wiring LEDs and Prerequisites
- Code Examples:
- Commonly Used Variables and More
- Class Documentation Guide
- Segment Basics
- Advanced Segment Usage
- Segment Class Specs:
- Segment Drawing Functions
- Effect Basics
- Effects Advanced
- Color Modes
- Commonly Used Variables and More
- Pointers
- Temporary Effects
- Effect Utility Classes
- Effect Samples
- Documentation Notes
Show/Hide Effects
- Breath
- Breath Eye Seg Line
- Color Melt Seg Line
- Color Mode Fill Seg Line or Seg
- Color Wipe Seg
- Color Wipe Seg Line or Seg
- Cross-Fade Cycle
- Dissolve Seg Line
- Draw Pattern Seg Line or Seg
- Edge Burst Seg Line
- Fairy Lights Seg Line or Seg
- Fire2012 Seg
- Fire2012 Seg Line
- Fireflies Seg Line
- Fireworks
- Glimmer Seg Line
- Gradient Cycle Seg Line
- Gradient Cycle Fast Seg Line
- Larson Scanner Seg Line
- Lava
- Noise16
- Noise Seg Line
- Noise Gradient Seg Line
- Noise Waves Seg Line
- Pacifica
- Pacifica Hue Seg Line
- Particles Seg Line
- Pattern Shifter Seg Line
- Pattern Shifter Seg
- Plasma Seg Line
- Police Strobe Seg Line or Seg
- Pride With Pal Seg Line
- Pride With Pal 2 Seg Line
- Rainbow Cycle
- Rainbow Cycle Seg Line or Seg
- Rainbow Fonts Seg Line
- Rain Seg
- Rain Seg Line
- Rolling Waves Seg Line
- Rolling Waves Fast Seg Line
- Scanner Seg Line
- Segment Waves Seg
- Segment Waves Fast Seg
- Shifting Sea Seg Line
- Shimmer Seg Line
- Soft Twinkle Seg Line
- Streamer Seg Line
- Streamer Fast Seg Line
- Strobe Seg Line or Seg
- Theater Chase Seg Line
- Twinkle Seg Line
- Twinkle Fast Seg Line
- Twinkle 2 Seg Line or Seg
- Xmas Lights Seg Line or Seg