SOURCE

console 命令行工具 X clear

                    
>
console
let p=[];
let x=0;
let y=0;
let body=500;
let eye=120;
let boxWidth=9
let boxHeight=9


function setup(){
    createCanvas(1000,1000);
    background(0);
    colorMode(HSB,360,100,100)
    frameRate(60);
    for(let i=0;i<500;i++){
        p[i]=new
Rabbit(random(width),random(height),random(120),random(0.1,0.3),random(1,3));       
  
function draw(){
   //脚
   noStroke();
   fill(random(360),100,100);
   ellipse(x+250,y+body+300,50,100)   
   ellipse(x+350,y+body+300,50,100)
   //手和身体
   fill(random(360),100,100);
   ellipse(x+150,y+600,60,235);
   ellipse(x+430,y+600,60,235);
   fill(mouseX/60*x,mouseY/60*y,100);
   fill(random(360),100,100)
   rect(x+165,y+300,250,body,boxWidth,boxHeight);
   

   noStroke();
   fill(0,0,100);
   ellipse(180,150,60,235);
   ellipse(400,150,60,235);
   fill(random(360),100,100)
   ellipse(180,150,30,200);
   ellipse(400,150,30,200);
   fill(0,0,100);
   ellipse(300,300,380,350);
   fill(0,51,41);
   ellipse(220,250,60,60);
   ellipse(370,250,60,60);
   fill(0,0,100);
   ellipse(200,250,20,20);
   ellipse(350,250,20,20);
   fill(0,27,98)
   ellipse(300,400,80,50);
   fill(0,0,98)
   ellipse(290,391,10,30);
   ellipse(310,391,10,30);
   fill(random(360),100,100);
   ellipse(200,350,40,40);
   ellipse(390,350,40,40);
}
function draw(){
    background(200);
    for(let i=0;i<p;lengthi++){
        p[i].move();
        p[i].display();
    }
}
    }
}
 
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.1.9/p5.min.js"></script>