通过修改geometry点位动态调整圆面大小(也可使用scale实现)
// 动态更新半径的函数
updateRadius(circleGeometry, newRadius) {
const position = circleGeometry.attributes.position;
const count = position.count;
for (let i = 1; i < count; i++) {
const x = position.getX(i);
const y = position.getY(i);
const length = Math.sqrt(x * x + y * y);
// 更新顶点位置
position.setXYZ(i, (x / length) * newRadius, (y / length) * newRadius, 0);
}
position.needsUpdate = true; // 通知 Three.js 顶点数据已更新
}

浙公网安备 33010602011771号