+ float sparklePos = sparkle.getValuef() * Cube.POINTS_PER_STRIP * .75;
+ float maxBright = sparkleBright * (1 - sparkle.getValuef());
+ for (Strip s : model.strips) {
+ int i = 0;
+ for (Point p : s.points) {
+ colors[p.index] = color(
+ (lx.getBaseHuef() + .2*abs(p.x - model.cx) + .2*abs(p.y - model.cy)) % 360,
+ 100,
+ maxBright - 40.*abs(sparklePos - abs(i - (Cube.POINTS_PER_STRIP-1)/2.))
+ );
+ ++i;
+ }
+ }