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();
stroke(50);
strokeWeight(1);
// if (this.pathes.length >= 10) this.pathes.shift();
if (this.pathes.length >= 64) this.pathes.shift();
[...this.pathes, this.path].forEach((path) => {
if (path.length >= 1024) path.shift();
beginShape();
path.forEach((v) => vertex(v.x, v.y));
endShape();