Options
All
  • Public
  • Public/Protected
  • All
Menu

Pulley joint definition. This requires two ground anchors, two dynamic body anchor points, max lengths for each side, and a pulley ratio.

Hierarchy

Index

Constructors

constructor

Properties

bodyA

bodyA: b2Body

The first attached body.

bodyB

bodyB: b2Body

The second attached body.

collideConnected

collideConnected: boolean

Set this flag to true if the attached bodies should collide.

groundAnchorA

groundAnchorA: b2Vec2

The first ground anchor in world coordinates. This point never moves.

groundAnchorB

groundAnchorB: b2Vec2

The second ground anchor in world coordinates. This point never moves.

lengthA

lengthA: number

The a reference length for the segment attached to bodyA.

lengthB

lengthB: number

The a reference length for the segment attached to bodyB.

localAnchorA

localAnchorA: b2Vec2

The local anchor point relative to body1's origin.

localAnchorB

localAnchorB: b2Vec2

The local anchor point relative to body2's origin.

maxLengthA

maxLengthA: number

The maximum length of the segment attached to bodyA.

maxLengthB

maxLengthB: number

The maximum length of the segment attached to bodyB.

ratio

ratio: number

The pulley ratio, used to simulate a block-and-tackle.

type

type: number

The joint type is set automatically for concrete joint types.

userData

userData: any

Use this to attach application specific data to your joints.

Methods

Initialize

  • Initialize the bodies, anchors, and length using the world anchors.

    Parameters

    Returns void

Generated using TypeDoc