Pixelate
The Pixelate Filter Controller.
This filter controller manages the pixelate effect for a Camera.
The pixelate effect is a visual technique that deliberately reduces the resolution or detail of an image,
creating a blocky or mosaic appearance composed of large, visible pixels. This effect can be used for stylistic
purposes, as a homage to retro gaming, or as a means to obscure certain elements within the game, such as
during a transition or to censor specific content.
A Pixelate effect is added to a Camera via the FilterList component:
const camera = this.cameras.main;
camera.filters.internal.addPixelate();
Constructor
new Pixelate(camera, [amount])
Parameters
| name | type | optional | default | description |
|---|---|---|---|---|
| camera | Phaser.Cameras.Scene2D.Camera | No | The Camera that owns this filter. | |
| amount | number | Yes | 1 | The amount of pixelation to apply. |
Scope: static
Extends
Source: src/filters/Pixelate.js#L10
Since: 4.0.0
Inherited Members
From Phaser.Filters.Controller:
Public Members
amount
amount: number
Description:
The amount of pixelation to apply.
The size of the pixels is equal to 2 + the amount.
Source: src/filters/Pixelate.js#L44
Since: 4.0.0
Inherited Methods
From Phaser.Filters.Controller: