MCPcopy Create free account
hub / github.com/melonjs/melonJS / clearPostEffects

Method clearPostEffects

packages/melonjs/src/renderable/renderable.js:514–521  ·  view source on GitHub ↗

* Remove all post-processing shader effects. * @example * sprite.clearPostEffects();

()

Source from the content-addressed store, hash-verified

512 * sprite.clearPostEffects();
513 */
514 clearPostEffects() {
515 for (const effect of this.postEffects) {
516 if (typeof effect.destroy === "function") {
517 effect.destroy();
518 }
519 }
520 this.postEffects.length = 0;
521 }
522
523 /**
524 * Remove a specific post-processing shader effect.

Callers 2

camera.spec.jsFile · 0.80
renderable.spec.jsFile · 0.80

Calls 1

destroyMethod · 0.65

Tested by

no test coverage detected