FastLED 3.9.15
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 33 of file flowfield.cpp.hpp.

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

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

+ Here is the call graph for this function: