From: Ben Morrow Date: Sat, 17 Aug 2013 22:55:55 +0000 (-0700) Subject: Sandbox Anim X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=a68abe8c9849804beaf4fd5ac2d346e7dc88f64d;p=SugarCubes.git Sandbox Anim --- diff --git a/BenMorrow.pde b/BenMorrow.pde index e69de29..bde4ddb 100644 --- a/BenMorrow.pde +++ b/BenMorrow.pde @@ -0,0 +1,35 @@ +class Sandbox extends SCPattern +{ + + LetsTry(GLucose glucose) { + super(glucose); + } + int c=0; + int huerange=255; + int cuberange = 74; + + int counter=0; + public void run(int deltaMs) { + Cube cube = model.cubes.get((int) c); + println("face length "+cube.faces.size()); + if(cube.faces.size()!=4) + { + for(Face f : cube.faces) + { + double col = Math.random()*255; + for(Point p: f.points) + { + colors[p.index] = color(Math.round(col),255,255); + } + } + + + } + if(counter% 3 ==0) + { + c = (c+1) % cuberange; + } + counter++; + println(c); + } +} \ No newline at end of file diff --git a/SugarCubes.pde b/SugarCubes.pde index 0f102e3..1d2de40 100644 --- a/SugarCubes.pde +++ b/SugarCubes.pde @@ -25,6 +25,7 @@ LXPattern[] patterns(GLucose glucose) { return new LXPattern[] { + new Sandbox(glucose), new HelixPattern(glucose), new ShiftingPlane(glucose), new AskewPlanes(glucose),