Merge branch 'master' of https://github.com/jackstah/SugarCubes into jackstah-master
authorMark Slee <mcslee@Mark-Slees-MacBook-Pro.local>
Tue, 20 Aug 2013 19:36:43 +0000 (12:36 -0700)
committerMark Slee <mcslee@Mark-Slees-MacBook-Pro.local>
Tue, 20 Aug 2013 19:36:43 +0000 (12:36 -0700)
Conflicts:
SugarCubes.pde

MarkSlee.pde
SugarCubes.pde
TestPatterns.pde
TobySegaran.pde
_Internals.pde
_Mappings.pde
code/GLucose.jar

index f955f97bd32474d7997ae50da122b729c73fa607..8799b83d568e296e6d96439247501791b7386248 100644 (file)
@@ -1,6 +1,6 @@
 class SpaceTime extends SCPattern {
 
-  SinLFO pos = new SinLFO(0, 15, 3000);
+  SinLFO pos = new SinLFO(0, 1, 3000);
   SinLFO rate = new SinLFO(1000, 9000, 13000);
   SinLFO falloff = new SinLFO(10, 70, 5000);
   float angle = 0;
@@ -8,8 +8,10 @@ class SpaceTime extends SCPattern {
   BasicParameter rateParameter = new BasicParameter("RATE", 0.5);
   BasicParameter sizeParameter = new BasicParameter("SIZE", 0.5);
 
+
   public SpaceTime(GLucose glucose) {
     super(glucose);
+    
     addModulator(pos).trigger();
     addModulator(rate).trigger();
     addModulator(falloff).trigger();    
@@ -39,10 +41,10 @@ class SpaceTime extends SCPattern {
       int i = 0;
       for (Point p : strip.points) {
         colors[p.index] = color(
-        (lx.getBaseHuef() + 360 - p.fx*.2 + p.fy * .3) % 360, 
-        constrain(.4 * min(abs(s - sVal1), abs(s - sVal2)), 20, 100),
-        max(0, 100 - fVal*abs(i - pVal))
-          );
+          (lx.getBaseHuef() + 360 - p.fx*.2 + p.fy * .3) % 360, 
+          constrain(.4 * min(abs(s - sVal1), abs(s - sVal2)), 20, 100),
+          max(0, 100 - fVal*abs(i - pVal*(strip.metrics.numPoints - 1)))
+        );
         ++i;
       }
       ++s;
@@ -52,7 +54,7 @@ class SpaceTime extends SCPattern {
 
 class Swarm extends SCPattern {
 
-  SawLFO offset = new SawLFO(0, 16, 1000);
+  SawLFO offset = new SawLFO(0, 1, 1000);
   SinLFO rate = new SinLFO(350, 1200, 63000);
   SinLFO falloff = new SinLFO(15, 50, 17000);
   SinLFO fX = new SinLFO(0, model.xMax, 19000);
@@ -61,6 +63,7 @@ class Swarm extends SCPattern {
 
   public Swarm(GLucose glucose) {
     super(glucose);
+    
     addModulator(offset).trigger();
     addModulator(rate).trigger();
     addModulator(falloff).trigger();
@@ -83,14 +86,14 @@ class Swarm extends SCPattern {
 
   void run(int deltaMs) {
     float s = 0;
-    for (Strip strip : model.strips) {
+    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.);
         colors[p.index] = color(
         (lx.getBaseHuef() + 0.3 * abs(p.fx - hOffX.getValuef())) % 360, 
         constrain(80 + 40 * fV, 0, 100), 
-        constrain(100 - (30 - fV * falloff.getValuef()) * modDist(i + (s*63)%61, offset.getValuef(), 16), 0, 100)
+        constrain(100 - (30 - fV * falloff.getValuef()) * modDist(i + (s*63)%61, (int) (offset.getValuef() * strip.metrics.numPoints), strip.metrics.numPoints), 0, 100)
           );
         ++i;
       }
@@ -368,8 +371,7 @@ class CrossSections extends SCPattern {
     addParams();
   }
   
-  public void addParams()
-  {
+  protected void addParams() {
     addParameter(xr);
     addParameter(yr);
     addParameter(zr);    
@@ -380,8 +382,8 @@ class CrossSections extends SCPattern {
     addParameter(yw);    
     addParameter(zw);
   }
-
-  public void onParameterChanged(LXParameter p) {
+  
+  void onParameterChanged(LXParameter p) {
     if (p == xr) {
       x.setDuration(10000 - 8800*p.getValuef());
     } else if (p == yr) {
@@ -390,20 +392,18 @@ class CrossSections extends SCPattern {
       z.setDuration(10000 - 9000*p.getValuef());
     }
   }
-
-  float xv;
-  float yv;
-  float zv;  
-
-  public void updateXYZVals()
-  {
+  
+  float xv, yv, zv;
+  
+  protected void updateXYZVals() {
     xv = x.getValuef();
     yv = y.getValuef();
-    zv = z.getValuef(); 
+    zv = z.getValuef();    
   }
 
   public void run(int deltaMs) {
-    updateXYZVals();   
+    updateXYZVals();
+    
     float xlv = 100*xl.getValuef();
     float ylv = 100*yl.getValuef();
     float zlv = 100*zl.getValuef();
@@ -463,7 +463,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;
       }
index 401a2fb15daeee89738cf68a720f9107ad50174c..67c230d3f718de16c55b0b9e26fb371033f56f0a 100644 (file)
@@ -30,18 +30,19 @@ LXPattern[] patterns(GLucose glucose) {
     new AskewPlanes(glucose),
     new Swarm(glucose),
     new SpaceTime(glucose),
+    new HelixPattern(glucose).setEligible(false),
     new Pong(glucose),
     new Noise(glucose),
     new Blinders(glucose),
     new CrossSections(glucose),
     new Psychedelia(glucose),
-    new CubeEQ(glucose),
-    new PianoKeyPattern(glucose),
+    new CubeEQ(glucose).setEligible(false),
+    new PianoKeyPattern(glucose).setEligible(false),
     new GlitchPlasma(glucose),
-    new FireEffect(glucose),
+    new FireEffect(glucose).setEligible(false),
     new StripBounce(glucose),
-    new SoundRain(glucose),
-    new SoundSpikes(glucose),
+    new SoundRain(glucose).setEligible(false),
+    new SoundSpikes(glucose).setEligible(false),
     new FaceSync(glucose),
 
     // Jack
@@ -52,27 +53,26 @@ LXPattern[] patterns(GLucose glucose) {
     new TimPinwheels(glucose),
     new TimRaindrops(glucose),
     new TimCubes(glucose),
-    //new TimTrace(glucose),
+    // new TimTrace(glucose),
     new TimSpheres(glucose),
 
-    //Ben
+    // Ben
     new DriveableCrossSections(glucose),
     new GranimTestPattern2(glucose),
-    
-    //Sam
+     
+    // Sam
     new JazzRainbow(glucose),
-
+    
     // Basic test patterns for reference, not art    
     new TestCubePattern(glucose),
     new TestTowerPattern(glucose),
     new TestProjectionPattern(glucose),
+    new TestStripPattern(glucose),
     // new TestHuePattern(glucose),
     // new TestXPattern(glucose),
     // new TestYPattern(glucose),
     // new TestZPattern(glucose),
 
-    //slow for now, relegated to the bottom until faster!
-    new HelixPattern(glucose),
   };
 }
 
index 14572a261a00aed742cde23da645fe14d082f94d..51402f289467be3709e768c82606218be23f1b2d 100644 (file)
@@ -5,6 +5,28 @@ abstract class TestPattern extends SCPattern {
   }
 }
 
+class TestStripPattern extends TestPattern {
+  
+  SinLFO d = new SinLFO(4, 40, 4000);
+  
+  public TestStripPattern(GLucose glucose) {
+    super(glucose);
+    addModulator(d).trigger();
+  }
+  
+  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 - d.getValuef()*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.
@@ -158,11 +180,11 @@ class TestProjectionPattern extends TestPattern {
     for (Coord c : projection) {
       float d = sqrt(c.x*c.x + c.y*c.y + c.z*c.z); // distance from origin
       // d = abs(d-60) + max(0, abs(c.z) - 20); // life saver / ring thing
-      d = max(0, abs(c.y) - 10 + .3*abs(c.z) + .08*abs(c.x)); // plane / spear thing
+      d = max(0, abs(c.y) - 10 + .1*abs(c.z) + .02*abs(c.x)); // plane / spear thing
       colors[c.index] = color(
         (hv + .6*abs(c.x) + abs(c.z)) % 360,
         100,
-        constrain(140 - 10*d, 0, 100)
+        constrain(140 - 40*d, 0, 100)
       );
     }
   } 
@@ -343,15 +365,13 @@ class MappingTool extends TestPattern {
   }
   
   public void incStrip() {
-    int stripsPerCube = Cube.FACES_PER_CUBE * Face.STRIPS_PER_FACE;
-    stripIndex = (stripIndex + 1) % stripsPerCube;
+    stripIndex = (stripIndex + 1) % Cube.STRIPS_PER_CUBE;
   }
   
   public void decStrip() {
-    int stripsPerCube = Cube.FACES_PER_CUBE * Face.STRIPS_PER_FACE;
     --stripIndex;
     if (stripIndex < 0) {
-      stripIndex += stripsPerCube;
+      stripIndex += Cube.STRIPS_PER_CUBE;
     }
   }
   
index c5e19d25efe1034450cad8a4a38d3fe93d8666d8..443be5b053b8bbdf3c333a3ec9b247774c064580 100644 (file)
@@ -213,16 +213,16 @@ class FaceSync extends SCPattern {
 
   public void run(int deltaMs) {
     int i=0;
-    for (Cube c : model.cubes) {
+    for (Strip s : model.strips) {
       i++;
-      for (Point p : c.points) {
+      for (Point p : s.points) {
         float dx, dz;
-        if (i%2==0) {
-          dx = p.fx - (c.cx+xosc.getValuef());
-          dz = p.fz - (c.cz+zosc.getValuef());
+        if (i%32 < 16) {
+          dx = p.fx - (s.cx+xosc.getValuef());
+          dz = p.fz - (s.cz+zosc.getValuef());
         } else {
-          dx = p.fx - (c.cx+zosc.getValuef());
-          dz = p.fz - (c.cz+xosc.getValuef());
+          dx = p.fx - (s.cx+zosc.getValuef());
+          dz = p.fz - (s.cz+xosc.getValuef());
         }                
         //println(dx);
         float a1=max(0,100-abs(p.fx-col1.getValuef()));
index 1b32abd1b17c647202ddc631a4e7df04b3de9813..a18c95a21ea48d57a05dd3bba15c1e254e9785ae 100644 (file)
@@ -34,16 +34,11 @@ import rwmidi.*;
 final int VIEWPORT_WIDTH = 900;
 final int VIEWPORT_HEIGHT = 700;
 
+// The trailer is measured from the outside of the black metal (but not including the higher welded part on the front)
 final float TRAILER_WIDTH = 240;
 final float TRAILER_DEPTH = 97;
 final float TRAILER_HEIGHT = 33;
 
-final float BASS_WIDTH = 124;
-final float BASS_HEIGHT = 31.5;
-final float BASS_DEPTH = 66;
-final float BASS_X = (TRAILER_WIDTH - BASS_WIDTH) / 2.;
-final float BASS_Z = (TRAILER_DEPTH - BASS_DEPTH) / 2.;
-
 int targetFramerate = 60;
 
 int startMillis, lastMillis;
@@ -181,8 +176,10 @@ void draw() {
   endShape();
   
   noStroke();
-  fill(#393939);
-  drawBox(BASS_X, 0, BASS_Z, 0, 0, 0, BASS_WIDTH, BASS_HEIGHT, BASS_DEPTH, Cube.CHANNEL_WIDTH);
+  drawBassBox(glucose.model.bassBox);
+  for (Speaker s : glucose.model.speakers) {
+    drawSpeaker(s);
+  }
   for (Cube c : glucose.model.cubes) {
     drawCube(c);
   }
@@ -193,7 +190,6 @@ void draw() {
   for (Point p : glucose.model.points) {
     stroke(colors[p.index]);
     vertex(p.fx, p.fy, p.fz);
-    // println(p.fx + ":" + p.fy + ":" + p.fz);
   }
   endShape();
   
@@ -215,11 +211,71 @@ void draw() {
   }
 }
 
+void drawBassBox(BassBox b) {
+  float in = .15;
+
+  noStroke();
+  fill(#191919);
+  pushMatrix();
+  translate(b.x + BassBox.EDGE_WIDTH/2., b.y + BassBox.EDGE_HEIGHT/2, b.z + BassBox.EDGE_DEPTH/2.);
+  box(BassBox.EDGE_WIDTH-20*in, BassBox.EDGE_HEIGHT-20*in, BassBox.EDGE_DEPTH-20*in);
+  popMatrix();
+
+  noStroke();
+  fill(#393939);
+  drawBox(b.x+in, b.y+in, b.z+in, 0, 0, 0, BassBox.EDGE_WIDTH-in*2, BassBox.EDGE_HEIGHT-in*2, BassBox.EDGE_DEPTH-in*2, Cube.CHANNEL_WIDTH-in);
+
+  pushMatrix();
+  translate(b.x + (Cube.CHANNEL_WIDTH-in)/2., b.y + BassBox.EDGE_HEIGHT/2., b.z + in);
+  for (int j = 0; j < 2; ++j) {
+    pushMatrix();
+    for (int i = 0; i < BassBox.NUM_FRONT_STRUTS; ++i) {
+      translate(BassBox.FRONT_STRUT_SPACING, 0, 0);
+      box(Cube.CHANNEL_WIDTH-in, BassBox.EDGE_HEIGHT - in*2, 0);
+    }
+    popMatrix();
+    translate(0, 0, BassBox.EDGE_DEPTH - 2*in);
+  }
+  popMatrix();
+  
+  pushMatrix();
+  translate(b.x + in, b.y + BassBox.EDGE_HEIGHT/2., b.z + BassBox.SIDE_STRUT_SPACING + (Cube.CHANNEL_WIDTH-in)/2.);
+  box(0, BassBox.EDGE_HEIGHT - in*2, Cube.CHANNEL_WIDTH-in);
+  translate(BassBox.EDGE_WIDTH-2*in, 0, 0);
+  box(0, BassBox.EDGE_HEIGHT - in*2, Cube.CHANNEL_WIDTH-in);
+  popMatrix();
+  
+}
+
 void drawCube(Cube c) {
   float in = .15;
+  noStroke();
+  fill(#393939);  
   drawBox(c.x+in, c.y+in, c.z+in, c.rx, c.ry, c.rz, Cube.EDGE_WIDTH-in*2, Cube.EDGE_HEIGHT-in*2, Cube.EDGE_WIDTH-in*2, Cube.CHANNEL_WIDTH-in);
 }
 
+void drawSpeaker(Speaker s) {
+  float in = .15;
+  
+  noStroke();
+  fill(#191919);
+  pushMatrix();
+  translate(s.x, s.y, s.z);
+  rotate(s.ry / 180. * PI, 0, -1, 0);
+  translate(Speaker.EDGE_WIDTH/2., Speaker.EDGE_HEIGHT/2., Speaker.EDGE_DEPTH/2.);
+  box(Speaker.EDGE_WIDTH-20*in, Speaker.EDGE_HEIGHT-20*in, Speaker.EDGE_DEPTH-20*in);
+  translate(0, Speaker.EDGE_HEIGHT/2. + Speaker.EDGE_HEIGHT*.8/2, 0);
+
+  fill(#222222);
+  box(Speaker.EDGE_WIDTH*.6, Speaker.EDGE_HEIGHT*.8, Speaker.EDGE_DEPTH*.75);
+  popMatrix();
+  
+  noStroke();
+  fill(#393939);  
+  drawBox(s.x+in, s.y+in, s.z+in, 0, s.ry, 0, Speaker.EDGE_WIDTH-in*2, Speaker.EDGE_HEIGHT-in*2, Speaker.EDGE_DEPTH-in*2, Cube.CHANNEL_WIDTH-in);
+}  
+
+
 void drawBox(float x, float y, float z, float rx, float ry, float rz, float xd, float yd, float zd, float sw) {
   pushMatrix();
   translate(x, y, z);
index 967048f1ca0cc157f56bbfc45e11cec1d3a0e3ee..ed2d1d43b8b424485614940d7ce8d23ca4740256 100644 (file)
@@ -41,22 +41,24 @@ public Model buildModel() {
   
   final float STACKED_RELATIVE = 1;
   final float STACKED_REL_SPIN = 2;
+  final float BASS_DEPTH = BassBox.EDGE_DEPTH + 4;
   
   TowerMapping[] mapping = new TowerMapping[] {
-    
-    new TowerMapping(0, 0, 0, new float[][] {
-      {STACKED_RELATIVE, 0, 0},
-      {STACKED_RELATIVE, 5, -10, 20},
-      {STACKED_RELATIVE, 0, -6},
-      {STACKED_RELATIVE, -5, -2, -20},
-    }),
 
-    new TowerMapping(Cube.EDGE_WIDTH + 2, 0, 0, new float[][] {
-      {STACKED_RELATIVE, 0, 0},
-      {STACKED_RELATIVE, 0, 5, 10},
-      {STACKED_RELATIVE, 0, 2, 20},
-      {STACKED_RELATIVE, 0, 0, 30},
-    }),
+      // Front left cubes
+//    new TowerMapping(0, 0, 0, new float[][] {
+//      {STACKED_RELATIVE, 0, 0},
+//      {STACKED_RELATIVE, 5, -10, 20},
+//      {STACKED_RELATIVE, 0, -6},
+//      {STACKED_RELATIVE, -5, -2, -20},
+//    }),
+//
+//    new TowerMapping(Cube.EDGE_WIDTH + 2, 0, 0, new float[][] {
+//      {STACKED_RELATIVE, 0, 0},
+//      {STACKED_RELATIVE, 0, 5, 10},
+//      {STACKED_RELATIVE, 0, 2, 20},
+//      {STACKED_RELATIVE, 0, 0, 30},
+//    }),
     
     // Back Cubes behind DJ platform (in order of increasing x)
     new TowerMapping(50, 5, BASS_DEPTH, new float[][] {
@@ -100,68 +102,68 @@ public Model buildModel() {
     }),
     
     // front DJ cubes
-    new TowerMapping((TRAILER_WIDTH - BASS_WIDTH)/2, BASS_HEIGHT, 10, new float[][] {
+    new TowerMapping((TRAILER_WIDTH - BassBox.EDGE_WIDTH)/2, BassBox.EDGE_HEIGHT, 10, new float[][] {
       {STACKED_RELATIVE, 0, 0},
       {STACKED_RELATIVE, 0, -10, 20},
     }),
     
-    new TowerMapping((TRAILER_WIDTH - BASS_WIDTH)/2 + Cube.EDGE_HEIGHT, BASS_HEIGHT, 10, new float[][] {
+    new TowerMapping((TRAILER_WIDTH - BassBox.EDGE_WIDTH)/2 + Cube.EDGE_HEIGHT, BassBox.EDGE_HEIGHT, 10, new float[][] {
       {STACKED_RELATIVE, 3, 0},
       {STACKED_RELATIVE, 2, -10, 20},
     }),
     
-    new TowerMapping((TRAILER_WIDTH - BASS_WIDTH)/2 + 2*Cube.EDGE_HEIGHT + 5, BASS_HEIGHT, 10, new float[][] {
+    new TowerMapping((TRAILER_WIDTH - BassBox.EDGE_WIDTH)/2 + 2*Cube.EDGE_HEIGHT + 5, BassBox.EDGE_HEIGHT, 10, new float[][] {
       {STACKED_RELATIVE, 0, 0},
       {STACKED_RELATIVE, 1, 0, 10},
     }),
     
-    new TowerMapping((TRAILER_WIDTH - BASS_WIDTH)/2 + 3*Cube.EDGE_HEIGHT + 9, BASS_HEIGHT, 10, new float[][] {
+    new TowerMapping((TRAILER_WIDTH - BassBox.EDGE_WIDTH)/2 + 3*Cube.EDGE_HEIGHT + 9, BassBox.EDGE_HEIGHT, 10, new float[][] {
       {STACKED_RELATIVE, 0, 0},
       {STACKED_RELATIVE, -1, 0},
     }),
     
-    new TowerMapping((TRAILER_WIDTH - BASS_WIDTH)/2 + 4*Cube.EDGE_HEIGHT + 15, BASS_HEIGHT, 10, new float[][] {
+    new TowerMapping((TRAILER_WIDTH - BassBox.EDGE_WIDTH)/2 + 4*Cube.EDGE_HEIGHT + 15, BassBox.EDGE_HEIGHT, 10, new float[][] {
       {STACKED_RELATIVE, 0, 0},
       {STACKED_RELATIVE, -1, 0},
     }),
     
     // left dj cubes    
-    new TowerMapping((TRAILER_WIDTH - BASS_WIDTH)/2, BASS_HEIGHT, Cube.EDGE_HEIGHT + 2, new float[][] {
+    new TowerMapping((TRAILER_WIDTH - BassBox.EDGE_WIDTH)/2, BassBox.EDGE_HEIGHT, Cube.EDGE_HEIGHT + 2, new float[][] {
       {STACKED_RELATIVE, 0, 0},
       {STACKED_RELATIVE, 0, 2, 20},
     }),
     
-    new TowerMapping((TRAILER_WIDTH - BASS_WIDTH)/2, BASS_HEIGHT, 2*Cube.EDGE_HEIGHT + 4, new float[][] {
+    new TowerMapping((TRAILER_WIDTH - BassBox.EDGE_WIDTH)/2, BassBox.EDGE_HEIGHT, 2*Cube.EDGE_HEIGHT + 4, new float[][] {
       {STACKED_RELATIVE, 0, 0},
       {STACKED_RELATIVE, 0, 2, 20},
     }),
     
     // right dj cubes    
-    new TowerMapping((TRAILER_WIDTH - BASS_WIDTH)/2 + 4*Cube.EDGE_HEIGHT + 15, BASS_HEIGHT, Cube.EDGE_HEIGHT + 2, new float[][] {
+    new TowerMapping((TRAILER_WIDTH - BassBox.EDGE_WIDTH)/2 + 4*Cube.EDGE_HEIGHT + 15, BassBox.EDGE_HEIGHT, Cube.EDGE_HEIGHT + 2, new float[][] {
       {STACKED_RELATIVE, 0, 0},
       {STACKED_RELATIVE, 0, 2, 20},
     }),
     
-    new TowerMapping((TRAILER_WIDTH - BASS_WIDTH)/2 + 4*Cube.EDGE_HEIGHT + 15, BASS_HEIGHT, 2*Cube.EDGE_HEIGHT + 4, new float[][] {
+    new TowerMapping((TRAILER_WIDTH - BassBox.EDGE_WIDTH)/2 + 4*Cube.EDGE_HEIGHT + 15, BassBox.EDGE_HEIGHT, 2*Cube.EDGE_HEIGHT + 4, new float[][] {
       {STACKED_RELATIVE, 0, 0},
       {STACKED_RELATIVE, 0, 2, 20},
     }),
 
-    new TowerMapping(200, 0, 0, new float[][] {
-      {STACKED_RELATIVE, 0, 10},
-      {STACKED_RELATIVE, 5, 0, 20},
-      {STACKED_RELATIVE, 0, 4},
-      {STACKED_RELATIVE, -5, 8, -20},
-      {STACKED_RELATIVE, 0, 3},
-    }),
+//    new TowerMapping(200, 0, 0, new float[][] {
+//      {STACKED_RELATIVE, 0, 10},
+//      {STACKED_RELATIVE, 5, 0, 20},
+//      {STACKED_RELATIVE, 0, 4},
+//      {STACKED_RELATIVE, -5, 8, -20},
+//      {STACKED_RELATIVE, 0, 3},
+//    }),
     
-    new TowerMapping(0, 0, Cube.EDGE_HEIGHT + 10, new float[][] {
-      {STACKED_RELATIVE, 10, 0, 40},
-      {STACKED_RELATIVE, 3, -2, 20},
-      {STACKED_RELATIVE, 0, 0, 40},
-      {STACKED_RELATIVE, 0, 0, 60},
-      {STACKED_RELATIVE, 0, 0, 40},
-    }),
+//    new TowerMapping(0, 0, Cube.EDGE_HEIGHT + 10, new float[][] {
+//      {STACKED_RELATIVE, 10, 0, 40},
+//      {STACKED_RELATIVE, 3, -2, 20},
+//      {STACKED_RELATIVE, 0, 0, 40},
+//      {STACKED_RELATIVE, 0, 0, 60},
+//      {STACKED_RELATIVE, 0, 0, 40},
+//    }),
     
     new TowerMapping(20, 0, 2*Cube.EDGE_HEIGHT + 18, new float[][] {
       {STACKED_RELATIVE, 0, 0, 40},
@@ -171,13 +173,13 @@ public Model buildModel() {
       {STACKED_RELATIVE, 12, 0, 40},
     }),
     
-    new TowerMapping(210, 0, Cube.EDGE_HEIGHT + 15, new float[][] {
-      {STACKED_RELATIVE, 0, 0, 40},
-      {STACKED_RELATIVE, 5, 0, 20},
-      {STACKED_RELATIVE, 8, 0, 40},
-      {STACKED_RELATIVE, 3, 0, 60},
-      {STACKED_RELATIVE, 0, 0, 40},
-    }),
+//    new TowerMapping(210, 0, Cube.EDGE_HEIGHT + 15, new float[][] {
+//      {STACKED_RELATIVE, 0, 0, 40},
+//      {STACKED_RELATIVE, 5, 0, 20},
+//      {STACKED_RELATIVE, 8, 0, 40},
+//      {STACKED_RELATIVE, 3, 0, 60},
+//      {STACKED_RELATIVE, 0, 0, 40},
+//    }),
     
     new TowerMapping(210, 0, 2*Cube.EDGE_HEIGHT + 25, new float[][] {
       {STACKED_RELATIVE, 0, 0, 40},
@@ -215,8 +217,14 @@ public Model buildModel() {
     }
     towerList.add(new Tower(tower));
   }
-       
-  return new Model(towerList, cubes);
+
+  BassBox bassBox = new BassBox(56, 0, 2);
+
+  List<Speaker> speakers = new ArrayList<Speaker>();
+  speakers.add(new Speaker(-12, 6, 0, 15));
+  speakers.add(new Speaker(TRAILER_WIDTH - Speaker.EDGE_WIDTH, 6, 6, -15));
+
+  return new Model(towerList, cubes, bassBox, speakers);
 }
 
 public PandaMapping[] buildPandaList() {
@@ -239,10 +247,10 @@ public PandaMapping[] buildPandaList() {
       { 37, 38, 39, 40 }, // ch10
       { 41, 42, 43, 44 }, // ch11
       { 45, 46, 47, 48 }, // ch12
-      { 49, 50, 51, 52 }, // ch13
-      { 53, 54, 55, 56 }, // ch14
-      { 57, 58, 59, 60 }, // ch15
-      { 61, 62, 63, 64 }, // ch16
+      { 33, 34, 35, 36 }, // ch13
+      { 37, 38, 39, 40 }, // ch14
+      { 41, 42, 43, 44 }, // ch15
+      { 45, 46, 47, 48 }, // ch16
     }),
     
   };
index 54b4b706c11da63d6ebdae3b92eab06d903c732e..9b2d5b098f5c983d79ace4a0264136fe139d224c 100644 (file)
Binary files a/code/GLucose.jar and b/code/GLucose.jar differ