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 | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/main/webapp/views/console4.html b/src/main/webapp/views/console4.html
index 1347f85..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鏃跺彉涓烘墜鍨嬫寚閽�
@@ -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({
--
Gitblit v1.9.1