DragonBonesPlugin
此内容尚不支持你的语言。
Defined in: sdk/src/dragonbones/DragonBonesPlugin.ts:30
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new DragonBonesPlugin(
manager?):DragonBonesPlugin
Defined in: sdk/src/dragonbones/DragonBonesPlugin.ts:41
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: sdk/src/dragonbones/DragonBonesPlugin.ts:31
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: sdk/src/dragonbones/DragonBonesPlugin.ts:45
Returns
Section titled “Returns”DragonBonesManager | null
Methods
Section titled “Methods”acquire()
Section titled “acquire()”acquire():
Promise<DragonBonesManager|null>
Defined in: sdk/src/dragonbones/DragonBonesPlugin.ts:56
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: sdk/src/dragonbones/DragonBonesPlugin.ts:87
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”cleanup()
Section titled “cleanup()”cleanup():
void
Defined in: sdk/src/dragonbones/DragonBonesPlugin.ts:134
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