Mirkobil
I've hidden Spinebot answer since it might be misleadings. The Spine object in Pixi is an optimized object that holds references to Spine internal items and cannot be reused with different assets.
Once an object has been removed from the scene, it shouldn't be so heavy. Textures are shared across multiple instances of the same assets (below a Pixi texture there is a texture source that is the same istanc for the same loaded image asset).
If you want to optimize this process, rather than using the factory Spine.from
, you can use the constructor and create the Spine instance by yourself. If you do that, you have control over the SkeletonData
being used.
The SkeletonData
is the in-memory representation of the data contained in you .skel
or .json
file.
Multiple instances of a Spine object can reuse the same SkeletonData
.
If you don't want to keep the instance in memory, I'd instantiate a new symbol, or request it from a pool, as needed. Just be sure to load all its assets at the beginning. Then, when you don't need it anymore, you can destroy it, or release it in a pool for later reuse.