|
|
|
@ -7,6 +7,9 @@ const ViewScopeSize = 4e6;
|
|
|
|
|
const ViewScopeMin = new Vector3(-ViewScopeSize, -ViewScopeSize * 0.7, -ViewScopeSize);
|
|
|
|
|
const ViewScopeMax = ViewScopeMin.clone().negate();
|
|
|
|
|
|
|
|
|
|
const ViewBoxMin = new Vector3(1, 1, 1);
|
|
|
|
|
const viewBoxMax = new Vector3(1e7, 1e7, 1e7);
|
|
|
|
|
|
|
|
|
|
export enum CameraType
|
|
|
|
|
{
|
|
|
|
|
OrthographicCamera = 1,
|
|
|
|
@ -165,8 +168,9 @@ export class CameraUpdate
|
|
|
|
|
box3.getCenter(this._Target);
|
|
|
|
|
//世界坐标系
|
|
|
|
|
this._Target.applyMatrix4(this.Camera.matrix);
|
|
|
|
|
//size
|
|
|
|
|
|
|
|
|
|
let size = box3.getSize(new Vector3());
|
|
|
|
|
size.clamp(ViewBoxMin, viewBoxMax);
|
|
|
|
|
//宽高比
|
|
|
|
|
let aspectRatio = size.x / size.y;
|
|
|
|
|
|
|
|
|
|