From 4f9153ba8e8da08b349ec5ee2e6e01f23340e7f5 Mon Sep 17 00:00:00 2001 From: Zhao Xin <7176466@qq.com> Date: Sun, 11 Dec 2022 03:27:17 +0800 Subject: [PATCH] update --- vehicle.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/vehicle.js b/vehicle.js index 66e2bb0..01cfa86 100644 --- a/vehicle.js +++ b/vehicle.js @@ -12,8 +12,8 @@ function setup() { function draw() { // 追逐鼠标(); // 逃避鼠标(); - // 巡游小车(); - 小车追逐(); + 巡游小车(); + // 小车追逐(); } function 追逐鼠标() { @@ -119,9 +119,9 @@ class Vehicle { const y = offset * sin(PI / 2 + this.heading); target.add(x, y); - // noStroke(); - // fill("#F063A4"); - // circle(target.x, target.y, 5); + noStroke(); + fill("#F063A4"); + circle(target.x, target.y, 5); const steering = target.sub(this.position); this.acceleration.add(steering); @@ -179,7 +179,7 @@ class Vehicle { noFill(); stroke(50); strokeWeight(1); - if (this.path.length >= 1024) this.path.shift(); + if (this.path.length >= 10240) this.path.shift(); beginShape(); this.path.forEach((v) => { if (!v) {