Phaser API Documentation



Automatically center the canvas within the parent? The different centering modes are:

  1. No centering.
  2. Center both horizontally and vertically.
  3. Center horizontally.
  4. Center vertically.

Please be aware that in order to center the game canvas, you must have specified a parent that has a size set, or the canvas parent is the document.body.

Since: 3.16.0