From 023afca2aa4ae3128d19d6eeb0bbcd20a78bf125 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期二, 12 三月 2024 15:36:52 +0800
Subject: [PATCH] #
---
zy-asrs-flow/src/pages/map/utils.js | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/zy-asrs-flow/src/pages/map/utils.js b/zy-asrs-flow/src/pages/map/utils.js
index c01b8d8..349652b 100644
--- a/zy-asrs-flow/src/pages/map/utils.js
+++ b/zy-asrs-flow/src/pages/map/utils.js
@@ -12,6 +12,10 @@
mapContainer = param;
}
+export function getMapContainer() {
+ return mapContainer;
+}
+
export const MapEvent = Object.freeze({
SELECTION_BOX: Symbol.for(0),
})
@@ -183,7 +187,9 @@
effectTick = (delta) => {
phase += delta / 10;
phase %= (Math.PI * 2);
- effectHalfCircle.rotation = phase;
+ if (effectHalfCircle) {
+ effectHalfCircle.rotation = phase;
+ }
};
app.ticker.add(effectTick);
@@ -203,6 +209,15 @@
}
}
+export const copySprite = (sprite) => {
+ const copiedSprite = new PIXI.Sprite(sprite.texture);
+ initSprite(copiedSprite);
+ copiedSprite.position.set(sprite.position.x, sprite.position.y);
+ copiedSprite.scale.set(sprite.scale.x, sprite.scale.y);
+ copiedSprite.rotation = sprite.rotation;
+ return copiedSprite;
+}
+
export const markSprite = (sprite) => {
sprite.alpha = 0.5;
}
--
Gitblit v1.9.1