Browse Source

竖版地图位置代码固定

Reviewed-on: #10
master v1.1.1
朱志育 7 months ago
parent
commit
e724cc6935
  1. 48
      public/static/qm/MainMap_QM.js

48
public/static/qm/MainMap_QM.js

@ -204,7 +204,7 @@ var QMUtil = function () {
seldtFacNo: { type: "", no: "" },
};
this.timeObj = { collTime: -1, pathTime: -1 };
this.sceneGap = { cameraX: 0, cameraY: 220, cameraZ: 220, x: 0, y: 0, z: 0, scale: 0.08 }; //改变地图位置,大小
this.sceneGap = { cameraX: 15, cameraY: 220, cameraZ: 220, x: 15, y: 0, z: 0, scale: 0.08 }; //改变地图位置,大小
this.isMorePath = false; //多节点寻路模式
this.selectBuild = 0;
this.selectFloor = 0;
@ -1571,7 +1571,7 @@ MainMap_QM.prototype = {
this.util.allMap[this.util.selectBuild].hasOwnProperty("shopStyle") && (this.util.options.shopStyle = this.util.allMap[this.util.selectBuild].shopStyle);
this.util.allMap[this.util.selectBuild].hasOwnProperty("modelIcon") && (this.util.options.modelIcon = this.util.allMap[this.util.selectBuild].modelIcon);
this.util.allMap[this.util.selectBuild].hasOwnProperty("facSize") && (this.util.options.facSize = this.util.allMap[this.util.selectBuild].facSize);
this.util.allMap[this.util.selectBuild].hasOwnProperty("m_scale") && (this.util.sceneGap.scale = this.util.allMap[this.util.selectBuild].m_scale);
//this.util.allMap[this.util.selectBuild].hasOwnProperty("m_scale") && (this.util.sceneGap.scale = this.util.allMap[this.util.selectBuild].m_scale);
//根据地图大小同步修改字体大小
spriteScale = 0.2-(this.util.sceneGap.scale-0.08);
@ -1581,16 +1581,16 @@ MainMap_QM.prototype = {
this.shawLight.color = new THREE.Color( this.util.allMap[this.util.selectBuild].d_col || "#ffffff");
this.shawLight.intensity = this.util.allMap[this.util.selectBuild].d_int || 0.3;
if (this.util.allMap[this.util.selectBuild].c_site && this.util.allMap[this.util.selectBuild].c_site.split(",")) {
this.util.sceneGap.cameraX = parseInt(this.util.allMap[this.util.selectBuild].c_site.split(",")[0]) || this.util.sceneGap.cameraX;
this.util.sceneGap.cameraY = parseInt(this.util.allMap[this.util.selectBuild].c_site.split(",")[1]) || this.util.sceneGap.cameraY;
this.util.sceneGap.cameraZ = parseInt(this.util.allMap[this.util.selectBuild].c_site.split(",")[2]) || this.util.sceneGap.cameraZ;
}
if (this.util.allMap[this.util.selectBuild].m_site && this.util.allMap[this.util.selectBuild].m_site.split(",")) {
this.util.sceneGap.x = parseInt(this.util.allMap[this.util.selectBuild].m_site.split(",")[0]) || this.util.sceneGap.x;
this.util.sceneGap.y = parseInt(this.util.allMap[this.util.selectBuild].m_site.split(",")[1]) || this.util.sceneGap.y;
this.util.sceneGap.z = parseInt(this.util.allMap[this.util.selectBuild].m_site.split(",")[2]) || this.util.sceneGap.z;
}
// if (this.util.allMap[this.util.selectBuild].c_site && this.util.allMap[this.util.selectBuild].c_site.split(",")) {
// this.util.sceneGap.cameraX = parseInt(this.util.allMap[this.util.selectBuild].c_site.split(",")[0]) || this.util.sceneGap.cameraX;
// this.util.sceneGap.cameraY = parseInt(this.util.allMap[this.util.selectBuild].c_site.split(",")[1]) || this.util.sceneGap.cameraY;
// this.util.sceneGap.cameraZ = parseInt(this.util.allMap[this.util.selectBuild].c_site.split(",")[2]) || this.util.sceneGap.cameraZ;
// }
// if (this.util.allMap[this.util.selectBuild].m_site && this.util.allMap[this.util.selectBuild].m_site.split(",")) {
// this.util.sceneGap.x = parseInt(this.util.allMap[this.util.selectBuild].m_site.split(",")[0]) || this.util.sceneGap.x;
// this.util.sceneGap.y = parseInt(this.util.allMap[this.util.selectBuild].m_site.split(",")[1]) || this.util.sceneGap.y;
// this.util.sceneGap.z = parseInt(this.util.allMap[this.util.selectBuild].m_site.split(",")[2]) || this.util.sceneGap.z;
// }
if (this.util.allMap[this.util.selectBuild].m_zoom) {
this.util.m_zoom = this.util.allMap[this.util.selectBuild].m_zoom;
}
@ -2146,8 +2146,7 @@ MainMap_QM.prototype = {
this.controls.saveState();
this.changeBuild(this.util.deviceObj.build, this.util.deviceObj.floor);
//初始化方向为第一人称方向
//this.util.options.deviceAng && this.rotationAngle(this.util.deviceObj.angle);
this.rotationAngle(180);
this.util.options.deviceAng && this.rotationAngle(this.util.deviceObj.angle);
this.startRender();
setTimeout(() => {
@ -2320,8 +2319,7 @@ MainMap_QM.prototype = {
*/
changeMapState: function (state) {
Map_QM.controls.reset();
//Map_QM.util.options.deviceAng && Map_QM.rotationAngle(Map_QM.util.deviceObj.angle);
Map_QM.rotationAngle(180);
Map_QM.util.options.deviceAng && Map_QM.rotationAngle(Map_QM.util.deviceObj.angle);
if (state === "3d") {
Map_QM.camera = Map_QM.cameraPerspective;
Map_QM.controls.object = Map_QM.camera;
@ -2394,8 +2392,7 @@ MainMap_QM.prototype = {
Map_QM.changeMapModel("3D");
Map_QM.resetFloorState();
Map_QM.controls.reset();
// Map_QM.util.options.deviceAng && Map_QM.rotationAngle(Map_QM.util.deviceObj.angle);
Map_QM.rotationAngle(180);
Map_QM.util.options.deviceAng && Map_QM.rotationAngle(Map_QM.util.deviceObj.angle);
Map_QM.clearFloor(Map_QM.util.selectFloor);
this.changeBuildInner(buildOrder, floorOrder);
},
@ -2457,8 +2454,7 @@ MainMap_QM.prototype = {
Map_QM.controls.setDistance(Map_QM.util.changeDist.inner - 25);
Map_QM.controls.update();
}
// Map_QM.util.options.deviceAng && Map_QM.rotationAngle(Map_QM.util.deviceObj.angle);
Map_QM.rotationAngle(180);
Map_QM.util.options.deviceAng && Map_QM.rotationAngle(Map_QM.util.deviceObj.angle);
Map_QM.clearFloor(fIndex);
Map_QM.elementDestroy("all");
Map_QM.elementDestroy("go", true);
@ -3008,7 +3004,7 @@ MainMap_QM.prototype = {
allJU = false;
}
isJUZ = juZ;
Map_QM.rotationAngle(180);
Map_QM.util.options.deviceAng && Map_QM.rotationAngle(Map_QM.util.deviceObj.angle);
Map_QM.updateRender();
Map_QM.collLabel();
},
@ -3074,8 +3070,7 @@ MainMap_QM.prototype = {
this.controls.maxAzimuthAngle = Infinity;
this.shawLight.castShadow = this.util.options.shadow;
this.controls.reset();
//this.util.options.deviceAng && this.rotationAngle(this.util.deviceObj.angle);
this.rotationAngle(180);
this.util.options.deviceAng && this.rotationAngle(this.util.deviceObj.angle);
},
/**
* @api {方法} changePathDir(pathState) 切换导航方向
@ -3905,8 +3900,7 @@ MainMap_QM.prototype = {
Map_QM.changeMapModel("3D");
Map_QM.resetFloorState();
Map_QM.controls.reset();
// Map_QM.util.options.deviceAng && Map_QM.rotationAngle(Map_QM.util.deviceObj.angle);
Map_QM.rotationAngle(180);
Map_QM.util.options.deviceAng && Map_QM.rotationAngle(Map_QM.util.deviceObj.angle);
TweenMax.killAll(true);
if (!aName) {
isJUZ = false;
@ -4160,6 +4154,7 @@ MainMap_QM.prototype = {
*/
timeOutInit: function () {
Map_QM.updateRender();
Map_QM.autoChangeEleAngle();
Map_QM.collLabel();
renderCount = 0;
if (Map_QM.callBackLoadOver) {
@ -4277,8 +4272,7 @@ MainMap_QM.prototype = {
clearTimeout(shopTime);
isJUZ = false;
Map_QM.controls.reset();
// Map_QM.util.options.deviceAng && Map_QM.rotationAngle(Map_QM.util.deviceObj.angle);
Map_QM.rotationAngle(180);
Map_QM.util.options.deviceAng && Map_QM.rotationAngle(Map_QM.util.deviceObj.angle);
}, 10000);
}
},

Loading…
Cancel
Save