colors[p.index] = lx.hsb(
(lx.getBaseHuef() + 0.3 * abs(p.x - hOffX.getValuef())) % 360,
constrain(80 + 40 * fV, 0, 100),
- constrain(100 - (30 - fV * falloff.getValuef()) * modDist(i + (s*63)%61, offset.getValuef() * strip.metrics.numPoints, strip.metrics.numPoints), 0, 100)
+ constrain(100 -
+ (30 - fV * falloff.getValuef()) * modDist(i + (s*63)%61, offset.getValuef() * strip.metrics.numPoints, strip.metrics.numPoints), 0, 100)
);
++i;
- }
+ }
++s;
}
}
}
if (fSharp > 0) {
fSharp = 1/(1-fSharp);
- hsb[2] = hsb[2] < .5 ? pow(hsb[2],fSharp) : 1-pow(1-hsb[2],fSharp);
+ if (hsb[2] < .5) {
+ hsb[2] = pow(hsb[2],fSharp);
+ } else {
+ hsb[2] = 1-pow(1-hsb[2],fSharp);
+ }
}
if (fSoft > 0) {
if (hsb[2] > 0.5) {