texture-atlas

Status of the Loading the TextureAtlas

不问归期 提交于 2020-01-11 13:06:13
问题 I am using the TextureAtlas in my LibGdx based game. As the size of the Atlas increases the loading time increases hence there is a delay in showing the animations that I have setup in the game. Hence I wish to get the status of the loading process of my TextureAtlas. 1. Anyway to get the status ? 2. Any Listener ? 回答1: You can take for example, asset that have been loaded with this method, yourAssetManage.getLoadedAssets () this method return an int indicating the number of loaded assets Gdx

Animating the sprite array created from texture atlas

十年热恋 提交于 2019-12-25 04:13:32
问题 I have created a sprite array from texture atlas like this. playerSprite = atlas.createSprites("player"); Inside texture atlas, player regions are named as player01 , player02 and player03 . playerAnimation = new Animation(0.5f, playerSprite); playerAnimation.setPlayMode(PlayMode.NORMAL); and I rendered it like this. batch.draw(playerAnimation.getKeyFrame(animTime,true), ninja.getX(),ninja.getY(), ninja.getWidth(),ninja.getHeight()); When I execute, this throws an error. "Exception in thread

iPhone 6+ simulator doesn't load @3x images from atlas

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-21 21:38:43
问题 What I've noticed when running project on iPhone 6+ simulator is that simulator don't pick up right images. Instead of @3x, @2x images are used. I tried reseting simulators content and settings, clean project and delete derived data from organizer and same thing still happens. When I look for the myatlas.atlasc folder inside the myapp.app (show package contents) at the path: /Users/username/Library/Developer/Xcode/DerivedData/appname-appspecificgeneratedstring/Build/Products/Debug

Couldn't load TextureAtlas from zip archive via AssetManager - libgdx

喜欢而已 提交于 2019-12-08 04:32:33
问题 I have 2 instances of AssetManager: one for basic textures and one for high quality textures. Basic textures are located in "android/assets" folder and high quality textures are packed in zip file. Content (file names) in this folders are the same - there are only better quality textures in zip archive. AssetManager throws an exception: "Couldn't load dependencies of asset: teamLogo.png" when I'm trying to load TextureAtlas from zip file. When I'm loading Texture file everything is ok.

iPhone 6+ simulator doesn't load @3x images from atlas

烂漫一生 提交于 2019-12-04 18:44:45
What I've noticed when running project on iPhone 6+ simulator is that simulator don't pick up right images. Instead of @3x, @2x images are used. I tried reseting simulators content and settings, clean project and delete derived data from organizer and same thing still happens. When I look for the myatlas.atlasc folder inside the myapp.app (show package contents) at the path: /Users/username/Library/Developer/Xcode/DerivedData/appname-appspecificgeneratedstring/Build/Products/Debug-iphonesimulator/appname.app I can see myatlas.atlasc (note that this is not myatlas.atlas) and inside there are

Status of the Loading the TextureAtlas

ぐ巨炮叔叔 提交于 2019-12-02 09:41:38
I am using the TextureAtlas in my LibGdx based game. As the size of the Atlas increases the loading time increases hence there is a delay in showing the animations that I have setup in the game. Hence I wish to get the status of the loading process of my TextureAtlas. 1. Anyway to get the status ? 2. Any Listener ? You can take for example, asset that have been loaded with this method, yourAssetManage.getLoadedAssets () this method return an int indicating the number of loaded assets Gdx.app.log("asset loaded :", ""+yourAssetManger.getLoadedAssets()); if (yourAssetManger.update()) { if (Gdx

How to create atlas for SpriteKit

荒凉一梦 提交于 2019-12-01 05:49:50
问题 How to create atlas for SpriteKit ? I tried to transfer all my images to some folder and give it extension. At result folder will called "somefolder.atlas" . Is it right way to use it ? 回答1: Sounds correct. Make sure you also enable atlas generation in Xcode settings (check out the official documentation about this, with step-by-step pictures). Then, supposing your atlas folder is named "somefolder.atlas" and it contains a file "1.png", you would do something like this: SKTextureAtlas *atlas