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;
}
new AskewPlanes(glucose),
new Swarm(glucose),
new SpaceTime(glucose),
- new HelixPattern(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
- new Swim(glucose),
- // new Breathe(glucose),
-
-
- new TimPlanes(glucose),
- new TimPinwheels(glucose),
- new TimRaindrops(glucose),
- new TimCubes(glucose),
- //new TimTrace(glucose),
- new TimSpheres(glucose),
-
- //Ben
- new DriveableCrossSections(glucose),
- new GranimTestPattern2(glucose),
- //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),
};
}
}
}
+class TestStripPattern extends TestPattern {
+ public TestStripPattern(GLucose glucose) {
+ super(glucose);
+ }
+
+ 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 - 10*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.
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()));
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);
BassBox bassBox = new BassBox(56, 0, 2);
List<Speaker> speakers = new ArrayList<Speaker>();
- speakers.add(new Speaker(0, 6, 0, 15));
+ 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);