Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions src/nodes/display/PassNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ class PassNode extends TempNode {
this._layers = null;

/**
* Scales the resolution of the internal render taregt.
* Scales the resolution of the internal render target.
*
* @private
* @type {number}
Expand All @@ -350,7 +350,7 @@ class PassNode extends TempNode {
* @type {?Vector4}
* @default null
*/
this._customViewport = null;
this._viewport = null;

/**
* Custom scissor definition.
Expand All @@ -359,7 +359,7 @@ class PassNode extends TempNode {
* @type {?Vector4}
* @default null
*/
this._customScissor = null;
this._scissor = null;

/**
* This flag can be used for type testing.
Expand Down Expand Up @@ -724,8 +724,8 @@ class PassNode extends TempNode {

this.renderTarget.setSize( effectiveWidth, effectiveHeight );

if ( this._customScissor !== null ) this.renderTarget.scissor.copy( this._customScissor );
if ( this._customViewport !== null ) this.renderTarget.viewport.copy( this._customViewport );
if ( this._scissor !== null ) this.renderTarget.scissor.copy( this._scissor );
if ( this._viewport !== null ) this.renderTarget.viewport.copy( this._viewport );

}

Expand All @@ -744,23 +744,23 @@ class PassNode extends TempNode {

if ( x === null ) {

this._customScissor = null;
this._scissor = null;

} else {

if ( this._customScissor === null ) this._customScissor = new Vector4();
if ( this._scissor === null ) this._scissor = new Vector4();

if ( x.isVector4 ) {

this._customScissor.copy( x );
this._scissor.copy( x );

} else {

this._customScissor.set( x, y, width, height );
this._scissor.set( x, y, width, height );

}

this._customScissor.multiplyScalar( this._pixelRatio * this._resolution ).floor();
this._scissor.multiplyScalar( this._pixelRatio * this._resolution ).floor();

}

Expand All @@ -780,23 +780,23 @@ class PassNode extends TempNode {

if ( x === null ) {

this._customViewport = null;
this._viewport = null;

} else {

if ( this._customViewport === null ) this._customViewport = new Vector4();
if ( this._viewport === null ) this._viewport = new Vector4();

if ( x.isVector4 ) {

this._customViewport.copy( x );
this._viewport.copy( x );

} else {

this._customViewport.set( x, y, width, height );
this._viewport.set( x, y, width, height );

}

this._customViewport.multiplyScalar( this._pixelRatio * this._resolution ).floor();
this._viewport.multiplyScalar( this._pixelRatio * this._resolution ).floor();

}

Expand Down