Just a little sketch that works with the online versions of processing
in
Share your Work
•
3 years ago
This little code works with the following websites
www.sketchpatch.net http://www.sketchpatch.net/view/9rCW0WlslS9/
sketch.processing.org
I have to try it with psjsandbox
I just tried with www.sketchpatch.cc and it works great.
You can invite persons in and chat as well as work together.
www.sketchpatch.net http://www.sketchpatch.net/view/9rCW0WlslS9/
sketch.processing.org
- int k;
boolean forward;
void setup(){
size(255,255);
loadPixels();
smooth();
frameRate(3000);
ellipseMode(CENTER);
background(255);
noStroke();
// t= new color[233];
}
void draw(){
if (k>width-1)forward = false;
if (k<1)forward = true;
// background(233,23,23);
fill(233,23,23);
rect(2,0,width,height-2);
if (mouseX>45){
fill(1);
ellipse(mouseX,mouseY,35,35);
fill(-1);
ellipse(mouseX,mouseY,30,30);
for (int o=0;o<k;o++){
color a = pixels[o];
int _x =(int) red(a);
int _y = (int)green(a);
fill(1);
ellipse(_x,_y,35,35);
// fill(-1);
// ellipse(_x,_y,30,30);
}
for (int o=0;o<k;o++){
color a = pixels[o];
int _x =(int) red(a);
int _y = (int)green(a);
// fill(1);
// ellipse(_x,_y,35,35);
fill(-1);
//fill(_x,_y,_x,111);
ellipse(_x,_y,30,30);
}
if (forward) k++;
if (!forward)k--;
}
if (k>width-1)forward = false;
if (k<2)forward = true;
if (k>0 && k <width-1) pixels[k]=color(pmouseX,pmouseY,255);
}
I have to try it with psjsandbox
I just tried with www.sketchpatch.cc and it works great.
You can invite persons in and chat as well as work together.