SOURCE

let x=10
let z=180
function setup(){
createCanvas(500,500);
background(0);
colorMode(HSB,300,100,100);
}
function draw(){
strokeWeight(x);
stroke(z,80,80);
if(mouseIsPressed){
line(mouseX,mouseY,pmouseX,pmouseY);
if(keyIsPressed){
if(key=='Q')
z-=1
if(key=='W')
z+=1
}
if(keyIsPressed){
if(key=='A')
x-=0.1
if(key=='S')
x+=0.1
}
}
}

console 命令行工具 X clear

                    
>
console