X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=ArjunBanker.pde;h=e4f1ec984acfad474f23a489c445084a8cd8fc44;hb=a521a50b10037871a64746a7d5c40ed5f38e59e3;hp=c8fe1a616b5c701d798231d13e4c9047b2836f11;hpb=6b163a98976a5f2adf9da1b7bd3297e39d6dd7bf;p=SugarCubes.git diff --git a/ArjunBanker.pde b/ArjunBanker.pde index c8fe1a6..e4f1ec9 100644 --- a/ArjunBanker.pde +++ b/ArjunBanker.pde @@ -5,8 +5,8 @@ class TelevisionStatic extends SCPattern { BasicParameter hueParameter = new BasicParameter("HUE", 1.0); SinLFO direction = new SinLFO(0, 10, 3000); - public TelevisionStatic(GLucose glucose) { - super(glucose); + public TelevisionStatic(LX lx) { + super(lx); addModulator(direction).trigger(); addParameter(brightParameter); addParameter(saturationParameter); @@ -15,7 +15,7 @@ class TelevisionStatic extends SCPattern { void run(double deltaMs) { boolean d = direction.getValuef() > 5.0; - for (Point p : model.points) { + for (LXPoint p : model.points) { colors[p.index] = lx.hsb((lx.getBaseHuef() + random(hueParameter.getValuef() * 360))%360, random(saturationParameter.getValuef() * 100), random(brightParameter.getValuef() * 100)); } } @@ -28,8 +28,8 @@ class AbstractPainting extends SCPattern { SinLFO colorMod = new SinLFO(0, 360, 5000); SinLFO brightMod = new SinLFO(0, model.zMax, 2000); - public AbstractPainting(GLucose glucose) { - super(glucose); + public AbstractPainting(LX lx) { + super(lx); addModulator(colorMod).trigger(); addModulator(brightMod).trigger(); @@ -38,7 +38,7 @@ class AbstractPainting extends SCPattern { } void run(double deltaMs) { - for (Point p : model.points) { + for (LXPoint p : model.points) { color c = img.get((int)((p.x / model.xMax) * img.width), img.height - (int)((p.y / model.yMax) * img.height)); colors[p.index] = lx.hsb(hue(c) + colorMod.getValuef()%360, saturation(c), brightness(c) - ((p.z - brightMod.getValuef())/p.z)); } @@ -52,10 +52,10 @@ class Spirality extends SCPattern { float rad = 0; int direction = 1; - Spirality(GLucose glucose) { - super(glucose); + Spirality(LX lx) { + super(lx); addParameter(r); - for (Point p : model.points) { + for (LXPoint p : model.points) { colors[p.index] = lx.hsb(0, 0, 0); } } @@ -65,7 +65,7 @@ class Spirality extends SCPattern { rad += deltaMs * .025 * direction; float x = model.xMax / 2 + cos(angle) * rad; float y = model.yMax / 2 + sin(angle) * rad; - for (Point p : model.points) { + for (LXPoint p : model.points) { float b = dist(x,y,p.x,p.y); if (b < 90) { colors[p.index] = blendColor(