Contacts

View source

ExtendsArray

Provides the current list of confirmed 2D collision manifolds.

A Contacts value is an ordinary array of CollisionManifold values. Retrieve it as a world resource to inspect the manifolds currently available to application code; standard array operations can be used to read or iterate the collection.

Examples

import { Contacts } from '@wimaengine/narrowphase'

function countContacts(world) {
  return world.getResource(Contacts).length
}

Constructor


constructor(arrayLength?: number)

View source

Parameters

NameDescriptionDefault
arrayLength?——

Parameters

NameDescriptionDefault
arrayLength——

Parameters

NameDescriptionDefault
...items——