Jump to content

App html5 th right size for image


hotgeart
 Share

Recommended Posts

Hi,

 

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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