-
-
Notifications
You must be signed in to change notification settings - Fork 0
Cross Fade Cycle
See the Documentation Guide for help understanding each page section.
Effect Sample (see here for sample info) |
Cross fades the entire Segment Set from one solid color to the next, following either a pattern and palette, a palette alone, or using random colors. Each fade is done in a specified number of steps. There are also several random mode settings allowing you to adjust how the next fade color is chosen.
You can set the effect to pause between between fades for a fixed length of time.
The effect is adapted to work on segment lines for 2D use.
Does not work with colorModes.
- 0: Colors will be chosen in order from the pattern (not random).
- 1: Colors will be chosen completely at random.
- 2: Colors will be chosen randomly from the palette (not allowing repeats).
uint8_t pattern_arr = {0, 2, 1};
patternPS pattern = {pattern_arr, SIZE(pattern_arr), SIZE(pattern_arr)};
CrossFadeCyclePS crossFadeCycle(mainSegments, pattern, cybPnkPal_PS, 40, 30);
/* Will fade from color 0, to color 2, to color 1 of the cybPnkPal_PS palette
taking 40 steps for each fade, with 30ms between steps */
CrossFadeCyclePS crossFadeCycle(mainSegments, cybPnkPal_PS, 40, 30);
/* Will fade through the colors of the cybPnkPal_PS palette in order
taking 40 steps for each fade, with 30ms between steps */
CrossFadeCyclePS crossFadeCycle(mainSegments, 40, 30);
/* Will fade from one random color to the next
taking 40 steps for each fade, with 30ms between steps */
//Constructor for pattern and palette
CrossFadeCyclePS(SegmentSetPS &SegSet, patternPS &Pattern, palettePS &Palette, uint8_t Steps, uint16_t Rate);
//Constructor for palette as the pattern
CrossFadeCyclePS(SegmentSetPS &SegSet, palettePS &Palette, uint8_t Steps, uint16_t Rate);
//Constructor for random colors
CrossFadeCyclePS(SegmentSetPS &SegSet, uint8_t Steps, uint16_t Rate);
-
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 steps -- How many steps for each fade.
-
uint16_t* rate -- Update rate (ms) (time between fade steps). 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 randMode (default 0) -- See
randMode
notes in intro. -
uint16_t pauseTime (default 0) -- The time that the effect will pause for between fades (ms).
-
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.
-
void setPaletteAsPattern();
Sets the effect pattern to match the current effect palette. See Common Functions for more.
-
void reset();
Restarts the effect from its initial state.
-
void update();
Updates the effect.
- uint16_t fadeCount -- The number of fade cycles we've gone through.
- bool paused -- If true then the effect is paused, it will begin fading again after
pauseTime
has passed.
- 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