X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=TobySegaran.pde;h=05231294dda9040f2d9cff6225679518f80e4e27;hb=190d91c2948b274a2dbaf4ec07450b4ebf2feece;hp=32b6d82aaa6a321a274e6196f167dc23d84d0f8b;hpb=4214e9a2908a28344f1e90f98a645ebc2efa0fae;p=SugarCubes.git diff --git a/TobySegaran.pde b/TobySegaran.pde index 32b6d82..0523129 100644 --- a/TobySegaran.pde +++ b/TobySegaran.pde @@ -25,10 +25,10 @@ class GlitchPlasma extends SCPattern { public void run(double deltaMs) { for (Point p : model.points) { - float hv = sin(dist(p.fx + pos, p.fy, 128.0, 128.0) / 8.0) - + sin(dist(p.fx, p.fy, 64.0, 64.0) / 8.0) - + sin(dist(p.fx, p.fy + pos / 7, 192.0, 64.0) / 7.0) - + sin(dist(p.fx, p.fz + pos, 192.0, 100.0) / 8.0); + float hv = sin(dist(p.x + pos, p.y, 128.0, 128.0) / 8.0) + + sin(dist(p.x, p.y, 64.0, 64.0) / 8.0) + + sin(dist(p.x, p.y + pos / 7, 192.0, 64.0) / 7.0) + + sin(dist(p.x, p.z + pos, 192.0, 100.0) / 8.0); float bv = 100; colors[p.index] = color((hv+2)*50, satu, bv); } @@ -82,8 +82,8 @@ class FireEffect extends SCPattern { } for (Point p : model.points) { - int x = max(0,(int(p.fx)+int(p.fz))%xm); - int y = constrain(ym-int(p.fy),0,ym-1); + int x = max(0,(int(p.x)+int(p.z))%xm); + int y = constrain(ym-int(p.y),0,ym-1); colors[p.index] = flameColor(intensity[x][y]); } } @@ -116,7 +116,7 @@ class StripBounce extends SCPattern { for (Strip strip : model.strips) { for (int i=0;iavgSize) seq=avgSize-seq; seq=constrain(seq,0,avgSize-1); - float br=max(0, lightVals[seq]-p.fy); + float br=max(0, lightVals[seq]-p.y); colors[p.index] = color((dis*avgSize*65)/model.xMax,90,br); } }