|
@@ -53,15 +53,26 @@ OrthographicCamera.prototype = Object.assign( Object.create( Camera.prototype ),
|
|
|
|
|
|
setViewOffset: function ( fullWidth, fullHeight, x, y, width, height ) {
|
|
|
|
|
|
- this.view = {
|
|
|
- fullWidth: fullWidth,
|
|
|
- fullHeight: fullHeight,
|
|
|
- offsetX: x,
|
|
|
- offsetY: y,
|
|
|
- width: width,
|
|
|
- height: height
|
|
|
+ if ( this.view === null ) {
|
|
|
+
|
|
|
+ this.view = {
|
|
|
+ fullWidth: 1,
|
|
|
+ fullHeight: 1,
|
|
|
+ offsetX: 0,
|
|
|
+ offsetY: 0,
|
|
|
+ width: 1,
|
|
|
+ height: 1
|
|
|
+ };
|
|
|
+
|
|
|
};
|
|
|
|
|
|
+ this.view.fullWidth = fullWidth;
|
|
|
+ this.view.fullHeight = fullHeight;
|
|
|
+ this.view.offsetX = x;
|
|
|
+ this.view.offsetY = y;
|
|
|
+ this.view.width = width;
|
|
|
+ this.view.height = height;
|
|
|
+
|
|
|
this.updateProjectionMatrix();
|
|
|
|
|
|
},
|