From bb61bc0c22ae4ef9963ca00d23b5cf0c412f26f5 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期六, 12 十月 2024 14:47:35 +0800 Subject: [PATCH] # --- zy-acs-flow/src/map/tool.js | 15 ++++++++++++++- 1 files changed, 14 insertions(+), 1 deletions(-) diff --git a/zy-acs-flow/src/map/tool.js b/zy-acs-flow/src/map/tool.js index 7bcd534..58e6aaf 100644 --- a/zy-acs-flow/src/map/tool.js +++ b/zy-acs-flow/src/map/tool.js @@ -245,7 +245,6 @@ } } - export const showSelectedEffect = (sprite) => { if (!sprite?.texture || !sprite?.texture?.valid) { return; @@ -324,6 +323,20 @@ effectHalfCircle.position.set(sprite.x, sprite.y); } +export const rotationToNum = (rotation) => { + let res = rotation * 180 / Math.PI; + if (res < 0) { + res += 360; + } else if (res > 360) { + res -= 360; + } + return res; +} + +export const rotationParseNum = (num) => { + return num * Math.PI / 180; +} + export const incrementSpriteNo = (str, incrementValue) => { const match = str.match(/(\D*)(\d+)/); if (match) { -- Gitblit v1.9.1