|
@@ -56,6 +56,7 @@ OrthographicCamera.prototype = Object.assign( Object.create( Camera.prototype ),
|
|
|
if ( this.view === null ) {
|
|
|
|
|
|
this.view = {
|
|
|
+ enabled: true,
|
|
|
fullWidth: 1,
|
|
|
fullHeight: 1,
|
|
|
offsetX: 0,
|
|
@@ -66,6 +67,7 @@ OrthographicCamera.prototype = Object.assign( Object.create( Camera.prototype ),
|
|
|
|
|
|
}
|
|
|
|
|
|
+ this.view.enabled = true;
|
|
|
this.view.fullWidth = fullWidth;
|
|
|
this.view.fullHeight = fullHeight;
|
|
|
this.view.offsetX = x;
|
|
@@ -79,7 +81,12 @@ OrthographicCamera.prototype = Object.assign( Object.create( Camera.prototype ),
|
|
|
|
|
|
clearViewOffset: function () {
|
|
|
|
|
|
- this.view = null;
|
|
|
+ if ( this.view !== null ) {
|
|
|
+
|
|
|
+ this.view.enabled = false;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
this.updateProjectionMatrix();
|
|
|
|
|
|
},
|
|
@@ -96,7 +103,7 @@ OrthographicCamera.prototype = Object.assign( Object.create( Camera.prototype ),
|
|
|
var top = cy + dy;
|
|
|
var bottom = cy - dy;
|
|
|
|
|
|
- if ( this.view !== null ) {
|
|
|
+ if ( this.view !== null && this.view.enabled ) {
|
|
|
|
|
|
var zoomW = this.zoom / ( this.view.width / this.view.fullWidth );
|
|
|
var zoomH = this.zoom / ( this.view.height / this.view.fullHeight );
|