}
}
+class ColorFuckerEffect extends SCEffect {
+
+ BasicParameter hueShift = new BasicParameter("HSHFT", 0);
+ BasicParameter sat = new BasicParameter("SAT", 1);
+ BasicParameter bright = new BasicParameter("BRT", 1);
+
+ ColorFuckerEffect(GLucose glucose) {
+ super(glucose);
+ addParameter(hueShift);
+ addParameter(bright);
+ addParameter(sat);
+ }
+
+ public void doApply(int[] colors) {
+ for (int i = 0; i < colors.length; ++i) {
+ colors[i] = color(
+ (hue(colors[i]) + hueShift.getValuef()*360.) % 360,
+ saturation(colors[i]) * sat.getValuef(),
+ brightness(colors[i]) * bright.getValuef()
+ );
+ }
+ }
+}
+
class TestCubePattern extends TestPattern {
private SawLFO index = new SawLFO(0, Cube.POINTS_PER_CUBE, Cube.POINTS_PER_CUBE*60);
debugUI.draw();
}
+ // TODO(dan): if you want to, here would be a good place to
+ // put in gamma correction, modifying the colors that get
+ // sent to the pandaboards, without mucking up the UI here
+
// TODO(mcslee): move into GLucose engine
for (PandaDriver p : pandaBoards) {
p.send(colors);