L8on's life
[SugarCubes.git] / BenMorrow.pde
index 1eb8ae195e7244601ed00bc7c015551591c41d19..51945a8de70b68902a180e0979a8996d43a43cbb 100644 (file)
@@ -50,7 +50,6 @@ class TowerParams extends SCPattern
                }
                towerSize = model.towers.size();
                colorSpan = 255 / towerSize;
-               println("towers "+towerSize);
        }
 
        void run(double deltaMs)
@@ -60,11 +59,11 @@ class TowerParams extends SCPattern
                for(int i=0; i<towerSize ;i++)
                {       
                        t= model.towers.get(i);
-                       for(Point p : t.points)
+                       for(LXPoint p : t.points)
                        {
                                if(p.y<towerParams.get(i).getValuef()*200)
                                {
-                                       colors[p.index]=color(255 * hueoff.getValuef()+colorSpan * hueSpan.getValuef() * i, 255, 255);
+                                       colors[p.index]=lx.hsb(255 * hueoff.getValuef()+colorSpan * hueSpan.getValuef() * i, 255, 255);
                                }
                        }
                }
@@ -73,7 +72,7 @@ class TowerParams extends SCPattern
 
        public void clearALL()
        {
-               for(Point p : model.points)
+               for(LXPoint p : model.points)
                {
                        colors[p.index] = 0;
                }
@@ -108,7 +107,7 @@ class Sandbox extends SCPattern
                {
                        doDraw(c,0);
                        c = (c + 1) % towerrange;
-                       long col = color(Math.round(Math.random()*255),255,255) ;
+                       long col = lx.hsb(Math.round(Math.random()*255),255,255) ;
                        doDraw(c,col);
                }
                counter++;
@@ -118,7 +117,7 @@ class Sandbox extends SCPattern
        public void doDraw(int c,long col)
        {
                        Tower t= model.towers.get((int) c);
-                       for(Point p : t.points)
+                       for(LXPoint p : t.points)
                        {
                                colors[p.index] = (int) col;
                        }
@@ -187,7 +186,7 @@ class GranimTestPattern2 extends GranimPattern
        }
        public void clearALL()
        {
-               for(Point p : model.points)
+               for(LXPoint p : model.points)
                {
                        colors[p.index] = 0;
                }