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();
new Shine(gameObject, [speed], [lineWidth], [gradient], [reveal])
name | type | arguments | Default | description |
---|---|---|---|---|
gameObject | Phaser.GameObjects.GameObject |
A reference to the Game Object that has this fx. |
||
speed | number | <optional> | 0.5 |
The speed of the Shine effect. |
lineWidth | number | <optional> | 0.5 |
The line width of the Shine effect. |
gradient | number | <optional> | 3 |
The gradient of the Shine effect. |
reveal | boolean | <optional> | false |
Does this Shine effect reveal or get added to its target? |
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.
A reference to the Game Object that owns this effect.
The gradient of the Shine effect.
The line width of the Shine effect.
Does this Shine effect reveal or get added to its target?
The speed of the Shine 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.