How do you support Retina display?


#1

I rendered cc.Sprite.create(‘asset.png’), and then setScale(0.5) on the sprite… But for some reason, it’s showing that it’s blurry on my iPhone, it shows crisp on Android devices though… Any ideas?

I also have this:

    cc.EGLView.getInstance().resizeWithBrowserSize(true);
    cc.EGLView.getInstance().setDesignResolutionSize(320, 568, cc.RESOLUTION_POLICY.SHOW_ALL);

I’m on iPhone 5,
$(window).width() and $(window).height() is 320 and 568 respectively when printed on console… (before starting cocos2d)


#2

Hi, Glaksmono

Are you using the version 2.2.2 stable release?
We have just added retina display support in our develop branch, it is not yet available in any stable release, but it will be in the next.

Huabin


#3

Hi @pandamicro,
Yes I’m using version 2.2.2 stable release… That’s awesome, would that be on version 2.2.3 then?


#4

Yes, of course, the next release will be 3.0 alpha with a lot of great changes for JS developer


#5

@pandamicro, is there an expected release date?


#6

I think this issue is: https://github.com/cocos2d/cocos2d-html5/issues/1130 right?

Do you have the diff for the retina support?

are these all?




#7

I just pulled the develop version and use that, it’s oooo beautifully worked on retina @pandamicro


#8

Hi, main pull requests for retina support are these:



Happy to hear it works well !
The release date for 3.0 alpha will be around the beginning of Mars