The Bloom FX Controller.
This FX controller manages the bloom effect for a Game Object.
Bloom is an effect used to reproduce an imaging artifact of real-world cameras. The effect produces fringes of light extending from the borders of bright areas in an image, contributing to the illusion of an extremely bright light overwhelming the camera or eye capturing the scene.
A Bloom effect is added to a Game Object via the FX component:
const sprite = this.add.sprite();
sprite.preFX.addBloom();
sprite.postFX.addBloom();
new Bloom(gameObject, [color], [offsetX], [offsetY], [blurStrength], [strength], [steps])
name | type | arguments | Default | description |
---|---|---|---|---|
gameObject | Phaser.GameObjects.GameObject |
A reference to the Game Object that has this fx. |
||
color | number | <optional> | 0xffffff |
The color of the Bloom, as a hex value. |
offsetX | number | <optional> | 1 |
The horizontal offset of the bloom effect. |
offsetY | number | <optional> | 1 |
The vertical offset of the bloom effect. |
blurStrength | number | <optional> | 1 |
The strength of the blur process of the bloom effect. |
strength | number | <optional> | 1 |
The strength of the blend process of the bloom effect. |
steps | number | <optional> | 4 |
The number of steps to run the Bloom effect for. This value should always be an integer. |
Toggle this boolean to enable or disable this effect, without removing and adding it from the Game Object.
Only works for Pre FX.
Post FX are always active.
The strength of the blur process of the bloom effect.
The color of the bloom as a number value.
A reference to the Game Object that owns this effect.
The internal gl color array.
The horizontal offset of the bloom effect.
The vertical offset of the bloom effect.
The number of steps to run the Bloom effect for.
This value should always be an integer.
It defaults to 4. The higher the value, the smoother the Bloom, but at the cost of exponentially more gl operations.
Keep this to the lowest possible number you can have it, while still looking correct for your game.
The strength of the blend process of the bloom effect.
The FX_CONST type of this effect.
Destroys this FX Controller.
Sets the active state of this FX Controller.
A disabled FX Controller will not be updated.
name | type | description |
---|---|---|
value | boolean |
|
This FX Controller instance.