Phaser API Documentation

  Version: 
Only webGL <nullable> preFX: Phaser.GameObjects.Components.FX

Description:

The Pre FX component of this Game Object.

This component allows you to apply a variety of built-in effects to this Game Object, such as glow, blur, bloom, displacements, vignettes and more. You access them via this property, for example:

const player = this.add.sprite();
player.preFX.addBloom();

Only the following Game Objects support Pre FX:

  • Image
  • Sprite
  • TileSprite
  • Text
  • RenderTexture
  • Video

All FX are WebGL only and do not have Canvas counterparts.

Please see the FX Class for more details and available methods.

Since: 3.60.0