SOURCE

console 命令行工具 X clear

                    
>
console
let color=[];
let d=[];
function setup(){
    createCanvas(500,500);
    rectMode(CENTER);
    background(255);
    noStroke();
    for(let i=0;i<9;i++){
    color[i]=random(255);
}
for(let i=0;i<3;i++){
d[i]=random(100,200);
}
for(let i=0;i<3;i++){
let index=i*3;
fill(color[index],color[index+1],color[index+2]);
rect(random(width),random(height),d[i],d[i]);
}
}
function draw(){
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.1.9/p5.min.js"></script>