title: Phaser.io 3: Get game size in scene
body: <p>It seems to be a simple question, but I just cannot resolve it:</p>
  
  <p>I'm using Phaser.io 3 HTML5 game framework with ES6 classes, and I try to figure out the actual "Game Size" (or canvas / viewport size), so that I can center an object on screen:</p>
  
  <pre><code>class Scene1 extends Phaser.Scene {
      constructor(config) {
          super(config);
      }
  
      preload() {
          this.load.image('ship', 'assets/spaceship3.png');
      }
  
      create() {
  
          let ship = this.add.sprite(160,125, 'ship');
          // Here I need to figure out the screen width / height:
          // ---&gt; How do I achieve that?
          ship.setPosition(width / 2, height / 2);
      }
  }
  </code></pre>
  
  <p>I could not find a way to either read or calculate the actual viewport's / canvas' size. Any hints?</p>