跳转到内容

DragonBonesPlugin

此内容尚不支持你的语言。

Defined in: sdk/src/dragonbones/DragonBonesPlugin.ts:30

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.

DragonBonesManager

DragonBonesPlugin

name: string = 'dragonbones'

Defined in: sdk/src/dragonbones/DragonBonesPlugin.ts:31

Plugin.name

get manager(): DragonBonesManager | null

Defined in: sdk/src/dragonbones/DragonBonesPlugin.ts:45

DragonBonesManager | null

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.

Promise<DragonBonesManager | null>


build(app): void

Defined in: sdk/src/dragonbones/DragonBonesPlugin.ts:87

App

void

Plugin.build


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.

void

Plugin.cleanup