From cc15fa70c624e2e63bb972c2e6a4e2283be22dff Mon Sep 17 00:00:00 2001 From: gaozl Date: Tue, 20 Jun 2023 15:56:06 +0800 Subject: [PATCH] fix: ci --- public/static/qm/MainMap_QM.js | 586 ++++++++++++++++++--------------- 1 file changed, 317 insertions(+), 269 deletions(-) diff --git a/public/static/qm/MainMap_QM.js b/public/static/qm/MainMap_QM.js index 1b2c479..09ece7e 100644 --- a/public/static/qm/MainMap_QM.js +++ b/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 = true, shopTime, debug = false; //dir--自定义地图大小适应不同版本的地图大小 +var Map_QM, renderFrame = -1, pathCameraState, stats, stateTime, isJUZ = false, hasLine = false, dir = false, iot = false, shopTime, debug = false; //dir--自定义地图大小适应不同版本的地图大小 //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: '洗手间' }, @@ -58,12 +58,13 @@ QMUtil = function () { boxShop: [], //设置box上显示的文字(过滤指),可点击触发onlyShop deviceAng: false, //地图初始化方向是否使用设备角度 } + this.mapAngle = 0; //地图默认角度 this.lightOptions = { d_col: "#ffffff", d_int: 0.1, - s_col: "#fffffa", - g_col: "#ffffff", - a_int: 0.5 + s_col: 0xffffff, + g_col: 0xfffffa, + a_int: 0.3 }; this.m_zoom = 1.2; //2D地图缩放大小 this._clock = new THREE.Clock(); @@ -75,7 +76,7 @@ QMUtil = function () { this.pathStateObj = { isPathState: false, isPathPlay: true, basePath: "", graphPath: "", ftPath: "", dtPath: "", facAllArr: [], forShopArr: {}, elevator: null, straight: null, elevatorDown: null, seldtFacNo: "", seldownftFacNo: "", selupftFacNo: "" }; this.timeObj = { timeS: 0, collTime: -1, pathTime: -1 }; //debug 参数 相机坐标/ 镜头方向 - this.guiOptions = { cameraX: 0, cameraY: 220, cameraZ: 220, targatX: 0, targatY: 0, targatZ: 0 }; //this.button = function() {}; + this.guiOptions = { cameraX: 0, cameraY: 220, cameraZ: 220, targatX: 0, targatY: 0, targatZ: 0 }; //this.button = function() {}; this.sceneGap = { x: 0, y: 0, z: 0, scale: dir ? 0.15 : 0.09 }; //改变地图位置,大小 @@ -83,7 +84,7 @@ QMUtil = function () { this.selectFloor = 0; this.deviceObj = {}; //angle --- 设备旋转角度 node ---- 设备导航点位 floor --- 设备楼层 this.startObj = {}; // 导航起点; - this.overObj = {}; //导航结束点 + this.overObj = {}; //导航结束点 this.tubeMaterial = new THREE.MeshPhongMaterial({ color: this.options.pathColor, transparent: true, opacity: 0.6 }); //叠层的路径材质 this.buildHeight = 5; this.shopHeight = 30; //店铺高度 控制店铺相关的其它第三方组件高度 @@ -93,11 +94,12 @@ QMUtil = function () { this.logos = []; /** * 外立面 - * Map_QM.util.initModelArr=[{url:"./static/model/jianfa.gltf",type:"out", scale:0.038, rot:{x:0,y:30,z:0}, site:{x:-20,y:-100,z:20}, colorModel:"gama" }]; + * Map_QM.util.initModelArr=[{url:"./static/model/jianfa.gltf",type:"out", scale:0.038, rot:{x:0,y:30,z:0}, site:{x:-20,y:-100,z:20}, colorModel:"gama" }]; */ - this.initModelArr = []; // + this.initModelArr = []; // /** * 一直显示不隐藏, 在楼层内显示 + * {url:"./static/model/jianfa.gltf",type:"out", scale:0.038, rot:{x:0,y:30,z:0}, site:{x:-20,y:-100,z:20}} */ this.modelArr = []; this.modelStr = [ //种树 @@ -151,7 +153,7 @@ QMUtil = function () { this.tipArr = []; //模型标签 periphery /** * 室内地图标签 - * Map_QM.util.labelIconArr([{floor:0,title:'', click:false, site:{x:0,y:1870,z:10},data:{type:"labelIcon",id:"1",show:"cn"}}]); + * Map_QM.util.labelIconArr([{floor:0,title:'', click:false, site:{x:0,y:1870,z:10},data:{type:"labelIcon",id:"1",show:"cn"}}]); */ this.labelIconArr = []; this.spriteMaterialArr = []; @@ -182,15 +184,15 @@ QMUtil = function () { * @apiGroup 地图交互 * @apiDescription 改变导航播放速度 * @apiVersion 4.0.0 - * + * * @apiParam {int} speed 播放速度(默认 6) - * + * * @apiSampleRequest off - * + * * @apiParamExample 请求示例 - * + * * Map_QM.util.changePlaySpeed(6) - * + * */ this.changePlaySpeed = function (speed = 6) { Map_QM.util.options.playSpeed = speed; @@ -234,20 +236,20 @@ QMUtil = function () { for (let i = 0; i < nCount; i++) { let p1 = ptPolygon[i]; //当前节点 let p2 = ptPolygon[(i + 1) % nCount]; //下一个节点 - // 求解 y=p.y 与 p1p2 的交点 - if (p1.y == p2.y) // p1p2 与 y=p0.y平行 + // 求解 y=p.y 与 p1p2 的交点 + if (p1.y == p2.y) // p1p2 与 y=p0.y平行 continue; - if (p.y < Math.min(p1.y, p2.y)) // 交点在p1p2延长线上 + if (p.y < Math.min(p1.y, p2.y)) // 交点在p1p2延长线上 continue; - if (p.y >= Math.max(p1.y, p2.y)) // 交点在p1p2延长线上 + if (p.y >= Math.max(p1.y, p2.y)) // 交点在p1p2延长线上 continue; - // 从P发射一条水平射线 求交点的 X 坐标 ------原理: ((p2.y-p1.y)/(p2.x-p1.x))=((y-p1.y)/(x-p1.x)) + // 从P发射一条水平射线 求交点的 X 坐标 ------原理: ((p2.y-p1.y)/(p2.x-p1.x))=((y-p1.y)/(x-p1.x)) //直线k值相等 交点y=p.y let x = (p.y - p1.y) * (p2.x - p1.x) / (p2.y - p1.y) + p1.x; if (x > p.x) - nCross++; // 只统计单边交点 + nCross++; // 只统计单边交点 } - // 单边交点为偶数,点在多边形之外 --- + // 单边交点为偶数,点在多边形之外 --- return (nCross % 2 == 1); } @@ -1166,7 +1168,7 @@ MainMap_QM = function (callBack, options) { this.scene.add(light); this.hemiLight = new THREE.HemisphereLight(this.util.lightOptions.s_col, this.util.lightOptions.g_col, this.util.lightOptions.a_int); this.hemiLight.name = "light"; - this.hemiLight.position.set(0, 1, 1); + this.hemiLight.position.set(0, 1, 0); this.scene.add(this.hemiLight); this.shawLight = new THREE.DirectionalLight(this.util.lightOptions.d_col, this.util.lightOptions.d_int); @@ -1196,20 +1198,57 @@ MainMap_QM = function (callBack, options) { //设置相机距离原点的最远距离 this.controls.maxDistance = this.util.options.maxDis; this.controls.minPolarAngle = 0; // 0是为了兼容2D模式 - this.controls.maxPolarAngle = Math.PI / 2 - 0.2; // radians + this.controls.maxPolarAngle = Math.PI / 2 - 0.2; // radians + const sykVShader = `varying vec3 vWorldPosition; + void main() { + vec4 worldPosition = modelMatrix * vec4( position, 1.0 ); + vWorldPosition = worldPosition.xyz; + gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); + }`; + const skyFShader = `uniform vec3 topColor; + uniform vec3 bottomColor; + uniform float offset; + uniform float exponent; + varying vec3 vWorldPosition; + void main() { + float h = normalize( vWorldPosition + offset ).y; + gl_FragColor = vec4( mix( bottomColor, topColor, max( pow( max( h , 0.0), exponent ), 0.0 ) ), 1.0 ); + }`; + const uniforms = { + "topColor": { value: new THREE.Color( 0x3385ff ) }, + "bottomColor": { value: new THREE.Color( 0xffffff ) }, + "offset": { value: 0 }, + "exponent": { value: 0.6 } + }; + const skyGeo = new THREE.SphereGeometry( this.util.options.maxDis*2, 16, 16 ); + const skyMat = new THREE.ShaderMaterial( { + uniforms: uniforms, + vertexShader: sykVShader, + fragmentShader: skyFShader, + side: THREE.BackSide + } ); + + const sky = new THREE.Mesh( skyGeo, skyMat ); + sky.name = "light"; + this.scene.add( sky ); + + // let texture = new THREE.TextureLoader().load(this.util.beforPath + 'static/img/bg.jpg') + // this.scene.background = texture; + // this.scene.environment = texture; + // texture.dispose(); + // console.log(texture); if (debug) { stats = new Stats(); stats.setMode(1); // 0: fps, 1: ms - stats.domElement.style.position = 'absolute'; //绝对坐标 - stats.domElement.style.left = '10px'; // (0,0)px,左上角 + stats.domElement.style.position = 'absolute'; //绝对坐标 + stats.domElement.style.left = '10px'; // (0,0)px,左上角 stats.domElement.style.top = '60px'; document.getElementById(options.containerId || "mapContainer").appendChild(stats.domElement); } document.getElementById(options.containerId || "mapContainer").addEventListener("wheel", this.disPlayEvent, false); document.getElementById(options.containerId || "mapContainer").addEventListener("touchmove", this.disPlayEvent, false); - document.getElementById(options.containerId || "mapContainer").addEventListener('click', this.onMouseClickBox, false); //地图点击 document.addEventListener('resize', this.changeDocmentResize, false); //窗口变化 this.mapArr = []; @@ -1649,7 +1688,7 @@ MainMap_QM.prototype = { } }, loaderOver: function (e) { - + this.sceneGap = new THREE.Group(); this.sceneGap.position.set(this.util.sceneGap.x, this.util.sceneGap.y, this.util.sceneGap.z); this.sceneGap.scale.set(this.util.sceneGap.scale, this.util.sceneGap.scale, this.util.sceneGap.scale); @@ -1757,8 +1796,8 @@ MainMap_QM.prototype = { if (fIndex >= Map_QM.util.allMap[bIndex].buildArr.length) { if (bIndex == Map_QM.util.allMap.length - 1) { clearInterval(intTimer); - this.controls.minPan = new THREE.Vector3(this.w / -5, 0, this.h / -5); - this.controls.maxPan = new THREE.Vector3(this.w / 5, 0, this.h / 5); + this.controls.minPan = new THREE.Vector3(this.w / -10, 0, this.h / -10); + this.controls.maxPan = new THREE.Vector3(this.w / 10, 0, this.h / 10); let pathData = Map_QM.util.allMap[parseInt(Map_QM.util.deviceObj.build)].buildArr[parseInt(Map_QM.util.deviceObj.floor)].mapData.path; if (Map_QM.util.deviceObj.xaxis) { @@ -1766,7 +1805,7 @@ MainMap_QM.prototype = { } else { if (parseInt(Map_QM.util.deviceObj.node) != -1) { pathData && pathData.nodes.sort(Map_QM.util.sortNode); - if (pathData && !Map_QM.util.deviceObj.xaxis && pathData.nodes.length > parseInt(Map_QM.util.deviceObj.node)) { + if (pathData && !Map_QM.util.deviceObj.xaxis && pathData.nodes.length > parseInt(Map_QM.util.deviceObj.node) && parseInt(Map_QM.util.deviceObj.node)>=0) { Map_QM.util.deviceObj.xaxis = pathData.nodes[parseInt(Map_QM.util.deviceObj.node)].x; Map_QM.util.deviceObj.yaxis = pathData.nodes[parseInt(Map_QM.util.deviceObj.node)].y; } else { @@ -1791,7 +1830,7 @@ MainMap_QM.prototype = { this.remove_child(this.sceneGap); this.scene.remove(this.sceneGap); let parent = document.getElementById(options.containerId || "mapContainer"); - while ((elem = parent.firstChild)) { + while ((elem = parent.firstChild)) { elem.remove(); } this.renderer.domElement = null @@ -1803,7 +1842,7 @@ MainMap_QM.prototype = { } }, initTreeModel: function () { - + if(this.index < this.util.modelStr.length - 1 ){ if(this.util.modelStr[this.index].load){ this.gltfLoad(this.util.beforPath + this.util.modelStr[this.index].url); @@ -1880,14 +1919,15 @@ MainMap_QM.prototype = { if (this.util.initModelArr && this.util.initModelArr.length > 0) { this.buildObj.visible = false; } + Map_QM.controls.saveState(); this.changeBuild(this.util.deviceObj.build, this.util.deviceObj.floor); this.controls.target.set(this.util.guiOptions.targatX, this.util.guiOptions.targatY, this.util.guiOptions.targatZ); //初始化方向为第一人称方向 - let angle = this.util.options.deviceAng ? this.util.deviceObj.angle : 0; - this.rotationAngle(angle); + // let angle = this.util.options.deviceAng ? this.util.deviceObj.angle : 0; + // this.rotationAngle(angle); // if(this.util.guiOptions.cameraY == 220 && this.util.guiOptions.cameraZ == 220){ // let boundBox = new THREE.Box3(); - // boundBox.setFromObject(this.sceneGap); + // boundBox.setFromObject(this.sceneGap); // let wd = Math.max(boundBox.max.x-boundBox.min.x, boundBox.max.y-boundBox.min.y); // let cameraDis = Math.sqrt(this.util.guiOptions.cameraY*this.util.guiOptions.cameraY+this.util.guiOptions.cameraZ*this.util.guiOptions.cameraZ); // this.camera.fov = this.calcFov(cameraDis, wd, this.w / this.h); @@ -1896,7 +1936,6 @@ MainMap_QM.prototype = { // } this.startRender(); setTimeout(() => { - Map_QM.controls.saveState(); Map_QM.controls.addEventListener('change', this.controlsChock, false); //控制器变化 console.log("Number of Triangles :", Map_QM.renderer.info.render.triangles); }, 100) @@ -2013,16 +2052,18 @@ MainMap_QM.prototype = { * @apiDescription 地图展示状态切换 * @apiVersion 4.0.0 * @apiParam {string} state 地图状态 - * + * * @apiSampleRequest off - * + * * @apiParamExample {String} 请求示例 - * + * * Map_QM.changeMapState("2d"); - * + * */ changeMapState: function (state) { Map_QM.controls.reset(); + let angle = Map_QM.util.options.deviceAng ? Map_QM.util.deviceObj.angle : Map_QM.util.mapAngle + Map_QM.rotationAngle(angle) if (state === "3d") { Map_QM.camera = Map_QM.cameraPerspective; Map_QM.controls.object = Map_QM.camera; @@ -2074,13 +2115,13 @@ MainMap_QM.prototype = { * @apiVersion 4.0.0 * @apiParam {int} buildOrder 传入楼栋编号(默认 0) * @apiParam {int} floorOrder 传入楼栋编号(默认 0) - * + * * @apiSampleRequest off - * + * * @apiParamExample {int, int} 请求示例 - * + * * Map_QM.changeBuild(0, 0); - * + * */ changeBuild: function (buildOrder = 0, floorOrder = 0) { Map_QM.resetFloorState(); @@ -2103,13 +2144,15 @@ MainMap_QM.prototype = { TweenMax.killAll(true); Map_QM.util.pathStateObj.isPathState = false; Map_QM.controls.maxDistance = Map_QM.util.options.maxDis; - Map_QM.controls.minAzimuthAngle = -Infinity; - Map_QM.controls.maxAzimuthAngle = Infinity; clearTimeout(Map_QM.util.timeObj.collTime); Map_QM.controls.enabled = true; Map_QM.controls.enableRotate = true; + Map_QM.controls.minAzimuthAngle = -Infinity; + Map_QM.controls.maxAzimuthAngle = Infinity; Map_QM.util.pathStateObj.forShopArr = { direction: "", wayList: [] }; - this.controls.reset(); + Map_QM.controls.reset(); + let angle = Map_QM.util.options.deviceAng ? Map_QM.util.deviceObj.angle : Map_QM.util.mapAngle + Map_QM.rotationAngle(angle) if (Map_QM.guide && Map_QM.guide.visible) { Map_QM.guide.visible = false } @@ -2118,19 +2161,19 @@ MainMap_QM.prototype = { } }, /** - * @api {方法} showFloor(floorOrder) 通过楼层编号切换楼层 + * @api {方法} showFloor(floorOrder) 通过楼层编号切换楼层 * @apiGroup 地图交互 * @apiDescription 楼层切换,传入楼层编号,编号从下到上排序,最下面是0 * @apiVersion 4.0.0 - * + * * @apiParam {int} floorOrder 楼层编号 - * + * * @apiSampleRequest off - * + * * @apiParamExample {int} 请求示例 - * + * * Map_QM.showFloor(1); - * + * */ showFloor: function (fIndex = -1, callBack = undefined) { Map_QM.resetFloorState(); @@ -2140,16 +2183,16 @@ MainMap_QM.prototype = { } }, /** - * @api {方法} changeFloorByName(floorOrder) 通过楼层名称切换楼层 + * @api {方法} changeFloorByName(floorOrder) 通过楼层名称切换楼层 * @apiGroup 地图交互 * @apiDescription 楼层切换,传入楼层名称, * @apiVersion 4.0.0 - * + * * @apiParam {String} floorName 楼层名称 - * + * * @apiSampleRequest off * @apiParamExample {String} 请求示例 - * + * * Map_QM.changeFloorByName("L1"); */ changeFloorByName: function (floorName) { @@ -2248,15 +2291,15 @@ MainMap_QM.prototype = { /** * @api {方法} onShowMeDir() 我的方向 * @apiGroup 地图显示 - * @apiDescription 我的方向 + * @apiDescription 我的方向 * @apiVersion 4.0.0 - * + * * @apiSampleRequest off - * + * * @apiParamExample 请求示例 - * + * * Map_QM.onShowMeDir(); - * + * */ onShowMeDir: function () { if (this.util.selectBuild != this.util.deviceObj.build || this.util.selectFloor != this.util.deviceObj.floor) { @@ -2266,6 +2309,7 @@ MainMap_QM.prototype = { }, onInnerMeDir: function () { this.changeMapModel("2D"); + Map_QM.controls.reset(); Map_QM.controls.maxPolarAngle = 0 Map_QM.controls.minPolarAngle = 0 if (Map_QM.util.pathStateObj.isPathState) { @@ -2298,23 +2342,25 @@ MainMap_QM.prototype = { Map_QM.camera.updateProjectionMatrix(); Map_QM.shawLight.castShadow = Map_QM.util.options.shadow; Map_QM.controls.reset(); + let angle = Map_QM.util.options.deviceAng ? Map_QM.util.deviceObj.angle : Map_QM.util.mapAngle + Map_QM.rotationAngle(angle) } }, /** * @api {方法} onShowLocalSite(0) 局部显示放大 * @apiGroup 地图显示 - * @apiDescription 局部显示放大 point 传入放大目标点,zoom放大级别 1-5 + * @apiDescription 局部显示放大 point 传入放大目标点,zoom放大级别 1-5 * @apiVersion 4.0.0 * @apiParam {Object} point 放大的地图位置 * @apiParam {int} zoom 放大倍数(默认 1) - * + * * @apiSampleRequest off - * + * * @apiParamExample {Object} 请求示例 - * - * Map_QM.onShowLocalSite({x:0,y:0},1); - * + * + * Map_QM.onShowLocalSite({x:0,y:0},1); + * */ onShowLocalSite: function (centerPoint, zoom = 1) { if (Map_QM.util.initModelArr.length > 0 && Map_QM.util.changeDist.inner > Map_QM.util.options.minDis) { @@ -2340,15 +2386,15 @@ MainMap_QM.prototype = { /** * @api {方法} onShowDeviceSite() 地图方向复位 * @apiGroup 地图显示 - * @apiDescription 地图方向复位 + * @apiDescription 地图方向复位 * @apiVersion 4.0.0 - * + * * @apiSampleRequest off - * + * * @apiParamExample 请求示例 - * + * * Map_QM.onShowDeviceSite(); - * + * */ onShowDeviceSite: function () { this.changeMapModel("3D"); @@ -2376,21 +2422,23 @@ MainMap_QM.prototype = { this.controls.maxAzimuthAngle = Infinity; this.shawLight.castShadow = this.util.options.shadow; this.controls.reset(); + let angle = this.util.options.deviceAng ? this.util.deviceObj.angle : this.util.mapAngle + this.rotationAngle(angle) }, /** * @api {方法} changePathDir(pathState) 切换导航方向 * @apiGroup 地图交互 * @apiDescription 切换导航方向 * @apiVersion 4.0.0 - * + * * @apiParam {String} pathState 地图导航方向(默认 3D) - * + * * @apiSampleRequest off - * + * * @apiParamExample 请求示例 - * + * * Map_QM.changePathDir("2D"); - * + * */ changePathDir: function (pathState = "3D") { if (Map_QM.util.pathStateObj.isPathState) { //导航状态 @@ -2433,14 +2481,14 @@ MainMap_QM.prototype = { * @apiGroup 地图交互 * @apiDescription 获取3D对象 * @apiVersion 4.0.0 - * @apiParam {string} ipName POI名称 - * + * @apiParam {string} ipName POI名称 + * * @apiSampleRequest off - * + * * @apiParamExample 请求示例 - * + * * Map_QM.queryObject3DByShopNum("L1001"); - * + * */ queryObject3DByShopNum: function (ipName) { for (let b = 0; b < Map_QM.mapArr.length; b++) { @@ -2456,19 +2504,19 @@ MainMap_QM.prototype = { return null; }, /** - * @api {方法} parseSelectShop() 设置选中店铺弹跳 + * @api {方法} parseSelectShop() 设置选中店铺弹跳 * @apiGroup 地图交互 - * @apiDescription 设置选中店铺弹跳 + * @apiDescription 设置选中店铺弹跳 * @apiVersion 4.0.0 - * + * * @apiParam {object3D} selObject 传入3D对象 - * + * * @apiSampleRequest off - * + * * @apiParamExample 请求示例 - * + * * Map_QM.parseSelectShop(object); - * + * */ parseSelectShop: function (selObject) { if (selObject) { @@ -2487,17 +2535,17 @@ MainMap_QM.prototype = { } }, /** - * @api {方法} cancelSelectShop() 取消店铺弹跳 + * @api {方法} cancelSelectShop() 取消店铺弹跳 * @apiGroup 地图交互 - * @apiDescription 取消店铺弹跳效果 + * @apiDescription 取消店铺弹跳效果 * @apiVersion 4.0.0 - * + * * @apiSampleRequest off - * + * * @apiParamExample 请求示例 - * + * * Map_QM.cancelSelectShop(); - * + * */ cancelSelectShop: function () { TweenMax.killAll(true); @@ -2510,15 +2558,15 @@ MainMap_QM.prototype = { * @apiGroup 地图交互 * @apiDescription 店铺促销标签展示/隐藏 * @apiVersion 4.0.0 - * + * * @apiParam {boolean} isShow 店铺促销标签是否显示(默认 false) - * + * * @apiSampleRequest off - * + * * @apiParamExample {boolean} 请求示例 - * + * * Map_QM.changeStateShopPro(true); - * + * */ changeStateShopPro: function (isShow = false) { Map_QM.mapArr[Map_QM.util.selectBuild][Map_QM.util.selectFloor].tagObj.traverse((obj) => { @@ -2530,15 +2578,15 @@ MainMap_QM.prototype = { * @apiGroup 地图交互 * @apiDescription 自定义标签展示/隐藏 * @apiVersion 4.0.0 - * + * * @apiParam {boolean} isShow 自定义标签是否显示(默认 false) - * + * * @apiSampleRequest off - * + * * @apiParamExample {boolean} 请求示例 - * + * * Map_QM.changeShowTagObjState(true); - * + * */ changeShowTagObjState: function (isShow = false) { Map_QM.mapArr[Map_QM.util.selectBuild][Map_QM.util.selectFloor].showTagObj.traverse((obj) => { @@ -2551,11 +2599,11 @@ MainMap_QM.prototype = { * @apiGroup 地图数据 * @apiDescription 店铺列表 * @apiVersion 4.0.0 - * + * * @apiSampleRequest off - * + * * @apiParamExample 请求示例 - * + * * Map_QM.queryShopList() * */ @@ -2567,13 +2615,13 @@ MainMap_QM.prototype = { * @apiGroup 地图交互 * @apiDescription 绘制引导线 * @apiVersion 4.0.0 - * + * * @apiParam {string/Array} startShop 起始店铺编号或编号数组 * @apiParam {string/Array} endShop 终点店铺编号或编号数组 * @apiParam {string} color 绘制颜色 (默认 "#0099ff") - * + * * @apiSampleRequest off - * + * * @apiParamExample 请求示例 * //绘制一到多 * Map_QM.drawCurveLine("L125",["L117","L127","L130"],"#2246d8") @@ -2639,12 +2687,12 @@ MainMap_QM.prototype = { * @apiGroup 地图交互 * @apiDescription 绘制柱状图 * @apiVersion 4.0.0 - * + * * @apiParam source 起始店铺编号或编号数组 * @apiParam property 控制参数对象 - * + * * @apiSampleRequest off - * + * * @apiParamExample 请求示例 * //绘制多个 * Map_QM.drawColumnar(["L117","L127","L130"],{"height":200,"width":20,"color":"#2246d8"}) @@ -2722,15 +2770,15 @@ MainMap_QM.prototype = { * @apiGroup 地图交互 * @apiDescription 删除绘制元素 * @apiVersion 4.0.0 - * + * * @apiParam type 传入删除的类型(默认 all) toLine--引导线 columer--柱状样式 all---所有 - * + * * @apiSampleRequest off - * + * * @apiParamExample 请求示例 - * + * * Map_QM.removeDrawEle("toLine") - * + * */ removeDrawEle: function (type = "all") { if (type == "all" || type == "toLine") { @@ -2752,51 +2800,53 @@ MainMap_QM.prototype = { * @apiGroup 地图显示 * @apiDescription 改变地图水平角度 angle>-180 && angle<180 * @apiVersion 4.0.0 - * + * * @apiParam {int} angle 旋转角度 - * + * * @apiSampleRequest off - * + * * @apiParamExample {int} 请求示例 - * + * * Map_QM.rotationAngle(90); - * + * */ rotationAngle: function (angle) { - Map_QM.controls.setRotateHorizontal(angle / 180 * Math.PI); + if(Math.abs(parseInt(angle)+Map_QM.controls.getRotateHorizontal()*180/Math.PI)>5){ + Map_QM.controls.setRotateHorizontal((angle / 180) * Math.PI) + } }, /** * @api {方法} rotateAngle(angle) 改变垂直角度 * @apiGroup 地图显示 * @apiDescription 改变地图垂直角度 angle>-90 && angle<90 * @apiVersion 4.0.0 - * + * * @apiParam {int} angle 旋转角度 - * + * * @apiSampleRequest off - * + * * @apiParamExample {int} 请求示例 - * + * * Map_QM.rotateAngle(-45); - * + * */ rotateAngle: function (angle) { Map_QM.controls.rotate(angle / 180 * Math.PI); }, /** - * @api {方法} setCameraDist(cDist) 调整地图大小 + * @api {方法} setCameraDist(cDist) 调整地图大小 * @apiGroup 地图显示 * @apiDescription 调整地图大小(值越小地图越大) Map_QM.util.options.minDis ~ Map_QM.util.options.maxDis * @apiVersion 4.0.0 - * + * * @apiParam {int} cDist 摄像头距离 - * + * * @apiSampleRequest off - * + * * @apiParamExample {int} 请求示例 - * + * * Map_QM.setCameraDist(150); - * + * */ setCameraDist: function (cDist) { if (Map_QM.util.options.minDis < parseInt(cDist) && parseInt(cDist) < Map_QM.util.options.maxDis) { @@ -2816,19 +2866,19 @@ MainMap_QM.prototype = { * @apiGroup 地图显示 * @apiDescription 启动地图渲染 与 cancelRender 配合使用可节约资源 * @apiVersion 4.0.0 - * + * * @apiSampleRequest off * @apiParamExample 请求示例 - * + * * Map_QM.startRender(); - * + * */ startRender: function () { Map_QM.cancelRender(); - + let T = Map_QM.util._clock.getDelta(); Map_QM.util.timeObj.timeS = Map_QM.util.timeObj.timeS + T; - // requestAnimationFrame默认调用render函数60次,通过时间判断,降低renderer.render执行频率 + // requestAnimationFrame默认调用render函数60次,通过时间判断,降低renderer.render执行频率 if (Map_QM.util.timeObj.timeS > 0.05) { if (Map_QM.qiModel) { Map_QM.qiModel.rotateY(0.05); @@ -2851,8 +2901,8 @@ MainMap_QM.prototype = { Map_QM.labelRenderer.render(Map_QM.scene, Map_QM.camera); 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.labelRenderer.renderObject( Map_QM.CSSObject, Map_QM.camera); } + Map_QM.labelRenderer.renderObject( Map_QM.CSSObject, Map_QM.camera); for (let item of Map_QM.mixers) { item.update(T); } @@ -2873,13 +2923,13 @@ MainMap_QM.prototype = { * @apiGroup 地图显示 * @apiDescription 取消地图渲染 与 startRender 配合使用可节约资源 * @apiVersion 4.0.0 - * + * * @apiSampleRequest off - * + * * @apiParamExample 请求示例 - * + * * Map_QM.cancelRender(); - * + * */ cancelRender: function () { window.cancelAnimationFrame(renderFrame); @@ -2891,14 +2941,14 @@ MainMap_QM.prototype = { * @apiGroup 地图交互 * @apiDescription 地图显示Html标签,返回3d标签对象 * @apiVersion 4.0.0 - * + * * @apiParam {Element} divObj div对象 * @apiParam {int} x 显示X坐标 * @apiParam {int} y 显示Y坐标 * @apiParam {int} z 显示高度坐标(默认 50) * @apiParam {String} type docment元素自定义标识(默认 "shopInfo") * @apiSampleRequest off - * + * * @apiParamExample {String} 请求示例 * Map_QM.addElementLabel(divObj,x,y); */ @@ -2921,13 +2971,13 @@ MainMap_QM.prototype = { * @apiParam {Object} obj 对象 * @apiParam {int} x 新的X坐标 * @apiParam {int} y 新的Y坐标 - * + * * @apiSampleRequest off - * + * * @apiParamExample {Object} 请求示例 - * + * * Map_QM.updateElementPosition(obj,x,y); - * + * */ updateElementPosition: function (obj, x, y) { if (obj.hasOwnProperty("position")) { @@ -2942,13 +2992,13 @@ MainMap_QM.prototype = { * @apiDescription 销毁地图上的html标签 * @apiVersion 4.0.0 * @apiParam {String} type docment元素自定义标识(默认 "shopInfo") - * + * * @apiSampleRequest off - * + * * @apiParamExample {Object} 请求示例 - * + * * Map_QM.elementDestroy(); - * + * */ elementDestroy: function (type = "shopInfo") { for (let i = Map_QM.CSSObject.children.length - 1; i >= 0; i--) { @@ -2965,7 +3015,7 @@ MainMap_QM.prototype = { * @apiParam {Array} shopNum 店铺编号 * @apiParam {Array} element html标签字符串 * @apiSampleRequest off - * + * * @apiParamExample {String} 请求示例 * Map_QM.changeShowShopName(["L104"],['

