Definition at line 380 of file perlin_particle_punch.cpp.hpp.
380 {
382 if (!d)
383 return;
384
385 float tailLen = m.tailLength();
387 if (maxOffset < 3)
388 maxOffset = 3;
389 float spawnOffset = float(
random8(2, maxOffset));
390 float spawnPos = m.position - spawnOffset;
391 if (spawnPos < 0.0f)
392 spawnPos = 0.0f;
393
394
395 float t = spawnOffset / tailLen;
400
401 d->alive = true;
402 d->position = spawnPos;
403 d->velocity = float(
random8(10, 40)) / 100.0f;
404 d->brightness = 180.0f;
405 d->color = debrisColor;
406 m.debrisSpawned++;
407}
DebrisParticle * tryAllocateDebris() FL_NO_EXCEPT
LIB8STATIC fl::u8 random8() FL_NO_EXCEPT
Generate an 8-bit random number.
u8 clamp_u8(float v) FL_NO_EXCEPT
u8 fract8
Fixed-Point Fractional Types.
CRGB blend(const CRGB &p1, const CRGB &p2, fract8 amountOfP2) FL_NO_EXCEPT
References fl::PerlinParticlePunch::DebrisParticle::alive, fl::blend(), fl::PerlinParticlePunch::DebrisParticle::brightness, fl::PerlinParticlePunch::DebrisParticle::color, fl::FL_NO_EXCEPT, mMeteorMidColor, mMeteorTailColor, fl::PerlinParticlePunch::DebrisParticle::position, random8(), fl::t, tryAllocateDebris(), and fl::PerlinParticlePunch::DebrisParticle::velocity.
Referenced by draw().