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

Method removePostEffect

packages/melonjs/src/renderable/renderable.js:529–537  ·  view source on GitHub ↗

* Remove a specific post-processing shader effect. * @param {GLShader|ShaderEffect} effect - the effect to remove * @example * sprite.removePostEffect(effect);

(effect)

Source from the content-addressed store, hash-verified

527 * sprite.removePostEffect(effect);
528 */
529 removePostEffect(effect) {
530 const idx = this.postEffects.indexOf(effect);
531 if (idx !== -1) {
532 this.postEffects.splice(idx, 1);
533 if (typeof effect.destroy === "function") {
534 effect.destroy();
535 }
536 }
537 }
538
539 /**
540 * returns true if this renderable is flipped on the horizontal axis

Callers 3

renderable.spec.jsFile · 0.80
onDestroyEventMethod · 0.80

Calls 1

destroyMethod · 0.65

Tested by

no test coverage detected