X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=JackStahl.pde;h=a840882f26be1bfc28403da8e721ea491513062f;hb=a8d55ade10d68a95188105282c2c453816b20708;hp=dc28936fd2e4c2d88105c4b7896977ca5fdfa4a0;hpb=dc896277772b3c395f91f1683b1f156b4bcc45fd;p=SugarCubes.git diff --git a/JackStahl.pde b/JackStahl.pde index dc28936..a840882 100644 --- a/JackStahl.pde +++ b/JackStahl.pde @@ -34,7 +34,7 @@ class Swim extends SCPattern { int beat = 0; float prevRamp = 0; - void run(int deltaMs) { + void run(double deltaMs) { // Sync to the beat float ramp = (float)lx.tempo.ramp(); @@ -146,7 +146,7 @@ class Balance extends SCPattern { int beat = 0; float prevRamp = 0; - void run(int deltaMs) { + void run(double deltaMs) { // Sync to the beat float ramp = (float)lx.tempo.ramp(); @@ -172,7 +172,7 @@ class Balance extends SCPattern { float v1 = max(0, 100 * (1 - 4*abs(sin_x - y_in_range))); float hue_color = (lx.getBaseHuef() + hueScale.getValuef() * (abs(p.x-model.xMax/2.) + abs(p.y-model.yMax/2)*.2 + abs(p.z - model.zMax/2.)*.5)) % 360; - color c = color(hue_color, 60, v1); + color c = color(hue_color, 80, v1); // Now draw the spheres for (Sphere s : spheres) { @@ -195,7 +195,9 @@ class Balance extends SCPattern { float value = min(beat_value, distance_value); - c = blendColor(c, color((hue_color + 180) % 360, 100, min(1, value) * 100), ADD); + float sphere_color = (lx.getBaseHuef() - (1 - hueScale.getValuef()) * d/r * 45) % 360; + + c = blendColor(c, color((sphere_color + 270) % 360, 60, min(1, value) * 100), ADD); } colors[p.index] = c; }