phaser - v3.90.0
    Preparing search index...

    The Shine FX Controller.

    This FX controller manages the shift effect for a Game Object.

    The shine effect is a visual technique that simulates the appearance of reflective or glossy surfaces by passing a light beam across a Game Object. This effect is used to enhance visual appeal, emphasize certain features, and create a sense of depth or material properties.

    A Shine effect is added to a Game Object via the FX component:

    const sprite = this.add.sprite();

    sprite.preFX.addShine();
    sprite.postFX.addShine();

    Hierarchy (View Summary)

    Index

    Constructors

    • Parameters

      • gameObject: GameObject

        A reference to the Game Object that has this fx.

      • Optionalspeed: number

        The speed of the Shine effect. Default 0.5.

      • OptionallineWidth: number

        The line width of the Shine effect. Default 0.5.

      • Optionalgradient: number

        The gradient of the Shine effect. Default 3.

      • Optionalreveal: boolean

        Does this Shine effect reveal or get added to its target? Default false.

      Returns Shine

    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.

    gameObject: GameObject

    A reference to the Game Object that owns this effect.

    gradient: number

    The gradient of the Shine effect.

    lineWidth: number

    The line width of the Shine effect.

    reveal: boolean

    Does this Shine effect reveal or get added to its target?

    speed: number

    The speed of the Shine 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