跳转到内容

Physics2DPlugin

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

Defined in: physics/Physics2DPlugin.ts:113

new Physics2DPlugin(wasmUrl, config?, factory?): Physics2DPlugin

Defined in: physics/Physics2DPlugin.ts:121

string

Physics2DPluginConfig = {}

PhysicsModuleFactory

Physics2DPlugin

name: string = 'physics'

Defined in: physics/Physics2DPlugin.ts:114

Plugin.name

build(app): void

Defined in: physics/Physics2DPlugin.ts:127

App

void

Plugin.build


cleanup(): void

Defined in: physics/Physics2DPlugin.ts:203

Shut the native Box2D world down on app teardown. Without this, _physics_shutdown was dead code and the C++ physics world (bodies, joints, contact state) leaked across an engine re-init. The bridge-guarded module makes the call abort-safe; null after so a double cleanup is a no-op.

void

Plugin.cleanup