phaser - v3.90.0
    Preparing search index...

    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();

    Hierarchy (View Summary)

    Index

    Constructors

    • Parameters

      • gameObject: GameObject

        A reference to the Game Object that has this fx.

      • Optionalcolor: number

        The color of the Bloom, as a hex value. Default 0xffffff.

      • OptionaloffsetX: number

        The horizontal offset of the bloom effect. Default 1.

      • OptionaloffsetY: number

        The vertical offset of the bloom effect. Default 1.

      • OptionalblurStrength: number

        The strength of the blur process of the bloom effect. Default 1.

      • Optionalstrength: number

        The strength of the blend process of the bloom effect. Default 1.

      • Optionalsteps: number

        The number of steps to run the Bloom effect for. This value should always be an integer. Default 4.

      Returns Bloom

    Properties

    active: boolean

    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.

    blurStrength: number

    The strength of the blur process of the bloom effect.

    color: number

    The color of the bloom as a number value.

    gameObject: GameObject

    A reference to the Game Object that owns this effect.

    glcolor: number[]

    The internal gl color array.

    offsetX: number

    The horizontal offset of the bloom effect.

    offsetY: number

    The vertical offset of the bloom effect.

    steps: number

    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.

    strength: number

    The strength of the blend process of the bloom effect.

    type: number

    The FX_CONST type of this effect.

    Methods

    • Destroys this FX Controller.

      Returns void

    • Sets the active state of this FX Controller.

      A disabled FX Controller will not be updated.

      Parameters

      • value: boolean

        true to enable this FX Controller, or false to disable it.

      Returns this