Skip to main content

PhysicsStats

Represents physics stats for the current frame

Implements

Index

Constructors

constructor

Accessors

publicbroadphase

  • get broadphase(): number
  • set broadphase(value: number): void
  • 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

  • get collisions(): number
  • set collisions(value: number): void
  • 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

    Returns void

publicfastBodies

  • get fastBodies(): number
  • set fastBodies(value: number): void
  • 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

  • get fastBodyCollisions(): number
  • set fastBodyCollisions(value: number): void
  • 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

  • get narrowphase(): number
  • set narrowphase(value: number): void
  • 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

  • get pairs(): number
  • set pairs(value: number): void
  • 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

publicreset

  • Zero out values or clone other IPhysicsStats stats. Allows instance reuse.


    Parameters

    Returns void