|
@@ -134,6 +134,9 @@
|
|
},
|
|
},
|
|
mounted(options) {
|
|
mounted(options) {
|
|
var that = this;
|
|
var that = this;
|
|
|
|
+ // alert("JavaScript 堆大小限制: "+performance.memory.jsHeapSizeLimit
|
|
|
|
+ // +"\n已使用的 JavaScript 堆大小: "+performance.memory.usedJSHeapSize
|
|
|
|
+ // +"\nJavaScript 堆的总大小: "+performance.memory.totalJSHeapSize);
|
|
console.warn("***webgl_rxdz_roam-options***",this.$route.query)
|
|
console.warn("***webgl_rxdz_roam-options***",this.$route.query)
|
|
this.isIOS = !!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
|
|
this.isIOS = !!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
|
|
// alert("***mounted-webgl_rxdz_roam***"+this.curHouseObj)
|
|
// alert("***mounted-webgl_rxdz_roam***"+this.curHouseObj)
|
|
@@ -370,10 +373,9 @@
|
|
spaceId = selectMesh.spaceId;
|
|
spaceId = selectMesh.spaceId;
|
|
}
|
|
}
|
|
// let spaceId = that.gltfSpaces[index].spaceId;//获取选中实例的空间id
|
|
// let spaceId = that.gltfSpaces[index].spaceId;//获取选中实例的空间id
|
|
- console.warn("***checkIntersection-地板***",mesh,floor,index,spaceId,that.spaceId)
|
|
|
|
|
|
+ console.warn("***checkIntersection-地板***",floor,index,spaceId,that.spaceId)
|
|
//当前拾取到的是本空间的底部-意味着用户点击了地板
|
|
//当前拾取到的是本空间的底部-意味着用户点击了地板
|
|
if(floor && spaceId == that.spaceId){
|
|
if(floor && spaceId == that.spaceId){
|
|
- // console.warn("***checkIntersection-地板***",mesh,floor)
|
|
|
|
moveCarmer(mesh.point);
|
|
moveCarmer(mesh.point);
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
@@ -408,7 +410,6 @@
|
|
}
|
|
}
|
|
let _x = point.x - camera.position.x;//x轴移动的距离
|
|
let _x = point.x - camera.position.x;//x轴移动的距离
|
|
let _z = point.z - camera.position.z;//z轴移动的距离
|
|
let _z = point.z - camera.position.z;//z轴移动的距离
|
|
- // console.warn("***moveCarmer***",_x,_z)
|
|
|
|
let cameraNewPosition = {x:camera.position.x + _x,y:1.5,z:camera.position.z + _z};
|
|
let cameraNewPosition = {x:camera.position.x + _x,y:1.5,z:camera.position.z + _z};
|
|
let targetNewPosition = {x:controls.target.x + _x,y:1.5,z:controls.target.z + _z};
|
|
let targetNewPosition = {x:controls.target.x + _x,y:1.5,z:controls.target.z + _z};
|
|
let oldUp = {x:0,y:1,z:0};
|
|
let oldUp = {x:0,y:1,z:0};
|
|
@@ -472,7 +473,7 @@
|
|
let oldUp = {x:0,y:1,z:0}; //俯视
|
|
let oldUp = {x:0,y:1,z:0}; //俯视
|
|
let newUp = {x:0,y:1,z:0}; //正视
|
|
let newUp = {x:0,y:1,z:0}; //正视
|
|
// moveTip(cameraNewPosition);
|
|
// moveTip(cameraNewPosition);
|
|
- console.warn("**moveActor***",JSON.stringify(cameraNewPosition),JSON.stringify(targetNewPosition))
|
|
|
|
|
|
+ // console.warn("**moveActor***",JSON.stringify(cameraNewPosition),JSON.stringify(targetNewPosition))
|
|
tweenCamera(camera.position,controls.target,cameraNewPosition,targetNewPosition,oldUp,newUp,2000);
|
|
tweenCamera(camera.position,controls.target,cameraNewPosition,targetNewPosition,oldUp,newUp,2000);
|
|
lon = 0;
|
|
lon = 0;
|
|
setTimeout(()=> {
|
|
setTimeout(()=> {
|
|
@@ -535,15 +536,12 @@
|
|
z:(position.z - Math.cos(_hd)),
|
|
z:(position.z - Math.cos(_hd)),
|
|
}
|
|
}
|
|
cube.position = position;
|
|
cube.position = position;
|
|
- // cube.scale.set(2, 2, 2);
|
|
|
|
cube.userIndex = index;
|
|
cube.userIndex = index;
|
|
cube.actorEum = index;
|
|
cube.actorEum = index;
|
|
cube.targetNewPosition = targetNewPosition;
|
|
cube.targetNewPosition = targetNewPosition;
|
|
- // cube.visible = false;
|
|
|
|
- console.warn("*actors*",cube,defaulIndex)
|
|
|
|
|
|
+ // console.warn("*actors*",cube,defaulIndex)
|
|
that.actors.push(cube);//添加视角
|
|
that.actors.push(cube);//添加视角
|
|
if(index == defaulIndex){//隐藏当前视角
|
|
if(index == defaulIndex){//隐藏当前视角
|
|
- // cube.visible = false;
|
|
|
|
that.currentActor = cube;//记录下当前的视角对象 mesh网格模型
|
|
that.currentActor = cube;//记录下当前的视角对象 mesh网格模型
|
|
let param = {
|
|
let param = {
|
|
type: 'CLK', //埋点类型
|
|
type: 'CLK', //埋点类型
|
|
@@ -600,7 +598,6 @@
|
|
maxY = ((-spaceObj.centerY + (spaceObj.spaceHeight/2))/100 - 0.1);
|
|
maxY = ((-spaceObj.centerY + (spaceObj.spaceHeight/2))/100 - 0.1);
|
|
minY = ((-spaceObj.centerY - (spaceObj.spaceHeight/2))/100 + 0.1);
|
|
minY = ((-spaceObj.centerY - (spaceObj.spaceHeight/2))/100 + 0.1);
|
|
//新的坐标轴不在房间范围内,则不能移动
|
|
//新的坐标轴不在房间范围内,则不能移动
|
|
- // console.warn("**roamPositionHandle-观察点不在范围中****",JSON.stringify(cameraNewPosition),minX,maxX,minY,maxY)
|
|
|
|
if(cameraNewPosition.x<minX || cameraNewPosition.x>maxX
|
|
if(cameraNewPosition.x<minX || cameraNewPosition.x>maxX
|
|
||cameraNewPosition.z<minY || cameraNewPosition.z>maxY){//不在房间范围
|
|
||cameraNewPosition.z<minY || cameraNewPosition.z>maxY){//不在房间范围
|
|
let _x = ((spaceObj.spaceWidth/2) - 15)*defaultActor.presentX + spaceObj.centerX;
|
|
let _x = ((spaceObj.spaceWidth/2) - 15)*defaultActor.presentX + spaceObj.centerX;
|
|
@@ -705,7 +702,6 @@
|
|
// controls.target.y = object.y2;
|
|
// controls.target.y = object.y2;
|
|
// controls.target.z = object.z2;
|
|
// controls.target.z = object.z2;
|
|
// controls.update();
|
|
// controls.update();
|
|
- // console.warn("****onUpdate**",object.x1,object.y1,object.z1,object.x2,object.y2,object.z2)
|
|
|
|
}).onComplete(()=>{
|
|
}).onComplete(()=>{
|
|
controls.target.x = newT.x;
|
|
controls.target.x = newT.x;
|
|
controls.target.y = newT.y;
|
|
controls.target.y = newT.y;
|
|
@@ -760,9 +756,9 @@
|
|
handler(val) {
|
|
handler(val) {
|
|
if (val) {
|
|
if (val) {
|
|
// setTimeout(()=> {
|
|
// setTimeout(()=> {
|
|
- if(this.renderer){
|
|
|
|
- this.setHouseDetail(val);
|
|
|
|
- }
|
|
|
|
|
|
+ // if(this.renderer){
|
|
|
|
+ // this.setHouseDetail(val);
|
|
|
|
+ // }
|
|
// }, 1000);
|
|
// }, 1000);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -859,7 +855,7 @@
|
|
}
|
|
}
|
|
let curSpaceArea = parseFloat((this.curSpaceObj.spaceWidth * this.curSpaceObj.spaceHeight) / 10000).toFixed(1);
|
|
let curSpaceArea = parseFloat((this.curSpaceObj.spaceWidth * this.curSpaceObj.spaceHeight) / 10000).toFixed(1);
|
|
this.navbar.title = this.curSpaceObj.spaceName + " " + curSpaceArea + "㎡"
|
|
this.navbar.title = this.curSpaceObj.spaceName + " " + curSpaceArea + "㎡"
|
|
- console.log("该户型空间数据:", this.spaceList);curSpaceArea
|
|
|
|
|
|
+ console.log("该户型空间数据:", this.spaceList);
|
|
console.log("当前选中的空间:", this.curSpaceObj);
|
|
console.log("当前选中的空间:", this.curSpaceObj);
|
|
this.positionCamer(this.curSpaceObj);
|
|
this.positionCamer(this.curSpaceObj);
|
|
this.loaderSpaceArr(this.spaceList);//绘制地板
|
|
this.loaderSpaceArr(this.spaceList);//绘制地板
|
|
@@ -874,7 +870,7 @@
|
|
}else{
|
|
}else{
|
|
let data = {id:this.wallIds}
|
|
let data = {id:this.wallIds}
|
|
const res = await requestConfig('getHouseTypeSpaceWalls', data, true);
|
|
const res = await requestConfig('getHouseTypeSpaceWalls', data, true);
|
|
- console.log("墙体数据:", res.list)
|
|
|
|
|
|
+ // console.log("墙体数据:", res.list)
|
|
if(res.success){
|
|
if(res.success){
|
|
wallList = this.wallList = res.list;
|
|
wallList = this.wallList = res.list;
|
|
}
|
|
}
|