Class
SATNarrowphase2D
View sourceStores collision manifolds so 2D SAT collision state persists across updates.
NarrowPhase2DPlugin installs one instance as a world resource. The
resource preserves a manifold for each generated entity-pair ID across
collision updates, supporting generation of the current contacts exposed by
the per-update Contacts resource.
Examples
import { SATNarrowphase2D } from '@wimaengine/narrowphase'
function countTrackedPairs(world) {
const narrowphase = world.getResource(SATNarrowphase2D)
return narrowphase.clmdrecord.size
}Constructor
Properties
clmdrecord: Map<string, CollisionManifold>
View sourceCollision manifolds retained for observed entity pairs.
The map reuses a manifold when the same generated entity-pair ID is
encountered again, so collision state can persist between updates. It is
not cleared when the current Contacts collection is rebuilt.
Default: ...
