Tweaking strip stuff and some anims
[SugarCubes.git] / TestPatterns.pde
index 7ba68e98d4bc17f0e25d47097b8eba673eb23181..6a2747a3f86de5c8d201d74f1825bc1d4b0032df 100644 (file)
@@ -5,6 +5,24 @@ abstract class TestPattern extends SCPattern {
   }
 }
 
+class TestStripPattern extends TestPattern {
+  public TestStripPattern(GLucose glucose) {
+    super(glucose);
+  }
+  
+  public void run(int deltaMs) {
+    for (Strip s : model.strips) {
+      for (Point p : s.points) {
+        colors[p.index] = color(
+          lx.getBaseHuef(),
+          100,
+          max(0, 100 - 10*dist(p.x, p.y, s.cx, s.cy))
+        );
+      }
+    }
+  }
+}
+
 /**
  * Simplest demonstration of using the rotating master hue.
  * All pixels are full-on the same color.