xxxxxxxxxx
float x;
float y;
float px;
float py;
float easing = .05;
void setup(){
size(700,700);
background(#60E674);
smooth();
stroke(#FFB031);
}
void draw(){
float targetX = mouseX;
x+=(targetX - x) * easing;
float targetY = mouseY;
y+=(targetY - y) * easing;
int weight = 10;
strokeWeight(weight);
line(x,y,px,py);
py=y;
px=x;
if (mousePressed) {
stroke(#3199FF);
}else{
stroke(#FFB031);
if(keyPressed){
if(weight<250){
if(key == 'w'){
weight++;
}
}
if(weight>1){
if(key == 'e' ){
weight--;
}
}
}
}
}