|
FastLED 3.9.15
|
Definition at line 18 of file perlin_particle_punch.h.
#include <perlin_particle_punch.h>
Inheritance diagram for fl::PerlinParticlePunch:
Collaboration diagram for fl::PerlinParticlePunch:Classes | |
| struct | AmbientParticle |
| struct | DebrisParticle |
| struct | MeteorParticle |
Public Member Functions | |
| PerlinParticlePunch (u16 num_leds) | |
| ~PerlinParticlePunch () FL_NOEXCEPT | |
| void | draw (DrawContext context) override |
| fl::string | fxName () const override |
| void | setAmbientBrightnessDecay (float decay) |
| Per-frame brightness decay for ambient particles. | |
| void | setAmbientPalette (const CRGBPalette16 &palette) |
| Set palette for ambient particles. | |
| void | setAmbientTrailIntensity (u8 intensity) |
| Ambient trail intensity: 0 = no trail, 255 = long persistent trail. | |
| void | setDebrisBrightnessDecay (float decay) |
| Per-frame brightness decay for debris particles. Default 0.90. | |
| void | setDebrisVelocityDecay (float decay) |
| Per-frame velocity decay for debris particles. Default 0.95. | |
| void | setDrag (float drag) |
| Set per-frame drag for ambient particles (0.0 = instant stop, 1.0 = no drag). | |
| void | setMeteorGradient (CRGB headColor, CRGB midColor, CRGB tailColor) |
| Set the meteor color gradient: head → mid → tail. | |
| void | setMeteorTrailIntensity (u8 intensity) |
| Meteor trail intensity: controls how long meteor/debris trails linger. | |
| void | setMinVelocity (float minVel) |
| Minimum velocity before a particle dies. | |
| void | setNoisePalette (const CRGBPalette16 &palette) |
| Set palette for Perlin noise background. | |
| void | setSpeed (float speed) |
| Set velocity multiplier. Default 1.0. | |
| void | setTimeMultiplier (float mult) |
| Set time multiplier for noise evolution (1.0 = normal, >1 = warp). | |
| void | spawnAmbient (float intensity=0.5f) |
| Spawn an ambient particle at a random position. | |
| void | spawnMeteor (float intensity=1.0f) |
| Spawn a BEAT meteor at position 0, traveling toward end of strip. | |
Public Member Functions inherited from fl::Fx1d | |
| Fx1d (u16 numLeds) | |
| void | setXmap (const XMap &xMap) |
| u16 | xyMap (u16 x) const |
Public Member Functions inherited from fl::Fx | |
| Fx (u16 numLeds) | |
| u16 | getNumLeds () const |
| virtual bool | hasFixedFrameRate (float *fps) const |
| virtual void | pause (fl::u32 now) |
| virtual void | resume (fl::u32 now) |
Private Member Functions | |
| s16x16 | circleNoiseGen (u32 now, s16x16 theta) const |
| void | noiseCircleDraw (u32 now, fl::span< CRGB > dst) |
| void | renderAmbient (const AmbientParticle &p) |
| void | renderDebris (const DebrisParticle &d) |
| void | renderMeteor (const MeteorParticle &m) |
| void | spawnDebrisFromMeteor (MeteorParticle &m, u32 now) |
| AmbientParticle * | tryAllocateAmbient () |
| DebrisParticle * | tryAllocateDebris () |
| MeteorParticle * | tryAllocateMeteor () |
Static Private Member Functions | |
| static s16x16 | mapf (s16x16 x, s16x16 in_min, s16x16 in_max, s16x16 out_min, s16x16 out_max) |
| static void | writeMax (CRGB &dst, const CRGB &src) |
Private Attributes | |
| float | mAmbientBrightnessDecay = 0.97f |
| CRGBPalette16 | mAmbientPalette |
| fl::vector< AmbientParticle > | mAmbientParticles |
| u8 | mAmbientTrailIntensity = 200 |
| float | mDebrisBrightnessDecay = 0.90f |
| fl::vector< DebrisParticle > | mDebrisParticles |
| float | mDebrisVelocityDecay = 0.95f |
| float | mDrag = 0.95f |
| float | mMeteorDrag = 0.92f |
| CRGB | mMeteorHeadColor = CRGB(255, 255, 255) |
| CRGB | mMeteorMidColor = CRGB(140, 180, 255) |
| fl::vector< MeteorParticle > | mMeteorParticles |
| CRGB | mMeteorTailColor = CRGB(0, 40, 120) |
| u8 | mMeteorTrailIntensity = 220 |
| float | mMinVelocity = 0.05f |
| CRGBPalette16 | mNoisePalette |
| float | mSpeed = 1.0f |
| float | mTimeMultiplier = 1.0f |
| fl::vector< CRGB > | mTrailBuffer |
Additional Inherited Members | |
Public Types inherited from fl::Fx | |
| using | DrawContext = ::fl::DrawContext |
Protected Member Functions inherited from fl::Fx | |
| virtual | ~Fx () FL_NOEXCEPT |
Protected Attributes inherited from fl::Fx1d | |
| XMap | mXMap |
Protected Attributes inherited from fl::Fx | |
| u16 | mNumLeds |