Skip to content

DragonBonesPlugin

Defined in: dragonbones/DragonBonesPlugin.ts:29

new DragonBonesPlugin(manager?): DragonBonesPlugin

Defined in: dragonbones/DragonBonesPlugin.ts:40

Pass a manager for headless use or tests; otherwise it is built on demand.

DragonBonesManager

DragonBonesPlugin

name: string = 'dragonbones'

Defined in: dragonbones/DragonBonesPlugin.ts:30

Plugin.name

get manager(): DragonBonesManager | null

Defined in: dragonbones/DragonBonesPlugin.ts:44

DragonBonesManager | null

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.

Promise<DragonBonesManager | null>


build(app): void

Defined in: dragonbones/DragonBonesPlugin.ts:86

App

void

Plugin.build


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.

void

Plugin.cleanup