#
luxiaotao1123
2024-10-14 9dd2b6186b18c6d3281fe8c48f1ff4c2bc1fc8d7
zy-acs-flow/src/map/tool.js
@@ -76,11 +76,15 @@
        default:
            break;
    }
    if (sprite) {
        sprite.blendMode = PIXI.BLEND_MODES.MULTIPLY;
    }
    return sprite;
}
export const initSprite = (sprite, type) => {
    sprite.anchor.set(0.5);
    // sprite.alpha = 1;
    sprite.cursor = 'pointer';
    sprite.eventMode = 'static';
    sprite.data = {
@@ -245,7 +249,6 @@
    }
}
export const showSelectedEffect = (sprite) => {
    if (!sprite?.texture || !sprite?.texture?.valid) {
        return;
@@ -324,6 +327,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) {