Skip to content

Physics2DPlugin

Defined in: physics/Physics2DPlugin.ts:121

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

Defined in: physics/Physics2DPlugin.ts:129

string

Physics2DPluginConfig = {}

PhysicsModuleFactory

Physics2DPlugin

name: string = 'physics'

Defined in: physics/Physics2DPlugin.ts:122

Plugin.name

build(app): void

Defined in: physics/Physics2DPlugin.ts:135

App

void

Plugin.build


cleanup(app?): void

Defined in: physics/Physics2DPlugin.ts:219

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.

App

void

Plugin.cleanup