SOURCE

let x=10
let z=150
function setup(){
createCanvas(400,400);
background(0);
colorMode(HSB,125,100,100);
} 
function draw(){
strokeWeight(x)
stroke(z,40,40);
if(mouseIsPressed){
line(mouseX,mouseY,pmouseX,pmouseY)}
if(keyIsPressed){
if(key=='W'||key=='w')
z-=1
if(key=='Q'||key=='q')
z+=1
}
if(keyIsPressed){
if(key=='D'||(key=='d'))
x-=0.1
if(key=='A'||(key=='a'))
x+=0.1
} 
}
console 命令行工具 X clear

                    
>
console