question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

EffectComposer.js add function removePass()

See original GitHub issue

Is your feature request related to a problem? Please describe.

I need to conveniently and dynamically enable/disable effects. I am doing this by adding functionality, but it would be nice to have it initially

Describe the solution you’d like

EffectComposer.prototype.removePass = function(targetPass) {
  this.passes = this.passes.filter(pass => {
    return pass.constructor.name != targetPass.constructor.name
  })
}

Describe alternatives you’ve considered

did not met

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Mugen87commented, Nov 22, 2020

I need to conveniently and dynamically enable/disable effects.

Have you considered to just set Pass.enabled to false if the composer should skip a pass?

Read more comments on GitHub >

github_iconTop Results From Across the Web

EffectComposer – three.js docs
Adds the given pass to the pass chain. # .dispose () : undefined. Frees the GPU-related resources allocated by this instance. Call this...
Read more >
Can't implement post.processing with EffectComposer in ...
Im trying to implement post-processing effects in Three.js ... domElement); // add EFFECT composer = new EffectComposer(renderer); composer.
Read more >
How to use the postprocessing.EffectComposer function in ...
EffectComposer examples, based on popular ways it is used in public projects. ... () => this.resize()); this.composer = new EffectComposer(this.renderer); ...
Read more >
EffectComposer | postprocessing
A post processing library that provides the means to implement image filter effects for three.js.
Read more >
Three.js Post Processing
EffectComposer (renderer);. Then as the first pass we add a RenderPass that will render our scene with our camera into the first render...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found