Return to Snippet

Revision: 29802
at August 4, 2010 23:46 by S_Park


Initial Code
void draw() {
  stroke(255);
  strokeWeight(abs(mouseX-pmouseX));
  if (mousePressed && mouseButton == RIGHT) {
    background(0);
    println (mouseButton);
  } else if (mousePressed && mouseButton == LEFT) {
    line(pmouseX,pmouseY,mouseX,mouseY);
  }
}

Initial URL


Initial Description
Draw line on mousedown.\r\nLine width based on mouse movement.

Initial Title
Line Drawing (mouse speed)

Initial Tags
line

Initial Language
Processing