SOURCE

console 命令行工具 X clear

                    
>
console
let speed=3;
let d=50;
let x;
let y;
function setup(){
    createCanvas(480,480);
    colorMode(HSB,360,100,100,1)
    x=width/2;
    y=height/2;
    background(120);
}
function draw(){
    fill(random(360),50,100,1)
    x+=random(-speed,speed);
    y+=random(-speed,speed);
    triangle(x-60,y-110,x,y,x+60,y-110)
    }
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.1.9/p5.min.js"></script>