|
|
|
@ -2203,6 +2203,7 @@ MainMap_QM.prototype = { |
|
|
|
* |
|
|
|
*/ |
|
|
|
showFloor: function (fIndex = -1, callBack = undefined) { |
|
|
|
Map_QM.changeMapModel("3D"); |
|
|
|
Map_QM.resetFloorState(); |
|
|
|
Map_QM.clearFloor(fIndex); |
|
|
|
if (fIndex != -1) { |
|
|
|
@ -2426,7 +2427,7 @@ MainMap_QM.prototype = { |
|
|
|
* |
|
|
|
*/ |
|
|
|
onShowDeviceSite: function () { |
|
|
|
this.changeMapModel("3D"); |
|
|
|
//this.changeMapModel("3D");
|
|
|
|
this.showFloor(this.util.deviceObj.floor); |
|
|
|
}, |
|
|
|
/** |
|
|
|
@ -2930,7 +2931,7 @@ MainMap_QM.prototype = { |
|
|
|
if(Map_QM.mapArr[Map_QM.util.selectBuild] && Map_QM.mapArr[Map_QM.util.selectBuild][Map_QM.util.selectFloor]){ |
|
|
|
Map_QM.labelRenderer.renderObject( Map_QM.mapArr[Map_QM.util.selectBuild][Map_QM.util.selectFloor].labelObj, Map_QM.camera ); |
|
|
|
} |
|
|
|
Map_QM.CSSObject && Map_QM.labelRenderer.renderObject( Map_QM.CSSObject, Map_QM.camera); |
|
|
|
Map_QM.CSSObject && Map_QM.labelRenderer.renderObject( Map_QM.CSSObject, Map_QM.camera); |
|
|
|
for (let item of Map_QM.mixers) { |
|
|
|
item.update(T); |
|
|
|
} |
|
|
|
@ -3053,13 +3054,13 @@ MainMap_QM.prototype = { |
|
|
|
*/ |
|
|
|
addElementByNode: function (divObj, node, type='tip') { |
|
|
|
Map_QM.elementDestroy(type); |
|
|
|
floorOrder == -1 && (floorOrder = Map_QM.util.selectFloor); |
|
|
|
let pathData = Config.allMap[Config.selectBuild].buildArr[floorOrder].mapData.path; |
|
|
|
let floorOrder = Map_QM.util.selectFloor; |
|
|
|
let pathData = Map_QM.util.allMap[Map_QM.util.selectBuild].buildArr[floorOrder].mapData.path; |
|
|
|
if (!pathData || !divObj ) { |
|
|
|
return; |
|
|
|
} |
|
|
|
if(pathData.nodes.length > 0){ |
|
|
|
pathData.nodes.sort(Config.sortNode); |
|
|
|
pathData.nodes.sort(Map_QM.util.sortNode); |
|
|
|
let shopInfo = new THREE.CSS2DObject(divObj); |
|
|
|
shopInfo.position.set(pathData.nodes[parseInt(node)].x, -1*pathData.nodes[parseInt(node)].y, 60 ) |
|
|
|
shopInfo.applyMatrix4(Map_QM.mapArr[Map_QM.util.selectBuild][floorOrder].allObj.matrix); |
|
|
|
@ -3070,6 +3071,25 @@ MainMap_QM.prototype = { |
|
|
|
return; |
|
|
|
}, |
|
|
|
|
|
|
|
showAreaAnimate:function (aName="-"){ |
|
|
|
if(aName=="-"){ |
|
|
|
isJUZ = false; |
|
|
|
Map_QM.controls.setZoom(1) |
|
|
|
Map_QM.controls.reset() |
|
|
|
let angle = Map_QM.util.options.deviceAng ? Map_QM.util.deviceObj.angle : Map_QM.util.mapAngle |
|
|
|
Map_QM.rotationAngle(angle) |
|
|
|
return; |
|
|
|
} |
|
|
|
TweenMax.killAll(true) |
|
|
|
Map_QM.mapArr[Map_QM.util.selectBuild][Map_QM.util.selectFloor].allObj.traverse((obj) => { |
|
|
|
if(obj.userData && obj.userData.type == "build"){ |
|
|
|
if(obj.name == aName){ |
|
|
|
Map_QM.onShowLocalSite({x:obj.userData.xaxis,y:obj.userData.yaxis}); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* @api {方法} changeShowShopName() 修改房间显示名称 |
|
|
|
* @apiGroup 地图显示 |
|
|
|
@ -3237,6 +3257,7 @@ MainMap_QM.prototype = { |
|
|
|
|
|
|
|
for (let i = 0; i < intersects.length; i++) { |
|
|
|
//房间BOX点击
|
|
|
|
console.log(intersects); |
|
|
|
if (intersects[i].object.userData && intersects[i].object.userData.type == "shop" && intersects[i].object.name != "") { |
|
|
|
if (Map_QM.endModel && Map_QM.endModel.visible) { |
|
|
|
Map_QM.endModel.visible = false; |
|
|
|
@ -5293,7 +5314,32 @@ FloorMap_QM.prototype = { |
|
|
|
}, |
|
|
|
initArt:function(){ |
|
|
|
if (Map_QM.util.artUrl.length > 0) { |
|
|
|
|
|
|
|
let _this = this; |
|
|
|
Map_QM.util.artUrl.forEach((item)=>{ |
|
|
|
let url = Map_QM.util.beforPath + item.content.icon[0]; |
|
|
|
let spriteMap = new THREE.TextureLoader().load(url); |
|
|
|
let spriteMaterial = new THREE.SpriteMaterial({ //sizeAttenuation: false 禁止跟随鼠标缩放
|
|
|
|
map: spriteMap, |
|
|
|
depthTest: true, |
|
|
|
transparent: true, |
|
|
|
alphaTest: 0.1 |
|
|
|
}); |
|
|
|
let sprite = new MySprite_QM(spriteMaterial); |
|
|
|
sprite.scale.set(64, 64, 1); |
|
|
|
sprite.imgUrl = url; |
|
|
|
sprite.center = new THREE.Vector2(0.5, 0); |
|
|
|
sprite.userData = item; |
|
|
|
sprite.userData.type = "art"; |
|
|
|
sprite.userData.use = "all"; |
|
|
|
sprite.userData.src = url; |
|
|
|
let pathData = Map_QM.util.allMap[_this.buildOrder].buildArr[_this.floorOrder].mapData.path; |
|
|
|
if(pathData.nodes.length > 0){ |
|
|
|
pathData.nodes.sort(Config.sortNode); |
|
|
|
sprite.position.set(pathData.nodes[parseInt(item.content.point)].x, -1*pathData.nodes[parseInt(item.content.point)].y, 60); |
|
|
|
sprite.renderOrder = 300; |
|
|
|
_this.serObj.add(sprite); |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
initLogos: function () { |
|
|
|
@ -5432,10 +5478,12 @@ FloorMap_QM.prototype = { |
|
|
|
mash.castShadow = false; |
|
|
|
mash.userData = { |
|
|
|
"type": "build", |
|
|
|
"order": this.floorOrder |
|
|
|
"order": this.floorOrder, |
|
|
|
"xaxis":mapData.buildArea[i].xaxis, |
|
|
|
"yaxis":mapData.buildArea[i].yaxis, |
|
|
|
}; |
|
|
|
mash.userData.opacity = mapData.buildArea[i].alphaModle / 100 || 0; |
|
|
|
mash.name = "floor"; |
|
|
|
mash.name = mapData.buildArea[i].name; |
|
|
|
this.allObj.add(mash); |
|
|
|
} |
|
|
|
//房间
|
|
|
|
@ -6147,7 +6195,7 @@ MyModel_QM.prototype.MyModelShape = function (areaArr, howllowArr, opObj, entity |
|
|
|
let cubeEdges = new THREE.EdgesGeometry(scanGeometry, 60); |
|
|
|
let cubeLine = new THREE.LineSegments(cubeEdges, material); |
|
|
|
cubeLine.renderOrder = indexOrder - 5; |
|
|
|
mesh.add(cubeLine); |
|
|
|
//mesh.add(cubeLine);
|
|
|
|
} |
|
|
|
if (opObj.name != "floor") { |
|
|
|
mesh.position.z = opObj.site || 0; |
|
|
|
|