Skip to content

Commit

Permalink
EffectComposer: Added removePass()
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Nov 22, 2020
1 parent b0b9aed commit 3cda712
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
12 changes: 12 additions & 0 deletions examples/js/postprocessing/EffectComposer.js
Expand Up @@ -81,6 +81,18 @@ Object.assign( THREE.EffectComposer.prototype, {

},

removePass: function ( pass ) {

const index = this.passes.indexOf( pass );

if ( index !== - 1 ) {

this.passes.splice( index, 1 );

}

},

isLastEnabledPass: function ( passIndex ) {

for ( var i = passIndex + 1; i < this.passes.length; i ++ ) {
Expand Down
12 changes: 12 additions & 0 deletions examples/jsm/postprocessing/EffectComposer.js
Expand Up @@ -96,6 +96,18 @@ Object.assign( EffectComposer.prototype, {

},

removePass: function ( pass ) {

const index = this.passes.indexOf( pass );

if ( index !== - 1 ) {

this.passes.splice( index, 1 );

}

},

isLastEnabledPass: function ( passIndex ) {

for ( var i = passIndex + 1; i < this.passes.length; i ++ ) {
Expand Down

0 comments on commit 3cda712

Please sign in to comment.