Newboy11
Newboy11

Reputation: 3134

Phaser.Scale.EXACT_FIT creating a proportionate square

In phaser I have set my config with the settings below

const config = {
  type: Phaser.CANVAS,
  width: window.screen.width,
  height: window.screen.height,
  scale: {
    mode: Phaser.Scale.EXACT_FIT,
    parent: 'game-container', 
    width: window.screen.width,
    height: window.screen.height
  },
  physics: {
    default: 'arcade'
  },
  scene: [PreloadScene, PlayScene, QuestionScene]
};

I'm trying to create a proportionate square my problem is the width is longer than height. Is there a solution for this I really need thePhaser.Scale.EXACT_FIT. Check the attach pictureenter image description here

Upvotes: 0

Views: 25

Answers (0)

Related Questions