This commit is contained in:
赵鑫 2022-12-11 02:59:07 +08:00
parent 3c1b2dae42
commit d1d5aeacfe

View File

@ -180,8 +180,9 @@ class Vehicle {
noFill(); noFill();
stroke(50); stroke(50);
strokeWeight(1); strokeWeight(1);
// if (this.pathes.length >= 10) this.pathes.shift(); if (this.pathes.length >= 64) this.pathes.shift();
[...this.pathes, this.path].forEach((path) => { [...this.pathes, this.path].forEach((path) => {
if (path.length >= 1024) path.shift();
beginShape(); beginShape();
path.forEach((v) => vertex(v.x, v.y)); path.forEach((v) => vertex(v.x, v.y));
endShape(); endShape();