|
@@ -121,12 +121,13 @@
|
|
|
isIos:false, //是否ios手机。默认不是
|
|
|
currentChangeSpaceId:null, //当前变化的空间id
|
|
|
styleType:1,
|
|
|
+ sumArea:0, //总面积
|
|
|
+ changeArea:0, //当次变化的面积
|
|
|
}
|
|
|
},
|
|
|
beforeDestroy() {
|
|
|
cancelAnimationFrame(requestId, this.canvas)
|
|
|
this.worker && this.worker.terminate()
|
|
|
- // setTimeout(() => {
|
|
|
if (this.renderer instanceof THREE.WebGLRenderer) {
|
|
|
this.renderer.dispose()
|
|
|
this.renderer.forceContextLoss()
|
|
@@ -144,13 +145,12 @@
|
|
|
this.instancedFurList = [];
|
|
|
this.wallList = [];
|
|
|
TWEEN && TWEEN.removeAll();//清除所有的tween;
|
|
|
- // }, 0)
|
|
|
},
|
|
|
mounted() {
|
|
|
console.log("***onLoad-webgl_rxdz***", this.$route.query)
|
|
|
var that = this;
|
|
|
this.houseId = this.$store.state.houseId || '';
|
|
|
- this.childLayout = '4';//4-测试户型
|
|
|
+ this.childLayout = '0';//4-测试户型
|
|
|
let unit = window.screen.width / 750;//单位rpm 对应 px 的值
|
|
|
that.canvasHeight = window.screen.height - (200 * unit) + (20 * unit);
|
|
|
|
|
@@ -866,7 +866,10 @@
|
|
|
// area:12, //正负值 单位平方米
|
|
|
// }
|
|
|
curSpaceChange(data){
|
|
|
- console.warn("***空间面积变化***",this.overChange,data)
|
|
|
+ console.warn("***空间面积变化***",this.overChange,data);
|
|
|
+ let changArea = data.isZoomIn ? parseFloat(data.area.toFixed(2)) : -parseFloat(data.area.toFixed(2));
|
|
|
+ this.changeArea = changArea;//当次变化的面积,有正负值
|
|
|
+ this.sumArea = parseFloat((this.sumArea + changArea).toFixed(2));
|
|
|
this.overChange = true;//变形开始 防止在形变结束前,再次形变
|
|
|
this.currentChangeSpaceId = data.spaceId
|
|
|
this.changCurSpaceArea(data);
|
|
@@ -1590,8 +1593,9 @@
|
|
|
setTimeout(()=>{
|
|
|
that.loadSpace();
|
|
|
}, 100);
|
|
|
- console.warn("***curHouseObj***",this.curHouseObj,that.aiData)
|
|
|
- this.navbar.title = this.curHouseObj.name + " " + this.curHouseObj.houseArea + "㎡"
|
|
|
+ console.warn("***curHouseObj***",this.curHouseObj,this.aiData)
|
|
|
+ this.navbar.title = this.curHouseObj.name + " " + this.curHouseObj.houseArea + "㎡";
|
|
|
+ this.sumArea = this.curHouseObj.houseArea;
|
|
|
},
|
|
|
async getInitData(){
|
|
|
let parmas = {
|