|
@@ -256,17 +256,17 @@ export default {
|
|
|
|
|
|
|
|
|
if (layoutModel && layoutModel.url) {
|
|
|
- let object = realFurnitureArr.find(it=>it.url==layoutModel.url);
|
|
|
+
|
|
|
+ if(this.type ==2 && globlShowModel.includes(layoutModel.modelName + this.nextString)){
|
|
|
+ if(!layoutModel.url.includes(this.nextString)){
|
|
|
+ let idx = layoutModel.url.lastIndexOf('.');
|
|
|
+ layoutModel.url = layoutModel.url.substr(0,idx) + this.nextString + layoutModel.url.substr(idx);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ let object = realFurnitureArr.find(it=>(it.url==layoutModel.url));
|
|
|
|
|
|
if(!object){
|
|
|
let url = layoutModel.url;
|
|
|
- if(this.type==2){
|
|
|
-
|
|
|
- if(globlShowModel.includes(layoutModel.modelName + this.nextString)){
|
|
|
- let idx = layoutModel.url.lastIndexOf('.');
|
|
|
- url = url.substr(0,idx) + this.nextString + url.substr(idx)
|
|
|
- }
|
|
|
- }
|
|
|
let it = {
|
|
|
url:url,
|
|
|
name:layoutModel.modelName,
|
|
@@ -307,9 +307,12 @@ export default {
|
|
|
resolve();
|
|
|
}else{
|
|
|
|
|
|
- if(this.type==2 && !globlShowModel.includes(realData.name)){
|
|
|
- resolve();
|
|
|
- return false;
|
|
|
+ if(this.type==2){
|
|
|
+ if(!globlShowModel.includes(realData.name)
|
|
|
+ && !globlShowModel.includes(realData.name + this.nextString)){
|
|
|
+ resolve();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
}
|
|
|
that.loader.setDRACOLoader(this.dracoLoader);
|
|
|
that.loader.load(realData.url, ( gltf ) => {
|
|
@@ -707,7 +710,7 @@ export default {
|
|
|
|
|
|
}
|
|
|
|
|
|
- console.log("模型计算位置x--", cubeInfo.isStepAsideLeft, cubeInfo.isStepAsideRight)
|
|
|
+
|
|
|
|
|
|
if (cubeInfo.isStepAsideLeft == 'true' && cubeInfo.isStepAsideRight == 'true') {
|
|
|
|
|
@@ -732,9 +735,8 @@ export default {
|
|
|
positionX += parseFloat(cubeInfo.marginLeft) / 2;
|
|
|
positionX -= parseFloat(cubeInfo.marginRight) / 2;
|
|
|
}
|
|
|
-
|
|
|
|
|
|
- console.log("模型计算位置--", spaceWidth, modelWidth, scaleX, cubeInfo)
|
|
|
+
|
|
|
|
|
|
if (parseFloat(cubeInfo.rotation) == 90 || parseFloat(cubeInfo.rotation) == -90) {
|
|
|
scaleX = spaceWidth / modelWidth;
|
|
@@ -743,7 +745,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
|
|
|
- console.log("模型计算位置--", spaceWidth, modelWidth, scaleX, cubeInfo)
|
|
|
+
|
|
|
|
|
|
}
|
|
|
|
|
@@ -902,7 +904,7 @@ export default {
|
|
|
|
|
|
}
|
|
|
|
|
|
- console.log("模型计算位置", cubeInfo, centerX, centerY, spaceWidth, spaceHeight, modelWidth, modelHeight, spaceId, scaleX, scaleY, positionX, positionY, cubeInfo.modelName)
|
|
|
+
|
|
|
let oldPosition = new THREE.Vector3();
|
|
|
oldPosition.copy(cube.position);
|
|
|
let oldScale = new THREE.Vector3();
|
|
@@ -939,7 +941,7 @@ export default {
|
|
|
|
|
|
updateInfo(cube,oldPosition,oldScale){
|
|
|
const ssss = cube.scale.x / oldScale.x
|
|
|
- console.log("XXXXXXXXXXXXXXXXX", cube, oldPosition,oldScale, ssss)
|
|
|
+
|
|
|
let lay = this.gltfLayouts.find(it=>it.uniId==cube.uniId);
|
|
|
if(cube.instancedMeshIndexList && cube.instancedMeshIndexList.length>0){
|
|
|
cube.instancedMeshIndexList.forEach(item=>{
|