Peformance tweaking, new library builds
[SugarCubes.git] / TestPatterns.pde
index f8d59eecd9f9a65eafc98ba678af3f5e8fdb601c..4c7899591a88e50bf338d2cf5b827c02509ce5fc 100644 (file)
@@ -1,3 +1,13 @@
+class BlankPattern extends SCPattern {
+  BlankPattern(GLucose glucose) {
+    super(glucose);
+  }
+  
+  public void run(double deltaMs) {
+    setColors(#000000);
+  }
+}
+
 abstract class TestPattern extends SCPattern {
   public TestPattern(GLucose glucose) {
     super(glucose);
@@ -130,7 +140,7 @@ class TestXPattern extends TestPattern {
       // You can use abs() to determine the distance between two
       // values. The further away this point is from an exact
       // point, the more we decrease its brightness
-      float bv = max(0, 100 - abs(p.fx - xPos.getValuef()));
+      float bv = max(0, 100 - abs(p.x - xPos.getValuef()));
       colors[p.index] = color(hv, 100, bv);
     }
   }
@@ -148,7 +158,7 @@ class TestYPattern extends TestPattern {
   public void run(double deltaMs) {
     float hv = lx.getBaseHuef();
     for (Point p : model.points) {
-      float bv = max(0, 100 - abs(p.fy - yPos.getValuef()));
+      float bv = max(0, 100 - abs(p.y - yPos.getValuef()));
       colors[p.index] = color(hv, 100, bv);
     }
   }
@@ -166,7 +176,7 @@ class TestZPattern extends TestPattern {
   public void run(double deltaMs) {
     float hv = lx.getBaseHuef();
     for (Point p : model.points) {
-      float bv = max(0, 100 - abs(p.fz - zPos.getValuef()));
+      float bv = max(0, 100 - abs(p.z - zPos.getValuef()));
       colors[p.index] = color(hv, 100, bv);
     }
   }