Browse Source

fix: 图标弹跳参数

pull/1/head
高志龙 3 years ago
parent
commit
6fb263bfb5
  1. 20
      public/static/qm/MainMap_QM.js

20
public/static/qm/MainMap_QM.js

@ -1,4 +1,4 @@
var Map_QM, renderFrame = -1, pathCameraState, stats, stateTime, isJUZ = false, hasLine = false, dir = false, iot = false, shopTime, debug = false; //dir--自定义地图大小适应不同版本的地图大小
var Map_QM, renderFrame = -1, pathCameraState, stats, stateTime, isJUZ = false, hasLine = false, dir = false, iot = true, shopTime, debug = false; //dir--自定义地图大小适应不同版本的地图大小
//basePath 基础路径 graphPath最佳路径 ftPath 扶梯路径 dtPath 电梯路径 //basePath 基础路径 graphPath最佳路径 ftPath 扶梯路径 dtPath 电梯路径
var typeObj = [{ ft: 0, type: 0, code: 'ft', name: '扶梯' }, { upft: 1, type: 1, code: 'upft', name: '上扶梯' }, { downft: 2, type: 2, code: 'downft', name: '下扶梯' }, { mys: 3, type: 3, code: 'mys', name: '母婴室' }, { xsj: 4, type: 4, code: 'xsj', name: '洗手间' }, var typeObj = [{ ft: 0, type: 0, code: 'ft', name: '扶梯' }, { upft: 1, type: 1, code: 'upft', name: '上扶梯' }, { downft: 2, type: 2, code: 'downft', name: '下扶梯' }, { mys: 3, type: 3, code: 'mys', name: '母婴室' }, { xsj: 4, type: 4, code: 'xsj', name: '洗手间' },
@ -2166,10 +2166,6 @@ MainMap_QM.prototype = {
Map_QM.mapArr[t][i].labelObj.traverse((obj) => { Map_QM.mapArr[t][i].labelObj.traverse((obj) => {
obj.visible = false; obj.visible = false;
}); });
Map_QM.mapArr[t][i].iconLabel.traverse((obj) => {
obj.visible = false;
});
Map_QM.mapArr[t][i].tagObj.traverse((obj) => { Map_QM.mapArr[t][i].tagObj.traverse((obj) => {
obj.visible = false; obj.visible = false;
}); });
@ -2190,9 +2186,6 @@ MainMap_QM.prototype = {
Map_QM.mapArr[build][i].labelObj.traverse((obj) => { Map_QM.mapArr[build][i].labelObj.traverse((obj) => {
obj.visible = true; obj.visible = true;
}); });
Map_QM.mapArr[build][i].iconLabel.traverse((obj) => {
obj.visible = true;
});
Map_QM.mapArr[build][i].showTagObj.traverse((obj) => { Map_QM.mapArr[build][i].showTagObj.traverse((obj) => {
obj.visible = true; obj.visible = true;
}); });
@ -3500,7 +3493,7 @@ MainMap_QM.prototype = {
*/ */
/** /**
* @api {方法} bounceIcon({type:"xsj"}) 图标弹跳
* @api {方法} bounceIcon("xsj") 图标弹跳
* @apiGroup 地图导航 * @apiGroup 地图导航
* @apiDescription 地图图标弹跳效果 * @apiDescription 地图图标弹跳效果
* @apiVersion 4.0.0 * @apiVersion 4.0.0
@ -3510,7 +3503,7 @@ MainMap_QM.prototype = {
* *
* @apiParamExample {String} 请求示例 * @apiParamExample {String} 请求示例
* *
* Map_QM.bounceIcon({type:"xsj"});
* Map_QM.bounceIcon("xsj");
* *
*/ */
bounceIcon: function (iconType) { bounceIcon: function (iconType) {
@ -5121,9 +5114,6 @@ FloorMap_QM = function (bIndex, fIndex, floorName) {
this.allObj.rotation.x = Math.PI / -2; this.allObj.rotation.x = Math.PI / -2;
this.labelObj = new THREE.Group(); this.labelObj = new THREE.Group();
this.labelObj.renderOrder = 100; this.labelObj.renderOrder = 100;
this.iconLabel = new THREE.Group();
this.iconLabel.renderOrder = 100;
this.floorOrder = fIndex; this.floorOrder = fIndex;
this.buildOrder = bIndex this.buildOrder = bIndex
this.floorName = floorName; this.floorName = floorName;
@ -5145,7 +5135,6 @@ FloorMap_QM = function (bIndex, fIndex, floorName) {
this.allObj.add(this.serObj); this.allObj.add(this.serObj);
this.allObj.add(this.devObj); this.allObj.add(this.devObj);
this.allObj.add(this.labelObj); this.allObj.add(this.labelObj);
this.allObj.add(this.iconLabel);
this.allObj.add(this.tagObj); this.allObj.add(this.tagObj);
//标签 //标签
this.showTagObj = new THREE.Group(); this.showTagObj = new THREE.Group();
@ -6251,7 +6240,8 @@ Facilities_QM = function () {
shopDiv.dataset.nameEn = Map_QM.util.iconEn[obj.title]; shopDiv.dataset.nameEn = Map_QM.util.iconEn[obj.title];
let shopLabel = new THREE.CSS2DObject(shopDiv); let shopLabel = new THREE.CSS2DObject(shopDiv);
shopLabel.position.set(obj.x, -1 * obj.y, 30); shopLabel.position.set(obj.x, -1 * obj.y, 30);
_this.iconLabel.add(shopLabel);
shopLabel.userData.mapShow = true;
_this.labelObj.add(shopLabel);
} }
} }
} }

Loading…
Cancel
Save