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

Method addPostEffect

packages/melonjs/src/renderable/renderable.js:485–488  ·  view source on GitHub ↗

* Add a post-processing shader effect to this renderable. * @param {GLShader|ShaderEffect} effect - the effect to add * @returns {GLShader|ShaderEffect} the added effect * @example * mySprite.addPostEffect(new DesaturateEffect(renderer));

(effect)

Source from the content-addressed store, hash-verified

483 * mySprite.addPostEffect(new DesaturateEffect(renderer));
484 */
485 addPostEffect(effect) {
486 this.postEffects.push(effect);
487 return effect;
488 }
489
490 /**
491 * Get post-processing shader effects.

Callers 15

camera.spec.jsFile · 0.80
renderable.spec.jsFile · 0.80
onResetEventMethod · 0.80
constructorMethod · 0.80
attachShineMethod · 0.80
constructorMethod · 0.80
constructorMethod · 0.80
updateMethod · 0.80
onActivateEventMethod · 0.80
onResetEventMethod · 0.80
constructorMethod · 0.80

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected