Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Physics2SharedData

Index

Methods

  • addJoint(joint: b2Joint): number
  • Parameters

    • joint: b2Joint

    Returns number

  • Add a physics object to the list of existing object.

    Parameters

    Returns void

  • clearBodyJoints(body: b2Body): void
  • Parameters

    • body: b2Body

    Returns void

  • getJoint(jointId: string | number): null | b2Joint
  • Parameters

    • jointId: string | number

    Returns null | b2Joint

  • getJointId(joint: b2Joint): number
  • Parameters

    • joint: b2Joint

    Returns number

  • Remove a physics object to the list of existing object.

    Parameters

    Returns void

  • removeJoint(jointId: string | number): void
  • Parameters

    • jointId: string | number

    Returns void

  • resetStartedAndEndedCollisions(): void
  • Reset all contactsStartedThisFrame and contactsEndedThisFrame of all registered physics behavior.

    Returns void

  • step(deltaTime: number): void
  • Parameters

    • deltaTime: number

    Returns void

  • updateBodiesFromObjects(): void
  • Update all registered body.

    Returns void

Constructors

Properties

contactListener: JSContactListener

Contact listener to keep track of current collisions

frameTime: number = 0
gravityX: number
gravityY: number
invScaleX: number
invScaleY: number
joints: {} = {}

Start with 1 so the user is safe from default variables value (0)

Type declaration

  • [key: string]: Box2D.b2Joint
scaleX: number
scaleY: number
staticBody: b2Body
stepped: boolean = false
timeScale: number = 1
timeStep: number
world: b2World

Generated using TypeDoc