@fourjs/physics-rapier — the Rapier solver adapters (§37, §102, §108).
This package sits below@fourjs/physics: it implements
PhysicsSolverAdapter and depends on nothing else in the engine, which is
what makes the solver swappable (§20, §37). Application code should target
@fourjs/physics and hand it an adapter instance (plan P5-5) rather than
importing Rapier types from here.
Two adapters share the barrel — Rapier2dAdapter (WP-5.4) and
Rapier3dAdapter (WP-5.5) — one per §21 dimension, each wrapping its
own @dimforge/rapier{2,3}d-compat build and its own wasm image. Neither
loads the other's module: importing this barrel costs nothing until an
adapter is actually initialized.
RapierBodyAccess is the per-handle seam both adapters implement (see
rapier2d-adapter.ts for why it lives beside §37's sync* no-ops); it is
declared once and is dimension-independent, confirmed by WP-5.5.
Named exports only, alphabetical within each module group.
@fourjs/physics-rapier— the Rapier solver adapters (§37, §102, §108).This package sits below
@fourjs/physics: it implementsPhysicsSolverAdapterand depends on nothing else in the engine, which is what makes the solver swappable (§20, §37). Application code should target@fourjs/physicsand hand it an adapter instance (plan P5-5) rather than importing Rapier types from here.Two adapters share the barrel — Rapier2dAdapter (WP-5.4) and Rapier3dAdapter (WP-5.5) — one per §21 dimension, each wrapping its own
@dimforge/rapier{2,3}d-compatbuild and its own wasm image. Neither loads the other's module: importing this barrel costs nothing until an adapter is actually initialized.RapierBodyAccessis the per-handle seam both adapters implement (seerapier2d-adapter.tsfor why it lives beside §37'ssync*no-ops); it is declared once and is dimension-independent, confirmed by WP-5.5.Named exports only, alphabetical within each module group.