Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assetmanager & multi-resolution problem #86

Closed
mistergreen opened this issue Oct 13, 2016 · 3 comments
Closed

Assetmanager & multi-resolution problem #86

mistergreen opened this issue Oct 13, 2016 · 3 comments

Comments

@mistergreen
Copy link

mistergreen commented Oct 13, 2016

I export my DB 4.7 animation out at the scale of 1 and .5.
The scale 1 is for bigger resolution and .5 for smaller resolution.

In Starling, I use the Assetmanager to load the texture and atlas.
It works fine for lower resolution, contentScale = 1. But the texture atlas is all wrong with higher resolution, contentScale = 2

Constants.assets = new AssetManager(contentScale, true);

If I manually set contentScale to 1 with the higher resolution, the DB renders the atlasTexture correctly but of course this messes with other graphics in starling.

@mistergreen
Copy link
Author

mistergreen commented Oct 13, 2016

The closest solution I found is to pass in the scale Factor into parseTextureAtlasData

Constants.factory.parseTextureAtlasData( Constants.assets.getObject("texture"), Constants.assets.getTexture("texture"),"peewee", Constants.scaleFactor);

But it looks like the armature data is off. They don't connect.
https://c8.staticflickr.com/9/8417/29675175103_a075e9b392.jpg

@akdcl
Copy link
Member

akdcl commented Oct 14, 2016

Hi,
This bug has been fixed in the dev branch and added an example about how to use multi resolution textureAtlas.

@mistergreen
Copy link
Author

Great, looks like it work. Make sure to use only the original normal resolution DBData json file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants