Jump to content

how to stretch background image on full screen?


LANAK
 Share

Recommended Posts

  • 1 month later...

Hi Lanak,

Try this:

var windowWidth = window.innerWidth;
var widnowHeight = window.innerHeight;
this.bg = this.add.image(windowWidth / 2, widnowHeight / 2, 'sky');
this.bg.setDisplaySize(windowWidth, widnowHeight);

Good Luck,

Roy

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...