From 443b9b204ec2f09f6f0b412f0faabf12fa4cd9a8 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期二, 22 十月 2024 15:42:28 +0800 Subject: [PATCH] # --- zy-acs-flow/src/map/tool.js | 3 +++ zy-acs-flow/src/map/player.js | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/zy-acs-flow/src/map/player.js b/zy-acs-flow/src/map/player.js index 72dd37a..e3acc62 100644 --- a/zy-acs-flow/src/map/player.js +++ b/zy-acs-flow/src/map/player.js @@ -376,9 +376,10 @@ } startupTicker = () => { - this.app.ticker.add((delta) => { + this.tweedle = (delta) => { TWEEDLE.Group.shared.update(); - }); + } + this.app.ticker.add(this.tweedle); } resize = (width, height) => { @@ -386,6 +387,8 @@ } destroy = () => { + TWEEDLE.Group.shared.removeAll(); + this.app.ticker.remove(this.tweedle); this.app.destroy(true, { children: true }); } diff --git a/zy-acs-flow/src/map/tool.js b/zy-acs-flow/src/map/tool.js index aa0c56e..c3a15d6 100644 --- a/zy-acs-flow/src/map/tool.js +++ b/zy-acs-flow/src/map/tool.js @@ -555,6 +555,9 @@ // diff let rotationDifference = targetRotation - currentRotation; + if (rotationDifference === 0) { + return; + } rotationDifference = ((rotationDifference + Math.PI) % (2 * Math.PI)) - Math.PI; // destination -- Gitblit v1.9.1