From 75e1ddde6c913726c92711b327eb2cd2d835989a Mon Sep 17 00:00:00 2001 From: Mark Slee Date: Wed, 25 Sep 2013 13:18:50 -0700 Subject: [PATCH] Handle for boom effect and example of how to trigger --- SugarCubes.pde | 7 +++++-- _Internals.pde | 5 ++++- 2 files changed, 9 insertions(+), 3 deletions(-) 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; -- 2.34.1