FastLED 3.9.15
Loading...
Searching...
No Matches

◆ init()

void fl::WaveSimulation1D::init ( u32 length,
SuperSample factor,
float speed,
int dampening )

Definition at line 232 of file wave_simulation.cpp.

233 {
235 mMultiplier = static_cast<u32>(factor);
236 mSim.reset(); // clear out memory first.
237 mSim.reset(
238 new WaveSimulation1D_Real(length * mMultiplier, speed, dampening));
239 // Extra updates (frames) are applied because the simulation slows down in
240 // proportion to the supersampling factor.
241 mExtraFrames = static_cast<u8>(factor) - 1;
242}
uint16_t speed
Definition Noise.ino:63
fl::unique_ptr< WaveSimulation1D_Real > mSim
UISlider length("Length", 1.0f, 0.0f, 1.0f, 0.01f)
UISlider dampening("Dampening", 6.0f, 0.0f, 10.0f, 0.1f)
unsigned char u8
Definition int.h:17

References dampening(), length(), mExtraFrames, mMultiplier, mOuterLength, mSim, and speed.

Referenced by WaveSimulation1D(), and setSuperSample().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: