if (abs(p.x - cx) < arm) {
d = min(abs(p.x - cx), abs(p.y - middle));
}
- colors[p.index] = color(
+ colors[p.index] = lx.hsb(
(lx.getBaseHuef() + .2*abs(p.y - model.cy)) % 360,
min(100, sf*dist(abs(p.x - cx), p.y, arm, middle)),
- max(0, 120 - d*falloff));
+ constrain(120 - d*falloff, 0, 100));
}
}
}
}
float posf = position.getValuef();
for (Point p : model.points) {
- colors[p.index] = blendColor(colors[p.index], color(
+ colors[p.index] = blendColor(colors[p.index], lx.hsb(
(lx.getBaseHuef() + .2*abs(p.x - model.cx) + .2*abs(p.y - model.cy)) % 360,
100,
max(0, bright - posf*100 - falloff*abs(p.y - posf*model.yMax))
for (Point p : s.points) {
int wavi = (int) constrain(p.x / model.xMax * wval.length, 0, wval.length-1);
float wavb = max(0, wave.getValuef()*100. - 8.*abs(p.y - wval[wavi]));
- colors[p.index] = color(
+ colors[p.index] = lx.hsb(
(lx.getBaseHuef() + .2*abs(p.x - model.cx) + .2*abs(p.y - model.cy)) % 360,
100,
constrain(wavb + max(0, maxBright - 40.*abs(sparklePos - abs(i - (Cube.POINTS_PER_STRIP-1)/2.))), 0, 100)