Jump to content

Content scale factor with retina/non-retina texture atlas


modegames
 Share

Recommended Posts

Is it possible to load either retina and non-retina atlas (as required) with pixi.js then using a viewport for a set size (lets say for example at the size of the retina atlas is what our positioning is based upon) be able to position the sprites for each of these atlas resolutions without having to manually multiply all values by a ratio so they use the correct position and size values for the DisplayObjects. 

 

Trying this out of course :)  I loaded the retina atlas and then tried loading the non-retina atlas the problem is that the width and height properties are always based on the frame size from the frame in the texture so meaning that these values are not scaled by a content scale factor to normalise them so they vary dependent on the resolution of the atlas which is not normal to expect with cross platform development.

 

Let me know if you've found a solution to work with this common requirement for building games with pixi.js

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...