You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
uint32_t spread = (PartSys->maxX >> 5) * (SEGMENT.custom3 + 1); //fire around segment center (in subpixel points)
8356
-
numFlames = min((uint32_t)PartSys->numSources, (1 + ((spread / PS_P_RADIUS) << 1))); // number of flames used depends on spread with, good value is (fire width in pixel) * 2
8364
+
numFlames = min((uint32_t)PartSys->numSources, (2 + ((spread / PS_P_RADIUS) << 1))); // number of flames used depends on spread with, good value is (fire width in pixel) * 2
8357
8365
uint32_t percycle = numFlames*2/3;// / 2; // maximum number of particles emitted per cycle (TODO: for ESP826 maybe use flames/2)
8358
8366
// percycle = map(SEGMENT.intensity,0,255, 2, (numFlames*3) / 2); //TODO: does this give better flames or worse?
//if wall collisions are enabled, bounce them before they reach the edge, it looks much nicer if the particle is not half out of view
326
326
if (options.bounceX)
@@ -340,7 +340,7 @@ void ParticleSystem::particleMoveUpdate(PSparticle &part, PSsettings &options, P
340
340
bool isleaving = true;
341
341
if(usesize) //using individual particle size
342
342
{
343
-
if (((newX > -particleHardRadius) || (newX < maxX + particleHardRadius))) // large particle is not yet leaving the view - note: this is not pixel perfect but good enough
343
+
if (((newX > -particleHardRadius) && (newX < maxX + particleHardRadius))) // large particle is not yet leaving the view - note: this is not pixel perfect but good enough
if(renderbuffer) //set buffer to zero if it exists
724
-
{
725
-
memset(renderbuffer[0], 0, 100 * sizeof(CRGB)); // renderbuffer is 10x10 pixels. note: passing the buffer and setting it zero here is faster than creating a new buffer for every particle
726
-
}
727
-
728
-
renderParticle(framebuffer, i, brightness, baseRGB, renderbuffer);
729
722
723
+
renderParticle(framebuffer, i, brightness, baseRGB, renderbuffer);
if (particlesettings.wrapY) // wrap y to the other side if required
927
-
yfb = yfb % (maxYpixel + 1);
928
-
else
929
-
continue;
942
+
{
943
+
if (particlesettings.wrapY) // wrap y to the other side if required
944
+
yfb = yfb % (maxYpixel + 1);
945
+
else
946
+
continue;
947
+
}
948
+
930
949
//if(xfb < maxXpixel +1 && yfb < maxYpixel +1)
931
-
fast_color_add(framebuffer[xfb][yfb], renderbuffer[xrb][yrb]); //TODO: this is just a test, need to render to correct coordinates with out of frame checking
0 commit comments