2021-05-11 18:30:36 -07:00

2.4 KiB
Raw Permalink Blame History

Planck.js API Doc › Globals › WeldJointOpt

Interface: WeldJointOpt

Weld joint definition. You need to specify local anchor points where they are attached and the relative body angle. The position of the anchor points is important for computing the reaction torque.

prop {float} frequencyHz

prop {float} dampingRatio

prop {Vec2} localAnchorA

prop {Vec2} localAnchorB

prop {float} referenceAngle

Hierarchy

Index

Properties

Properties

Optional collideConnected

• collideConnected? : boolean

Inherited from JointOpt.collideConnected

Defined in src/dynamics/Joint.ts:69

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


Optional dampingRatio

• dampingRatio? : number

Defined in src/dynamics/joint/WeldJoint.ts:58

The damping ratio. 0 = no damping, 1 = critical damping.


Optional frequencyHz

• frequencyHz? : number

Defined in src/dynamics/joint/WeldJoint.ts:54

The mass-spring-damper frequency in Hertz. Rotation only. Disable softness with a value of 0.


Optional referenceAngle

• referenceAngle? : number

Defined in src/dynamics/joint/WeldJoint.ts:62

The bodyB angle minus bodyA angle in the reference state (radians).


Optional userData

• userData? : any

Inherited from JointOpt.userData

Defined in src/dynamics/Joint.ts:64

Use this to attach application specific data to your joints.