Phaser API Documentation

  Version: 
<readonly> displayWidth: number

Description:

The displayed width of the camera viewport, factoring in the camera zoom level.

If a camera has a viewport width of 800 and a zoom of 0.5 then its display width would be 1600, as it's displaying twice as many pixels as zoom level 1.

Equally, a camera with a width of 800 and zoom of 2 would have a display width of 400 pixels.

Type:
number
Since: 3.11.0