X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=ArjunBanker.pde;h=6af635a6286bcb7b755606dbd36ada5176dd00ba;hb=34327c962351112e07c3d93f56ffc543fac45b58;hp=dcd5faec4f3a5660c6bd969fcfc7209c1bd846b1;hpb=a898d79bac007404bed34365f31ffbc6480c901c;p=SugarCubes.git diff --git a/ArjunBanker.pde b/ArjunBanker.pde index dcd5fae..6af635a 100644 --- a/ArjunBanker.pde +++ b/ArjunBanker.pde @@ -13,7 +13,7 @@ class TelevisionStatic extends SCPattern { addParameter(hueParameter); } - void run(int deltaMs) { + void run(double deltaMs) { boolean d = direction.getValuef() > 5.0; for (Point p : model.points) { colors[p.index] = color((lx.getBaseHuef() + random(hueParameter.getValuef() * 360))%360, random(saturationParameter.getValuef() * 100), random(brightParameter.getValuef() * 100)); @@ -37,7 +37,7 @@ class AbstractPainting extends SCPattern { img.loadPixels(); } - void run(int deltaMs) { + void run(double deltaMs) { for (Point 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] = color(hue(c) + colorMod.getValuef()%360, saturation(c), brightness(c) - ((p.fz - brightMod.getValuef())/p.fz)); @@ -60,7 +60,7 @@ class Spirality extends SCPattern { } } - public void run(int deltaMs) { + public void run(double deltaMs) { angle += deltaMs * 0.007; rad += deltaMs * .025 * direction; float x = model.xMax / 2 + cos(angle) * rad;