diff --git a/flame.lua b/flame.lua index fc05a29..dfb3bc2 100644 --- a/flame.lua +++ b/flame.lua @@ -156,12 +156,12 @@ function periodic() --print(i, pos_r[i]) end - -- make colors more exciting + -- make colors more exciting + remove the first (flickering) mass for i = 1,num_modules do - red[i] = limit(OVERDRIVE * math.pow(r_tmp[i], EXPONENT)) - green[i] = limit(OVERDRIVE * math.pow(g_tmp[i], EXPONENT)) - blue[i] = limit(OVERDRIVE * math.pow(b_tmp[i], EXPONENT)) - white[i] = limit(OVERDRIVE * math.pow(w_tmp[i], W_EXPONENT)) + red[i] = limit(OVERDRIVE * r_tmp[i+1]^EXPONENT) + green[i] = limit(OVERDRIVE * g_tmp[i+1]^EXPONENT) + blue[i] = limit(OVERDRIVE * b_tmp[i+1]^EXPONENT) + white[i] = limit(OVERDRIVE * w_tmp[i+1]^W_EXPONENT) end -- return the 4 color arrays @@ -172,7 +172,7 @@ function init(nmod, cmod) num_modules = nmod center_module = nmod --cmod - num_masses = nmod --math.floor(nmod/2) + num_masses = nmod+1 --math.floor(nmod/2) excitement_pos = 1 for i = 1,nmod do