FastLED 3.10.8
Loading...
Searching...
No Matches

◆ noisePunch()

void fl::FlowField::noisePunch ( float amplitude = 1.0f,
BumpShape shape = BumpShape::HalfSine )

Trigger a noise punch on both axes at center with proportional width.

Definition at line 34 of file flowfield.cpp.hpp.

34 {
35 float cx = getWidth() * 0.5f;
36 float cy = getHeight() * 0.5f;
37 float wx = getWidth() * 0.4f;
38 float wy = getHeight() * 0.4f;
39 mNoiseBias.triggerX(cx, wx, amplitude, shape);
40 mNoiseBias.triggerY(cy, wy, amplitude, shape);
41}
NoiseBias2D mNoiseBias
Definition flowfield.h:287
u16 getWidth() const FL_NO_EXCEPT
Definition fx2d.h:25
u16 getHeight() const FL_NO_EXCEPT
Definition fx2d.h:24

References fl::FL_NO_EXCEPT, fl::Fx2d::getHeight(), fl::Fx2d::getWidth(), and mNoiseBias.

+ Here is the call graph for this function: