Closed spacejack closed 7 years ago
Hi, you can dispose armature like this:
armature.dispose();
Dispose dragonBones data like this:
factory.clean();
Thank you, that works! I'm using:
factory = new dragonBones.PixiFactory()
// Load assets, then...
armature = factory.buildArmatureDisplay(name)
// Later, dispose
armature.dispose()
factory.clear(true)
I assume I can use different factories for different groups of assets.
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: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: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:
Any advice would be much appreciated, thanks.