SOURCE

console 命令行工具 X clear

                    
>
console
let color=[]
function setup(){
   createCanvas(500,500)
   background(255)
   for(let i=0;i<=3;i++){
       color[i]=random(255)
   }
}
function draw(){
    background(255,10000)
    push()
    fill(color[2])
    ellipse(20,20,50,50)
    pop()
    push()
    fill(color[1])
    rect(random(99,100),100,100,100)
    pop()
    push()
    fill(color[3])
    rect(300,200,78,78)
    pop()
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.1.9/p5.min.js"></script>