|
@@ -113,8 +113,15 @@ export default {
|
|
|
const planeMesh = new THREE.Mesh(planeGeometry, planeMaterial)
|
|
|
planeMesh.rotation.x = Math.PI / 2 ;
|
|
|
planeMesh.position.set(positionX, 2.8, -positionY);
|
|
|
- planeMesh.userType = "mesh";
|
|
|
+ planeMesh.userType = "mesh"
|
|
|
+ const spaceObj = {
|
|
|
+ spaceId:obj.spaceId,
|
|
|
+ spaceWidth:obj.spaceWidth,
|
|
|
+ spaceHeight:obj.spaceHeight
|
|
|
+ }
|
|
|
+ planeMesh.userData = spaceObj;
|
|
|
that.scene.add(planeMesh);
|
|
|
+ that.gltfSpaceRoofs.push(planeMesh);
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -133,6 +140,11 @@ export default {
|
|
|
texture.wrapT = THREE.RepeatWrapping;
|
|
|
|
|
|
list && list.forEach(obj=>{
|
|
|
+
|
|
|
+ if((obj.spaceId == 582 && obj.spaceName == "儿童房") || (obj.spaceId == 388 && obj.spaceName == "次卫")){
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
let positionX = obj.centerX / 100;
|
|
|
let positionY = obj.centerY / 100;
|
|
|
let scaleX = obj.spaceWidth / 100;
|
|
@@ -322,6 +334,25 @@ export default {
|
|
|
|
|
|
tween.start();
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ const cubeRoof = this.gltfSpaceRoofs.find((item)=>{
|
|
|
+ return item.userData.spaceId == curSpace.spaceId;
|
|
|
+ })
|
|
|
+ if(cubeRoof){
|
|
|
+ let roofScaleX = curSpace.spaceObj.spaceWidth / cubeRoof.userData.spaceWidth
|
|
|
+ let roofScaleY = curSpace.spaceObj.spaceHeight / cubeRoof.userData.spaceHeight
|
|
|
+ console.log("屋顶尺寸变化", curSpace.spaceObj, cubeRoof, roofScaleX, roofScaleY)
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ cubeRoof.scale.set(roofScaleX,roofScaleY,1);
|
|
|
+ cubeRoof.position.x = toPx;
|
|
|
+ cubeRoof.position.z = toPz;
|
|
|
+
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
allSpaceScale(){
|