From 7b6259ad05bdb9121f3f5ad94f8fef37cfcbe3d4 Mon Sep 17 00:00:00 2001 From: gaozl Date: Tue, 2 Jul 2024 17:19:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AF=BC=E8=88=AAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/static/qm/MainMap_QM_go.js | 47 +++++++++++++++---------------- 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/public/static/qm/MainMap_QM_go.js b/public/static/qm/MainMap_QM_go.js index 81d0511..ffeeb99 100644 --- a/public/static/qm/MainMap_QM_go.js +++ b/public/static/qm/MainMap_QM_go.js @@ -3880,12 +3880,7 @@ MainMap_QM.prototype = { } }, getlocaleToScreen:function(object,vect){ - let standardVec; - if(vect){ - standardVec = object.localToWorld(vect).project(Map_QM.camera); - }else{ - standardVec = object.localToWorld(new THREE.Vector3()).project(Map_QM.camera); - } + let standardVec = object.localToWorld(vect).project(Map_QM.camera); const screenX = Math.round(Map_QM.w/2 * standardVec.x + Map_QM.w/2); const screenY = Math.round(Map_QM.h/-2 * standardVec.y + Map_QM.h/2); return {x:screenX, y:screenY}; @@ -5519,7 +5514,6 @@ MainMap_QM.prototype = { * @param {Object} endN */ onFindPath: function () { - console.log(Map_QM.forShopArr); TweenMax.killAll(true); if (Map_QM.util.overObj.floor == Map_QM.util.selectFloor && Map_QM.util.overObj.xaxis) { Map_QM.mapArr[Map_QM.util.overObj.build][Map_QM.util.overObj.floor].setOverSite(Map_QM.util.overObj.xaxis, Map_QM.util.overObj.yaxis,parseInt(Map_QM.util.shopHeight)); @@ -5528,23 +5522,28 @@ MainMap_QM.prototype = { Map_QM.endIcon && (Map_QM.endIcon.visible = false); } if (Map_QM.forShopArr.length > 0) { - const postArr = Map_QM.forShopArr[Map_QM.util._indexPathFloor].PathPoint; - const len = postArr.length; - let leftX = 50000, rightX=-50000, topY=50000, bottomY = -50000; - for(let i=0; i