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

3.6 KiB
Raw Permalink Blame History

Planck.js API Doc › Globals › MouseJointDef

Interface: MouseJointDef

Mouse joint definition. This requires a world target point, tuning parameters, and the time step.

Hierarchy

↳ JointDef

↳ MouseJointOpt

↳ MouseJointDef

Index

Properties

Properties

bodyA

• bodyA: Body

Inherited from JointDef.bodyA

Defined in src/dynamics/Joint.ts:78

The first attached body.


bodyB

• bodyB: Body

Inherited from JointDef.bodyB

Defined in src/dynamics/Joint.ts:82

The second attached body.


Optional collideConnected

• collideConnected? : boolean

Inherited from JointOpt.collideConnected

Overrides JointOpt.collideConnected

Defined in src/dynamics/Joint.ts:69

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


Optional dampingRatio

• dampingRatio? : number

Inherited from MouseJointOpt.dampingRatio

Defined in src/dynamics/joint/MouseJoint.ts:59

[dampingRatio = 0.7] The damping ratio. 0 = no damping, 1 = critical damping.


Optional frequencyHz

• frequencyHz? : number

Inherited from MouseJointOpt.frequencyHz

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

[frequencyHz = 5.0] The response speed.


Optional maxForce

• maxForce? : number

Inherited from MouseJointOpt.maxForce

Defined in src/dynamics/joint/MouseJoint.ts:50

[maxForce = 0.0] The maximum constraint force that can be exerted to move the candidate body. Usually you will express as some multiple of the weight (multiplier * mass * gravity).


target

• target: Vec2

Defined in src/dynamics/joint/MouseJoint.ts:70

The initial world target point. This is assumed to coincide with the body anchor initially.


Optional userData

• userData? : any

Inherited from JointOpt.userData

Overrides JointOpt.userData

Defined in src/dynamics/Joint.ts:64

Use this to attach application specific data to your joints.