From 254fbb6855f64f25317a5226aa1bc5f47274251d Mon Sep 17 00:00:00 2001 From: Mark Slee Date: Tue, 20 Aug 2013 04:00:03 -0700 Subject: [PATCH] Tweaking strip stuff and some anims --- MarkSlee.pde | 2 +- SugarCubes.pde | 34 +++++++--------------------------- TestPatterns.pde | 18 ++++++++++++++++++ TobySegaran.pde | 14 +++++++------- _Internals.pde | 5 ++++- _Mappings.pde | 2 +- code/GLucose.jar | Bin 24478 -> 24475 bytes 7 files changed, 38 insertions(+), 37 deletions(-) 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 1dc39286906713d6648e1638fc107b75fd5f0fad..c1bd9a30d5499fe4b34250888c8d973b580e2606 100644 GIT binary patch delta 3296 zcmZ9Oc{o)4`^RU-SjrT`kS&aT2-&hzM#efrYD}16vLqq0Q>L=-%t%=xk)13ddzdUw zDN9;pi?U5(JUtYt@0_}RS69FD$9aA3_kEww`JDS)*L}SUy1{wfV3@5H8+1Pi#03KF zif6)5kR9<%?Q{rhJ&1%%iDxooSa%v6d<1|oSc#RV`G6IFiz2iJFdwk&2desjSMbj)Sdf8|f2y38os?z2t<3W4`;2%?hT) z(imJuJHn#%{&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