3.6 KiB
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
↳ MouseJointDef
Index
Properties
Properties
bodyA
• bodyA: Body
Defined in src/dynamics/Joint.ts:78
The first attached body.
bodyB
• bodyB: Body
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
Defined in src/dynamics/Joint.ts:64
Use this to attach application specific data to your joints.