mirror of
https://github.com/dyne/FreeJ.git
synced 2026-06-16 12:59:33 +02:00
progresses on processing script
processing-js 0.4 has been merged in some relevant parts basic and topic scripts added for test color handling fixed, more scripts show up now
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
int barWidth = 5;
|
||||
int[] saturation;
|
||||
|
||||
void setup()
|
||||
{
|
||||
size(200, 200);
|
||||
colorMode(HSB, 360, height, height);
|
||||
saturation = new int[width/barWidth];
|
||||
}
|
||||
|
||||
void draw()
|
||||
{
|
||||
int j = 0;
|
||||
for (int i=0; i<=(width-barWidth); i+=barWidth) {
|
||||
noStroke();
|
||||
if ((mouseX > i) && (mouseX < i+barWidth)) {
|
||||
saturation[j] = mouseY;
|
||||
}
|
||||
fill(i, saturation[j], height/1.5);
|
||||
rect(i, 0, barWidth, height);
|
||||
j++;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user