Open main menu

CDOT Wiki β

Changes

FSOSS 2010/processing.js/example6

89 bytes added, 12:20, 26 October 2010
no edit summary
/*
FSOSS 2010
Andor Salga
Example of line, ArrayList, mousePressed, mouseReleased
*/
boolean drawingLine = false;
float lineX;
float lineY;
ArrayList lineCoords;
void setup(){
size(300, 300);
lineCoords = new ArrayList();
}
void draw(){
background(33, 66, 99);
}
}
/*
Function gets called once, as soon as the
lineY = (float) mouseY;
}
/*
Function gets called once, as soon as the
lineCoords.add((float) mouseX);
lineCoords.add((float) mouseY);
println(lineX + " " + lineY + " " + mouseX + " " + mouseY);
}
</source>
[http://studio.sketchpad.cc/???? JzipgTGyKN Run me]
1
edit