repositories
/
SugarCubes.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
956c6ce
)
distribution in SoundRain
author
Toby Segaran
<tobys@tobys-macbookpro2.local>
Thu, 15 Aug 2013 18:26:05 +0000
(11:26 -0700)
committer
Toby Segaran
<tobys@tobys-macbookpro2.local>
Thu, 15 Aug 2013 18:26:05 +0000
(11:26 -0700)
TobySegaran.pde
patch
|
blob
|
blame
|
history
diff --git
a/TobySegaran.pde
b/TobySegaran.pde
index 08e955481951e8333d5308889a3dbcc94507d449..0358668ace2961afef76d33431ef44ebce1194f5 100644
(file)
--- a/
TobySegaran.pde
+++ b/
TobySegaran.pde
@@
-185,8
+185,8
@@
class SoundRain extends SCPattern {
Strip s = c.strips.get(j);
if (j%4!=0 && j%4!=2) {
for (Point p : s.points) {
- int seq = int(p.fy*avgSize/model.yMax+pos.getValuef())%avgSize;
- seq=
abs(seq-(avgSize/2)
);
+ int seq = int(p.fy*avgSize/model.yMax+pos.getValuef()
+sin(p.fx+p.fz)*2
)%avgSize;
+ seq=
min(abs(seq-(avgSize/2)),avgSize-1
);
colors[p.index] = color(200,max(0,100-abs(p.fx-col1.getValuef())/2),lightVals[seq]);
}
}