We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0144bad commit d4d2b21Copy full SHA for d4d2b21
1 file changed
src/boot/Game.js
@@ -444,6 +444,26 @@ var Game = new Class({
444
this.loop.focus();
445
},
446
447
+ /**
448
+ * Updates the Game Config with the new width and height values given.
449
+ * Then resizes the Renderer and Input Manager scale.
450
+ *
451
+ * @method Phaser.Game#resize
452
+ * @since 3.2.0
453
454
+ * @param {number} width - The new width of the game.
455
+ * @param {number} height - The new height of the game.
456
+ */
457
+ resize: function (width, height)
458
+ {
459
+ this.config.width = width;
460
+ this.config.height = height;
461
+
462
+ this.renderer.resize(width, height);
463
464
+ this.input.resize();
465
+ },
466
467
/**
468
* Destroys this Phaser.Game instance, all global systems, all sub-systems and all Scenes.
469
*
0 commit comments