Skip to content

Commit 31f331d

Browse files
committed
Added CameraManager.resize method.
1 parent e6059f6 commit 31f331d

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

src/cameras/2d/CameraManager.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,23 @@ var CameraManager = new Class({
431431
}
432432
},
433433

434+
/**
435+
* Resizes all cameras to the given dimensions.
436+
*
437+
* @method Phaser.Cameras.Scene2D.CameraManager#resize
438+
* @since 3.2.0
439+
*
440+
* @param {number} width - The new width of the camera.
441+
* @param {number} height - The new height of the camera.
442+
*/
443+
resize: function (width, height)
444+
{
445+
for (var i = 0, l = this.cameras.length; i < l; ++i)
446+
{
447+
this.cameras[i].setSize(width, height);
448+
}
449+
},
450+
434451
/**
435452
* [description]
436453
*

0 commit comments

Comments
 (0)