From: Mark Slee Date: Tue, 20 Aug 2013 11:00:03 +0000 (-0700) Subject: Tweaking strip stuff and some anims X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=254fbb6855f64f25317a5226aa1bc5f47274251d;p=SugarCubes.git Tweaking strip stuff and some anims --- diff --git a/MarkSlee.pde b/MarkSlee.pde index 8c42a8c..0adbe55 100644 --- a/MarkSlee.pde +++ b/MarkSlee.pde @@ -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; } diff --git a/SugarCubes.pde b/SugarCubes.pde index 8012895..84cd64a 100644 --- a/SugarCubes.pde +++ b/SugarCubes.pde @@ -29,51 +29,31 @@ LXPattern[] patterns(GLucose glucose) { 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), }; } diff --git a/TestPatterns.pde b/TestPatterns.pde index 7ba68e9..6a2747a 100644 --- a/TestPatterns.pde +++ b/TestPatterns.pde @@ -5,6 +5,24 @@ abstract class TestPattern extends SCPattern { } } +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. diff --git a/TobySegaran.pde b/TobySegaran.pde index c5e19d2..443be5b 100644 --- a/TobySegaran.pde +++ b/TobySegaran.pde @@ -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())); diff --git a/_Internals.pde b/_Internals.pde index fbe7435..a18c95a 100644 --- a/_Internals.pde +++ b/_Internals.pde @@ -264,9 +264,12 @@ void drawSpeaker(Speaker s) { 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); diff --git a/_Mappings.pde b/_Mappings.pde index 78f7b0e..ed2d1d4 100644 --- a/_Mappings.pde +++ b/_Mappings.pde @@ -221,7 +221,7 @@ public Model buildModel() { BassBox bassBox = new BassBox(56, 0, 2); List speakers = new ArrayList(); - 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); diff --git a/code/GLucose.jar b/code/GLucose.jar index 1dc3928..c1bd9a3 100644 Binary files a/code/GLucose.jar and b/code/GLucose.jar differ