This commit is contained in:
赵鑫 2022-12-17 23:43:34 +08:00
parent 117feac931
commit 5c8e3ae20c

View File

@ -32,14 +32,14 @@
stroke("rgba(128,128,255,0.8)"); stroke("rgba(128,128,255,0.8)");
fill("rgba(128,128,255,0.8)"); fill("rgba(128,128,255,0.8)");
beginShape(); beginShape();
for (let θ = 0; θ < 180; θ++) { for (let θ = 0; θ < 360; θ+=3) {
let d = r * sin(θ * 3); let d = r * sin(θ * 3);
vertex(cos(θ) * d, -sin(θ) * d); vertex(cos(θ) * d, -sin(θ) * d);
} }
endShape(CLOSE); endShape(CLOSE);
speed = lerp(speed, speeds[gear], acceleration); speed = lerp(speed, speeds[gear], acceleration);
angle = angle =
(angle + anglePerFrame * (speed * random(0.95, 1.05))) % (angle + anglePerFrame * (speed * random(0.99, 1.01))) %
360; 360;
pop(); pop();
} }