肯德基

']) */ @@ -2983,14 +3033,14 @@ MainMap_QM.prototype = { } }, /** - * @api {方法} unionShop() 店铺合并 + * @api {方法} unionShop() 店铺合并 * @apiGroup 地图显示 * @apiDescription 通过店铺编号合并店铺 合铺 * @apiVersion 4.0.0 * @apiParam {Array} shops 店铺编号数组 * @apiParam {Object} data 新的店铺数据(默认 空数据) * @apiSampleRequest off - * + * * @apiParamExample {String} 请求示例 * Map_QM.unionShop(["L105","L106","L107","L108"],{name:"新店",shopNum:"L104-L108",color:"#F4A460"}) */ @@ -3101,12 +3151,12 @@ MainMap_QM.prototype = { let facCode = intersects[i].object.userData.facCode || intersects[i].object.parent.userData.facCode || intersects[i].object.parent.parent.userData.facCode let title = intersects[i].object.userData.title || intersects[i].object.parent.userData.title || intersects[i].object.parent.parent.userData.title /** - * @api {事件} icon 点击设施图标 + * @api {事件} icon 点击设施图标 * @apiGroup 地图事件 * @apiDescription 用户点击设施图标后触发自定义事件 * @apiVersion 4.0.0 * @apiSampleRequest off - * + * * @apiParamExample 请求示例 * Map_QM.addEventListener("icon",onClickIcon,false); */ @@ -3135,12 +3185,12 @@ MainMap_QM.prototype = { } } /** - * @api {事件} shop 点击已绑定品牌的店铺 + * @api {事件} shop 点击已绑定品牌的店铺 * @apiGroup 地图事件 * @apiDescription 用户点击店铺后触发自定义事件 * @apiVersion 4.0.0 * @apiSampleRequest off - * + * * @apiParamExample 请求示例 * Map_QM.addEventListener("shop",onClickShop,false); */ @@ -3152,12 +3202,12 @@ MainMap_QM.prototype = { }) } else { /** - * @api {事件} onlyShop 点击未绑定品牌的店铺 + * @api {事件} onlyShop 点击未绑定品牌的店铺 * @apiGroup 地图事件 * @apiDescription 用户点击空店铺后触发自定义事件 * @apiVersion 4.0.0 * @apiSampleRequest off - * + * * @apiParamExample 请求示例 * Map_QM.addEventListener("onlyShop",onClickShop,false); */ @@ -3179,13 +3229,13 @@ MainMap_QM.prototype = { * @apiDescription 地图box 选中 * @apiVersion 4.0.0 * @apiParam {String} shopNum POI编号 - * + * * @apiSampleRequest off - * + * * @apiParamExample {String} 请求示例 - * + * * Map_QM.setSelectShopMatByName("L101"); - * + * */ setSelectShopMatByName: function (ipName) { for (let i = 0; i < Map_QM.mapArr[Map_QM.util.selectBuild].length; i++) { @@ -3239,7 +3289,7 @@ MainMap_QM.prototype = { type: "changeFloorOver", data: Map_QM.selectFloor }); - + }, autoChangeEleAngle: function () { @@ -3297,19 +3347,19 @@ MainMap_QM.prototype = { }, /** * 碰撞检测 - * @param {Object} 传入检测楼层下标 + * @param {Object} 传入检测楼层下标 */ controlsChock: function () { Map_QM.autoChangeEleAngle(); Map_QM.collLabel(); - + /** - * @api {事件} MapAngleChange 地图的方向改变 + * @api {事件} MapAngleChange 地图的方向改变 * @apiGroup 地图事件 * @apiDescription 用户操作地图时触发 * @apiVersion 4.0.0 * @apiSampleRequest off - * + * * @apiParamExample 请求示例 * Map_QM.addEventListener("MapAngleChange",onMapAngleChange,false); */ @@ -3325,7 +3375,9 @@ MainMap_QM.prototype = { isJUZ = false; Map_QM.controls.setZoom(1) Map_QM.controls.reset() - }, 3000); + let angle = Map_QM.util.options.deviceAng ? Map_QM.util.deviceObj.angle : Map_QM.util.mapAngle + Map_QM.rotationAngle(angle) + }, 5000); } if (debug) { Map_QM.util.guiOptions.cameraX = Map_QM.controls.object.position.x; @@ -3507,13 +3559,13 @@ MainMap_QM.prototype = { * @apiDescription 地图图标弹跳效果 * @apiVersion 4.0.0 * @apiParam {String} iconType 设施缩写 - * + * * @apiSampleRequest off - * + * * @apiParamExample {String} 请求示例 - * + * * Map_QM.bounceIcon("xsj"); - * + * */ bounceIcon: function (iconType) { let toFloor = parseInt(Map_QM.util.selectFloor); @@ -3533,15 +3585,15 @@ MainMap_QM.prototype = { * @apiDescription 计算设施、店铺的导航方向, toObj,pathType 不能同时为空 * @apiVersion 4.0.0 * @param {Object} toObj {build,floor,node} //终点 设施寻路可以为空 - * @param {String} pathType 公共设施名称或编号(点位寻路此参数为空字符串) - * @param {String} countType 8--八方向(默认) 12--十二方向 - * + * @param {String} pathType 公共设施名称或编号(点位寻路此参数为空字符串) + * @param {String} countType 8--八方向(默认) 12--十二方向 + * * @apiSampleRequest off - * + * * @apiParamExample {String} 请求示例 - * - * Map_QM.countPath({build:0,floor:0,node:0},"xsj","8"); - * + * + * Map_QM.countPath({build:0,floor:0,node:0},"xsj","8"); + * */ countPath: function (toObj, pathType = "", _countType = "8") { direction = { "code": 500, "dir": '', "cost": 0, "gap": 0 }; @@ -3871,18 +3923,18 @@ MainMap_QM.prototype = { * @apiDescription 获取离当前楼层最近的设施 * @apiVersion 4.0.0 * @apiParam {JSON} type 设施缩写 - * + * * @apiSampleRequest off - * + * * @apiParamExample {String} 请求示例 - * + * * Map_QM.pathIcon({type:"xsj"}); - * + * * @apiSuccessExample 返回示例 * { * "floor": 楼层编号, "node": 设施导航点,"typeCode":设施编号 * } - * + * */ pathIcon: function (iconType) { let selIcon; // @@ -3956,18 +4008,18 @@ MainMap_QM.prototype = { * @apiVersion 4.0.0 * @apiParam {String} startObj.shopNum 店铺编号/车位编号 * @apiParam {String} startObj.type "shop"/"park" - * + * * @apiParam {String} toObj.shopNum 店铺编号/车位编号 * @apiParam {String} toObj.type "shop"/"park" - * + * * @apiParam {Function} callBackFun 回调函数 - * + * * @apiSampleRequest off - * + * * @apiParamExample {String} 请求示例 - * + * * Map_QM.pathByStartAndOver({"shopNum":"L102","type":"shop"},{"shopNum":"L204","type":"shop"}); - * + * */ pathByStartAndOver: function (startObj, toObj, callBackFun) { try { @@ -3988,13 +4040,13 @@ MainMap_QM.prototype = { * @apiParam {int} floor 起点楼层编号 * @apiParam {String} node 起点编号 * @apiParam {int} angle 起点角度 - * + * * @apiSampleRequest off - * + * * @apiParamExample {String} 请求示例 - * + * * Map_QM.changeStartPoint({"build":0, "floor":3, "node":"20", "angle":0}); - * + * */ changeStartPoint: function (toObj) { this.clearFloor(); @@ -4034,14 +4086,14 @@ MainMap_QM.prototype = { * @apiDescription 改变POI 颜色 * @apiVersion 4.0.0 * @apiParam {string} ipName POI名称 - * @apiParam {string} color 颜色字符串 - * + * @apiParam {string} color 颜色字符串 + * * @apiSampleRequest off - * + * * @apiParamExample 请求示例 - * + * * Map_QM.changeMapIPState("L1001","#ffff00"); - * + * */ changeMapIPState: function (ipName, color) { // #775544 #AD8164 for (let i = 0; i < this.mapArr[this.util.selectBuild].length; i++) { @@ -4055,18 +4107,18 @@ MainMap_QM.prototype = { } }, /** - * @api {方法} getMapIPData(ipName) 获取POI 基础数据 + * @api {方法} getMapIPData(ipName) 获取POI 基础数据 * @apiGroup 地图交互 * @apiDescription 获取POI 基础数据 * @apiVersion 4.0.0 * @apiParam {string} ipName POI名称 - * + * * @apiSampleRequest off - * + * * @apiParamExample 请求示例 - * + * * Map_QM.getMapIPData("L1001"); - * + * * @apiSuccessExample 返回示例 * { * shopNum:店铺编号, shopName:店铺名 node:导航点, floor:楼层编号, xaxis:中心点X坐标, yaxis:中心点Y坐标, borderColor:边框色, entColor:填充色 @@ -4091,13 +4143,13 @@ MainMap_QM.prototype = { * @apiParam {int} floor 楼层编号 * @apiParam {string} node 路径点位编号 * @apiParam {function} callBackFun 回调方法 - * + * * @apiSampleRequest off - * + * * @apiParamExample 请求示例 - * + * * Map_QM.pathNode({build:0, floor:2,node:"53"},callBackFun); - * + * */ pathNode: function (toObj, callBackFun) { if (!toObj) { @@ -4161,13 +4213,13 @@ MainMap_QM.prototype = { * @apiVersion 4.0.0 * @apiParam {int} floor 楼层编号 * @apiParam {string} node 路径点位编号 - * + * * @apiSampleRequest off - * + * * @apiParamExample 请求示例 - * + * * Map_QM.getGapByPathNode({floor:2,node:"53"}); - * + * * @apiSuccessExample {Object} dist 距离米数 time 步行时间 * { * dis:200,time:4 @@ -4192,9 +4244,9 @@ MainMap_QM.prototype = { * @apiDescription 获取所有Icon * @apiVersion 4.0.0 * @apiParam {int} floorOrder 楼层编号(默认 所有) - * + * * @apiSampleRequest off - * + * */ getAllIcon: function (floorOrder = -1, buildOrder = -1) { let icons = []; @@ -4254,13 +4306,13 @@ MainMap_QM.prototype = { * @apiDescription 获取车位导航点 * @apiVersion 4.0.0 * @apiParam {String} shopNum 车位编号 - * + * * @apiSampleRequest off - * + * * @apiParamExample 请求示例 - * + * * Map_QM.pathPark({shopNum:"B1002"}); - * + * * @apiSuccessExample 返回示例 * { * shopNum: 车位编号, node: 导航点, floor: 楼层编号, xaxis: 中心点X坐标, yaxis: 中心点Y坐标 @@ -4276,13 +4328,13 @@ MainMap_QM.prototype = { * @apiDescription 通过店铺名称获取点位 * @apiVersion 4.0.0 * @apiParam {String} shopName 店铺名称 - * + * * @apiSampleRequest off - * + * * @apiParamExample 请求示例 - * + * * Map_QM.pathShopByName("金拱门"); - * + * * @apiSuccessExample 返回示例 * { * shopNum: 店铺编号, node: 导航点, floor: 楼层编号, xaxis: 中心点X坐标, yaxis: 中心点Y坐标, comeIn:店铺多门点 @@ -4320,11 +4372,11 @@ MainMap_QM.prototype = { * @apiGroup 地图导航 * @apiDescription 通过店铺编号或车位获取导航点位 * @apiVersion 4.0.0 - * @apiParam {Object} object build,floor,shopNum 楼栋编号,楼层编号,店铺或车位编号 + * @apiParam {Object} object build,floor,shopNum 楼栋编号,楼层编号,店铺或车位编号 * @apiParam {String} type 店铺或车位标识 "shop" "park" - * + * * @apiSampleRequest off - * + * * @apiSuccessExample 返回示例 * { * shopNum: 店铺编号, node: 导航点, floor: 楼层编号, xaxis: 中心点X坐标, yaxis: 中心点Y坐标, comeIn:店铺多门点 @@ -4478,7 +4530,7 @@ MainMap_QM.prototype = { * @apiDescription 地图开始导航时触发 * @apiVersion 4.0.0 * @apiSampleRequest off - * + * * @apiParamExample 请求示例 * Map_QM.addEventListener("InitPathOver",onInitPathOver,false); */ @@ -4675,7 +4727,7 @@ MainMap_QM.prototype = { * @apiDescription 地图导航过程中实时触发 * @apiVersion 4.0.0 * @apiSampleRequest off - * + * * @apiParamExample 请求示例 * Map_QM.addEventListener("PathPlaying",onPathPlaying,false); */ @@ -4805,7 +4857,7 @@ MainMap_QM.prototype = { * @apiDescription 地图导航到达目标点时触发 * @apiVersion 4.0.0 * @apiSampleRequest off - * + * * @apiParamExample 请求示例 * Map_QM.addEventListener("PathPlayOver",onPathPlayOver,false); */ @@ -4900,9 +4952,9 @@ MainMap_QM.prototype = { * @apiGroup 地图导航 * @apiDescription 导航动画暂停/播放 * @apiVersion 4.0.0 - * + * * @apiSampleRequest off - * + * */ pathStop: function (isPlaying) { Map_QM.util.pathStateObj.isPathPlay = isPlaying === undefined ? !Map_QM.util.pathStateObj.isPathPlay : isPlaying; @@ -4913,16 +4965,15 @@ MainMap_QM.prototype = { * @apiGroup 地图导航 * @apiDescription 导航动画重播 * @apiVersion 4.0.0 - * + * * @apiSampleRequest off - * + * */ pathRePlay: function () { clearTimeout(Map_QM.util.timeObj.pathTime); TweenMax.killAll(true); Map_QM.util.timeObj.pathTime = setTimeout(() => { clearTimeout(Map_QM.util.timeObj.pathTime); - Map_QM.controls.reset(); if (Map_QM.util.overObj && Map_QM.forShopArr[0]) { Map_QM.util.pathStateObj.isPathPlay = true; Map_QM.clearFloor(); @@ -4936,22 +4987,21 @@ MainMap_QM.prototype = { * @apiGroup 地图导航 * @apiDescription 导航切换扶梯模式 * @apiVersion 4.0.0 - * + * * @apiParam {function} callBack 回调函数 - * + * * @apiSampleRequest off - * + * * @apiParamExample 请求示例 - * + * * Map_QM.ChangePathByFt(function); - * + * */ ChangePathByFt: function (callBack) { clearTimeout(Map_QM.util.timeObj.pathTime); TweenMax.killAll(true); Map_QM.util.timeObj.pathTime = setTimeout(() => { clearTimeout(Map_QM.util.timeObj.pathTime); - Map_QM.controls.reset(); if (Map_QM.util.overObj) { Map_QM.clearFloor(); Map_QM.onFindPathModel(Map_QM.util.pathStateObj.ftPath); @@ -4968,22 +5018,21 @@ MainMap_QM.prototype = { * @apiGroup 地图导航 * @apiDescription 导航切换电梯模式 * @apiVersion 4.0.0 - * + * * @apiParam {function} callBack 回调函数 - * + * * @apiSampleRequest off - * + * * @apiParamExample 请求示例 - * + * * Map_QM.ChangePathByDt(function); - * + * */ ChangePathByDt: function (callBack) { clearTimeout(Map_QM.util.timeObj.pathTime); TweenMax.killAll(true); Map_QM.util.timeObj.pathTime = setTimeout(() => { clearTimeout(Map_QM.util.timeObj.pathTime); - Map_QM.controls.reset(); if (Map_QM.util.overObj) { Map_QM.clearFloor(); Map_QM.onFindPathModel(Map_QM.util.pathStateObj.dtPath); @@ -5000,22 +5049,21 @@ MainMap_QM.prototype = { * @apiGroup 地图导航 * @apiDescription 导航切换最佳模式 * @apiVersion 4.0.0 - * + * * @apiParam {function} callBack 回调函数 - * + * * @apiSampleRequest off - * + * * @apiParamExample 请求示例 - * + * * Map_QM.ChangePathByGood(function); - * + * */ ChangePathByGood: function (callBack) { clearTimeout(Map_QM.util.timeObj.pathTime); TweenMax.killAll(true); Map_QM.util.timeObj.pathTime = setTimeout(() => { clearTimeout(Map_QM.util.timeObj.pathTime); - Map_QM.controls.reset(); if (Map_QM.util.overObj) { Map_QM.clearFloor(); Map_QM.onFindPathModel(Map_QM.util.pathStateObj.graphPath); @@ -5040,14 +5088,14 @@ MainMap_QM.prototype = { * @apiGroup 地图交互 * @apiDescription 窗口变化 * @apiVersion 4.0.0 - * + * * @apiParam {int} width 窗口宽 * @apiParam {int} height 窗口高 - * + * * @apiSampleRequest off - * + * * @apiParamExample 请求示例 - * + * * Map_QM.changeWindowResize(1280,1080); */ changeWindowResize: function (width, height) { @@ -5072,7 +5120,7 @@ MainMap_QM.prototype = { * @apiGroup 地图数据 * @apiDescription 初始化地图赋值 Map_QM * @apiVersion 4.0.0 - * + * * @apiParam {function} callBack 初始化成功后的回调函数 * @apiParam {object} options 初始化对象 * @apiParam {int} options.build 设备所在楼栋编号 默认值6 @@ -5102,7 +5150,7 @@ MainMap_QM.prototype = { * * @apiSampleRequest off * @apiParamExample {String} 请求示例 - * + * * MainMap_QM.init(callBackLoadOver,{build : 0, floor : 3, navPoint : 7, angle : 0, perc_H : "-50%",containerId : "mapContainer"}); */ MainMap_QM.init = function (callBack, options) { @@ -5210,7 +5258,7 @@ FloorMap_QM.prototype = { obj.rotateY(Map_QM.util.modelArr[i].list[t].rot.y); obj.rotateZ(Map_QM.util.modelArr[i].list[t].rot.z); sopce.allObj.add(obj); - } + } }); } } @@ -6008,7 +6056,7 @@ MyModel_QM.prototype.MyModelShape = function (areaArr, howllowArr, opObj, entity } } if (!meshMaterial) { - meshMaterial = new THREE.MeshPhongMaterial({ //MeshStandardMaterial MeshPhongMaterial + meshMaterial = new THREE.MeshPhongMaterial({ //MeshStandardMaterial MeshPhongMaterial MeshBasicMaterial color: entityColor, transparent: true, opacity: alphaModle, @@ -6097,7 +6145,7 @@ MyModel_QM.prototype.MyPlaneShape = function (areaArr, howllowArr, opObj, entity color: entityColor, transparent: true, opacity: alphaModle, - + depthTest: true }); Map_QM.util.meshMaterialArr.push(meshMaterial); @@ -6225,7 +6273,7 @@ Facilities_QM = function () { map: spriteMap, depthTest: true, transparent: true, - alphaTest: 0.8 + alphaTest: 0.9 }); spriteMaterial.name = obj.facCode; Map_QM.util.spriteMaterialArr.push(spriteMaterial);