From 34903ae3ab0c55efff3ba5a40a4b25cbcae04a75 Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期一, 18 十二月 2023 16:54:04 +0800
Subject: [PATCH] #map latest test
---
src/main/webapp/views/console4.html | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/main/webapp/views/console4.html b/src/main/webapp/views/console4.html
index 3704024..ada2d4e 100644
--- a/src/main/webapp/views/console4.html
+++ b/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鏃跺彉涓烘墜鍨嬫寚閽�
@@ -655,12 +655,12 @@
if (shuttle.updateMoveStatus) {//鍔ㄧ敾鎵ц瀹屾垚鎵嶅彲缁х画鎵ц鍔ㄧ敾
shuttle.updateMoveStatus = false;//鍔ㄧ敾鎵ц涓�
// 璁$畻涓ょ偣涔嬮棿鐨勮窛绂�1
- const distance = Math.sqrt(Math.pow((item.point.x * width) - shuttle.x, 2) + Math.pow((item.point.y * height) - shuttle.y, 2));
+ 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.point.x * width, // 鐩爣浣嶇疆
- y: item.point.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({
--
Gitblit v1.9.1