Junjie
2023-12-18 34903ae3ab0c55efff3ba5a40a4b25cbcae04a75
#map latest test
1个文件已修改
12 ■■■■ 已修改文件
src/main/webapp/views/console4.html 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/console4.html
@@ -249,8 +249,8 @@
                const shuttle = new PIXI.Sprite(resources.shuttle.texture);
                shuttle.width = width
                shuttle.height = height
                shuttle.x = item.wcsPoint.x * width;//更新坐标x
                shuttle.y = item.wcsPoint.y * height;//更新坐标y
                shuttle.x = (item.wcsPoint.y - 0) * width;//更新坐标x
                shuttle.y = (item.wcsPoint.x - 1) * height;//更新坐标y
                shuttle.updateMoveStatus = true;//动画执行完成
                shuttle.interactive = true; // 必须要设置才能接收事件
                shuttle.buttonMode = true; // 让光标在hover时变为手型指针
@@ -658,9 +658,9 @@
          const distance = Math.sqrt(Math.pow((item.wcsPoint.x * width) - shuttle.x, 2) + Math.pow((item.wcsPoint.y * height) - shuttle.y, 2));
          gsap.killTweensOf(shuttle); // 杀死所有针对".class"的动画
          gsap.to(shuttle, {
            x: item.wcsPoint.x * width, // 目标位置
            y: item.wcsPoint.y * height, // 目标位置
            duration: distance / 100, // 动画持续时间(秒)
            x: (item.wcsPoint.y - 0) * width, // 目标位置
            y: (item.wcsPoint.x - 1) * height, // 目标位置
            duration: 0.2, // 动画持续时间(秒)
            ease: "power1.inOut", // 缓动类型
            onComplete: () => {
              shuttle.updateMoveStatus = true;//动画执行完成
@@ -824,7 +824,7 @@
        moveAdvancePath.forEach((path, idx) => {
          let locNo = that.getLocNoByXYZ(path.x, path.y, path.z);
          if (!pixiShuttleMoveAdvancePathMap.has(locNo)) {
            let graphics = getGraphics(0x9966ff, width, height, path.y * width, path.x * height);
            let graphics = getGraphics(0x9966ff, width, height, path.y * width, (path.x - 1) * height);
            let shuttleNos = [shuttleNo];
            // 创建文本对象
            const style = new PIXI.TextStyle({