Skip to content

Commit 891115e

Browse files
committed
bugfix
1 parent 0fe722e commit 891115e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

wled00/FX.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8977,6 +8977,7 @@ uint16_t mode_particlegalaxy(void) {
89778977
PartSys->sources[0].sourceFlags.perpetual = true; //source does not age
89788978
PartSys->sources[0].maxLife = 4000; // lifetime in frames
89798979
PartSys->sources[0].minLife = 800;
8980+
PartSys->sources[0].source.hue = hw_random16(); // start with random color
89808981
PartSys->setWallHardness(255); //bounce forever
89818982
PartSys->setWallRoughness(200); //randomize wall bounce
89828983
}
@@ -9017,7 +9018,6 @@ uint16_t mode_particlegalaxy(void) {
90179018
int32_t speedfactor;
90189019
if (SEGMENT.check2) { // starfield mode
90199020
PartSys->setKillOutOfBounds(true);
9020-
PartSys->sources[0].source.hue = hw_random16(); // start with random color
90219021
PartSys->sources[0].var = 7; // emiting variation
90229022
PartSys->sources[0].source.x = PartSys->maxX >> 1; // set emitter to center
90239023
PartSys->sources[0].source.y = PartSys->maxY >> 1;
@@ -9045,7 +9045,7 @@ uint16_t mode_particlegalaxy(void) {
90459045
PartSys->particles[i].sat = distance << 1; // turn white towards center
90469046
}
90479047
}
9048-
if(SEGMENT.custom3 == 31) // color by age but mapped to 1024 as particles have a long life, since age is random, this gives more or less random colors
9048+
if(SEGMENT.custom3 == 31) // color by age but mapped to 1024 as particles have a long life, since age is random, this gives more or less random colors but
90499049
PartSys->particles[i].hue = PartSys->particles[i].ttl >> 2;
90509050
else if(SEGMENT.custom3 == 0) // color by distance
90519051
PartSys->particles[i].hue = map(distance, 20, (PartSys->maxX + PartSys->maxY) >> 2, 0, 180); // color by distance to center

0 commit comments

Comments
 (0)