Skip to main content
Version: Phaser v4.0.0-rc.6

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

nametypeoptionaldefaultdescription
cameraPhaser.Cameras.Scene2D.CameraNoThe Camera that owns this filter.
amountnumberYes1The amount of pixelation to apply.

Scope: static

Extends

Phaser.Filters.Controller

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: