PhysicsStats
Implements
Index
Constructors
Accessors
Methods
Constructors
constructor
Returns PhysicsStats
Accessors
publicbroadphase
Gets the time it took to calculate the broadphase pairs
Returns number
Gets the time it took to calculate the broadphase pairs
Parameters
value: number
Returns void
publiccollisions
Gets the number of actual collisions
Returns number
Gets the number of actual collisions
Parameters
value: number
Returns void
publiccontacts
Copy of the current frame contacts (only updated if debug is toggled on)
Returns Map<string, CollisionContact>
Copy of the current frame contacts (only updated if debug is toggled on)
Parameters
contacts: Map<string, CollisionContact>
Returns void
publicfastBodies
Gets the number of fast moving bodies using raycast continuous collisions in the scene
Returns number
Gets the number of fast moving bodies using raycast continuous collisions in the scene
Parameters
value: number
Returns void
publicfastBodyCollisions
Gets the number of bodies that had a fast body collision resolution
Returns number
Gets the number of bodies that had a fast body collision resolution
Parameters
value: number
Returns void
publicnarrowphase
Gets the time it took to calculate the narrowphase
Returns number
Gets the time it took to calculate the narrowphase
Parameters
value: number
Returns void
publicpairs
Gets the number of broadphase collision pairs which
Returns number
Gets the number of broadphase collision pairs which
Parameters
value: number
Returns void
Methods
publicclone
Provides a clone of this instance.
Returns PhysicsStatistics
publicreset
Zero out values or clone other IPhysicsStats stats. Allows instance reuse.
Parameters
optionalotherStats: PhysicsStatistics
Optional stats to clone
Returns void
Represents physics stats for the current frame