From: Mark Slee Date: Wed, 25 Sep 2013 20:18:50 +0000 (-0700) Subject: Handle for boom effect and example of how to trigger X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=75e1ddde6c913726c92711b327eb2cd2d835989a;p=SugarCubes.git Handle for boom effect and example of how to trigger --- diff --git a/SugarCubes.pde b/SugarCubes.pde index 2156bad..5ce6927 100644 --- a/SugarCubes.pde +++ b/SugarCubes.pde @@ -22,7 +22,7 @@ * If you're an artist, create a new tab in the Processing environment with * your name. Implement your classes there, and add them to the list below. */ - + LXPattern[] patterns(GLucose glucose) { return new LXPattern[] { @@ -121,10 +121,13 @@ LXTransition[] transitions(GLucose glucose) { }; } +// Handles to globally triggerable effects +BoomEffect boom; + LXEffect[] effects(GLucose glucose) { return new LXEffect[] { new FlashEffect(lx), - new BoomEffect(glucose), + boom = new BoomEffect(glucose), new BlurEffect(glucose), new DesaturationEffect(lx), new ColorFuckerEffect(glucose), diff --git a/_Internals.pde b/_Internals.pde index eba174c..0b8949d 100644 --- a/_Internals.pde +++ b/_Internals.pde @@ -410,7 +410,10 @@ void keyPressed() { case '=': case '+': frameRate(++targetFramerate); - break; + break; + case 'b': + boom.trigger(); + break; case 'd': if (!midiEngine.isQwertyEnabled()) { debugMode = !debugMode;