Phaser API Documentation

  Version: 
addVignette([x], [y], [radius], [strength])

Description:

Adds a Vignette effect.

The vignette effect is a visual technique where the edges of the screen, or a Game Object, gradually darken or blur, creating a frame-like appearance. This effect is used to draw the player's focus towards the central action or subject, enhance immersion, and provide a cinematic or artistic quality to the game's visuals.

Parameters:

name type arguments Default description
x number <optional> 0.5

The horizontal offset of the vignette effect. This value is normalized to the range 0 to 1.

y number <optional> 0.5

The vertical offset of the vignette effect. This value is normalized to the range 0 to 1.

radius number <optional> 0.5

The radius of the vignette effect. This value is normalized to the range 0 to 1.

strength number <optional> 0.5

The strength of the vignette effect.

Returns:
Description:

The Vignette FX Controller.

Since: 3.60.0