Tweaking strip stuff and some anims
[SugarCubes.git] / MarkSlee.pde
index 5a15993dfd2d6f187b0bf8c346ca21568183a290..0adbe5589d680b8f9b5e4866067316587dd12f53 100644 (file)
@@ -37,7 +37,7 @@ class SpaceTime extends SCPattern {
     float fVal = falloff.getValuef();
 
     int s = 0;
-    for (Strip strip : model.allBoxStrips) {
+    for (Strip strip : model.strips) {
       int i = 0;
       for (Point p : strip.points) {
         colors[p.index] = color(
@@ -86,7 +86,7 @@ class Swarm extends SCPattern {
 
   void run(int deltaMs) {
     float s = 0;
-    for (Strip strip : model.allBoxStrips) {
+    for (Strip strip : model.strips  ) {
       int i = 0;
       for (Point p : strip.points) {
         float fV = max(-1, 1 - dist(p.fx/2., p.fy, fX.getValuef()/2., fY.getValuef()) / 64.);
@@ -452,7 +452,7 @@ class Blinders extends SCPattern {
         colors[p.index] = color(
           (hv + p.fz + p.fy*hs.getValuef()) % 360, 
           min(100, abs(p.fx - s.getValuef())/2.), 
-          max(0, 100 - mv/2. - mv * abs(i - 7.5))
+          max(0, 100 - mv/2. - mv * abs(i - (strip.metrics.length-1)/2.))
         );
         ++i;
       }