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

◆ init()

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

Definition at line 269 of file wave_simulation.cpp.

270 {
272 mMultiplier = static_cast<u32>(factor);
273 mSim.reset(); // clear out memory first.
274 mSim.reset(
275 new WaveSimulation1D_Real(length * mMultiplier, speed, dampening));
276 // Extra updates (frames) are applied because the simulation slows down in
277 // proportion to the supersampling factor.
278 mExtraFrames = static_cast<u8>(factor) - 1;
279}
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: