Phaser API Documentation

  Version: 
setSize(width, [height])

Description:

Set the size of the Camera viewport.

By default a Camera is the same size as the game, but can be made smaller via this method, allowing you to create mini-cam style effects by creating and positioning a smaller Camera viewport within your game.

Parameters:

name type arguments Default description
width number

The width of the Camera viewport.

height number <optional> width

The height of the Camera viewport.

Returns:
Description:

This Camera instance.

Since: 3.0.0