Processing Forum
I've worked out a solution to my issue, but struggling with the syntax.
In a nutshell, I want the strokeWeight to increase the quicker the mouse moves.
So far:
void setup() {
size(200,200);
background(255);
smooth();
}
for (int abs < 5) {
strokeWeight()=strokeWeight+1; //increase stroke weight
if (abs =+ 5; abs -= 10) {
strokeWeight()=strokeWeight+2;
if (abs =+ 11) {
strokeWeight()=strokeWeight+3;
void draw() {
stroke(0);
strokeWeight(1);
abs(mouseX-pmouseX);
line(pmouseX,pmouseY,mouseX,mouseY);
}
Thank you in advance!