Hi. First of all, thank you for this PIXI renderer, it's working great for us!
I am trying to understand how to reliably load assets, then dispose of them, then re-load them again.
If I use armature.destroy(true)
and then later attempt to re-build the same armature, I get the following error:
Uncaught TypeError: Cannot read property 'hasLoaded' of null
at Sprite.set (pixi.js:21089)
Here is an example: http://www.spacejack.ca/dragonbones-test/
Click "Startup" - load assets, start animatoin
Click "Shutdown" - stop animation, dispose of assets
Click "Startup" - throws exception
Demo code is here: http://www.spacejack.ca/dragonbones-test/js/app.js
If I change my code to armature.destroy()
then it does not crash. Upon re-loading, I get the warning:
Same name data. Zombie_Run
BaseFactory.addDragonBonesData @ dragonBones.js:9493
I would like to be sure the resources are being desposed of. We're working on a game that contains mini-games, so we need to load the mini-game assets then dispose of them, load a different mini-game, etc.
I'm not sure where the assets are stored from here:
dbFactory.parseDragonBonesData(resources['zombieSkel'].data)
dbFactory.parseTextureAtlasData(resources['zombieAtlas'].data, resources['zombieTex'].texture)
armature = dbFactory.buildArmatureDisplay('Zombie')
Any advice would be much appreciated, thanks.