SOURCE

var a=480;
var b=43;
var speed=150;
function setup(){
    createCanvas(500,500);
    background(200);
    noStroke();
    rectMode(CENTER);
}
function draw(){
    fill(255,160,120);
    rect(0,0,1000,50);
    rect(5,2,50,870);
    rect(500,435,50,750);
    rect(85,450,30,230);
    rect(250,500,500,50);
    rect(225,350,300,30);
    rect(85,100,30,382);
    rect(215,250,30,200);
    rect(215,50,30,100);
    rect(150,130,30,160);
    rect(180,280,80,30);
    rect(425,150,30,560);
    rect(280,415,280,30);
    rect(290,160,30,280);
    rect(355,160,30,280);
    rect(380,200,80,30);
    fill(random(360),75,100,5);
    ellipse(a,b,25,25);
}
function keyPressed(){
  if(key=='A'){
   a-=20;
  }
  if(key=='D'){
   a+=20;
  }
}
 
function keyReleased(){
  if(key=='W'){
   b-=20;
  }
  if(key=='S'){
   b+=20;
  }
}
console 命令行工具 X clear

                    
>
console