Jump to content

App html5 th right size for image


Recommended Posts



I'm making a game with Phaser, It's working great but when I test on my Galaxy S3 (.apk compiled with phonegap) the images is blurred.

Click for the image

If i scale up the image it's to big. How can I fix the problem ?


May be the script I use :


How i pick image

        this.screen = "drawable-ldpi";        if(gameWidth >= 480){            this.screen = "drawable-mdpi";        }        if(gameWidth >= 720){            this.screen = "drawable-hdpi";        }        if(gameWidth >= 960){            this.screen = "drawable-xhdpi";        }        if(gameWidth >= 1440){            this.screen = "drawable-xxhdpi";        }

How i make the canvas size :

var gameWidth   = window.innerWidth;var gameHeight  = window.innerHeight;var game = new Phaser.Game(gameWidth, gameHeight, Phaser.AUTO, 'gameDiv');

Thanks you.

Link to comment
Share on other sites


  • Recently Browsing   0 members

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