New script particles.lua

This commit is contained in:
Thomas Kolb 2020-06-18 19:54:30 +00:00
parent 5ac566b1f5
commit f172a2d1f2

View file

@ -4,7 +4,7 @@ EXPONENT=1.3
W_EXPONENT=1.8 W_EXPONENT=1.8
OVERDRIVE=1 OVERDRIVE=1
FADE_FACTOR = 0.94 FADE_FACTOR = 0.94
AVG_LEDS_ACTIVATED = 0.03 AVG_LEDS_ACTIVATED = 0.05
num_modules = 1 num_modules = 1
num_strips = 1 num_strips = 1
@ -51,7 +51,7 @@ function distributeEnergy(newEnergy, energyArray)
remainingEnergy = AVG_LEDS_ACTIVATED * newEnergy * num_modules * num_strips remainingEnergy = AVG_LEDS_ACTIVATED * newEnergy * num_modules * num_strips
while remainingEnergy > 0 do while remainingEnergy > 0 do
rndEnergy = math.random() * newEnergy * 2 rndEnergy = math.random() * newEnergy * 5
rndStrip = math.floor(math.random() * num_strips) rndStrip = math.floor(math.random() * num_strips)
rndModule = math.floor(math.random() * num_modules) rndModule = math.floor(math.random() * num_modules)