|
@@ -81269,10 +81269,10 @@ void main() {
|
|
|
|
|
|
if(camera.aspect > aspect){//视野更宽则用bound的纵向来决定
|
|
|
h = boundSize.y;
|
|
|
- endZoom = (viewport.resolution.y - margin.x) / h; //注意,要在resolution不为0时执行
|
|
|
+ endZoom = (viewport.resolution.y - margin.y) / h; //注意,要在resolution不为0时执行
|
|
|
}else {
|
|
|
w = boundSize.x;
|
|
|
- endZoom = (viewport.resolution.x - margin.y) / w;
|
|
|
+ endZoom = (viewport.resolution.x - margin.x) / w;
|
|
|
}
|
|
|
//onUpdate时更新endzoom是因为画布大小可能更改
|
|
|
}
|
|
@@ -112367,13 +112367,14 @@ ENDSEC
|
|
|
viewport.targetPlane = new Plane();
|
|
|
viewport.shiftTarget = new Vector3; //project在targetPlane上的位置
|
|
|
}
|
|
|
+ viewport.fitMargin = prop.margin;
|
|
|
viewports.push(viewport);
|
|
|
}
|
|
|
viewer.viewports = viewports;
|
|
|
viewer.updateScreenSize({forceUpdateSize:true});
|
|
|
viewports.forEach(viewport=>{
|
|
|
if(viewport.name == 'MainView')return
|
|
|
- this.viewportFitBound(viewport, viewer.bound.boundingBox , viewer.bound.center);
|
|
|
+ this.viewportFitBound(viewport, viewer.bound.boundingBox , viewer.bound.center , 0, viewport.fitMargin);
|
|
|
});
|
|
|
return viewports
|
|
|
}
|
|
@@ -117353,7 +117354,8 @@ ENDSEC
|
|
|
direction : new Vector3(0,0,-1), //镜头朝向
|
|
|
active: true,
|
|
|
//相机位置在z轴正向
|
|
|
- limitBound: new Box3(new Vector3(-Infinity,-Infinity, 1),new Vector3(Infinity,Infinity,5000)) //在地面以上
|
|
|
+ limitBound: new Box3(new Vector3(-Infinity,-Infinity, 1),new Vector3(Infinity,Infinity,5000)), //在地面以上
|
|
|
+ margin:{x:50, y:150} ,
|
|
|
},
|
|
|
{
|
|
|
left:0.5,
|
|
@@ -117364,7 +117366,8 @@ ENDSEC
|
|
|
direction : new Vector3(1,0,0),
|
|
|
active: true,
|
|
|
//相机位置在x轴负向 右下角屏
|
|
|
- viewContainsPoints:[new Vector3(0,0,0)]
|
|
|
+ viewContainsPoints:[new Vector3(0,0,0)],
|
|
|
+ margin:{x:300, y:250} ,
|
|
|
} ];
|
|
|
|
|
|
|
|
@@ -129902,8 +129905,8 @@ ENDSEC
|
|
|
}//获取在scale为1时,表现出的大小
|
|
|
Common.makeTexDontResize(child.material.map);
|
|
|
//console.log(child.name, 'roughness',child.material.roughness,'metalness',child.material.metalness)
|
|
|
- child.material.roughness = 0.6;
|
|
|
- child.material.metalness = 0.3;
|
|
|
+
|
|
|
+
|
|
|
|
|
|
/* child.depthMat = child.material.clone()
|
|
|
child.standardMat = child.material
|
|
@@ -129928,7 +129931,10 @@ ENDSEC
|
|
|
child.material = material;
|
|
|
|
|
|
}
|
|
|
-
|
|
|
+ if(child.material instanceof MeshStandardMaterial){
|
|
|
+ child.material.roughness = 0.6;
|
|
|
+ child.material.metalness = 0.3;
|
|
|
+ }
|
|
|
}
|
|
|
} );
|
|
|
|