DragonBonesPlugin
Defined in: dragonbones/DragonBonesPlugin.ts:29
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new DragonBonesPlugin(
manager?):DragonBonesPlugin
Defined in: dragonbones/DragonBonesPlugin.ts:40
Pass a manager for headless use or tests; otherwise it is built on demand.
Parameters
Section titled “Parameters”manager?
Section titled “manager?”Returns
Section titled “Returns”DragonBonesPlugin
Properties
Section titled “Properties”name:
string='dragonbones'
Defined in: dragonbones/DragonBonesPlugin.ts:30
Implementation of
Section titled “Implementation of”Accessors
Section titled “Accessors”manager
Section titled “manager”Get Signature
Section titled “Get Signature”get manager():
DragonBonesManager|null
Defined in: dragonbones/DragonBonesPlugin.ts:44
Returns
Section titled “Returns”DragonBonesManager | null
Methods
Section titled “Methods”acquire()
Section titled “acquire()”acquire():
Promise<DragonBonesManager|null>
Defined in: dragonbones/DragonBonesPlugin.ts:55
Load the side module and build the manager, once.
Concurrent callers share the one in-flight promise: two entities spawning in the same frame must not instantiate two wasm modules and then disagree about which one owns their skeletons.
Returns
Section titled “Returns”Promise<DragonBonesManager | null>
build()
Section titled “build()”build(
app):void
Defined in: dragonbones/DragonBonesPlugin.ts:86
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”cleanup()
Section titled “cleanup()”cleanup():
void
Defined in: dragonbones/DragonBonesPlugin.ts:130
Drop the despawn subscription and free every skeleton the module holds. Without it a re-init leaves a listener pointing at a dead manager and the wasm side keeps armatures nothing can reach.
Returns
Section titled “Returns”void