2020-07-28 20:21:55 -07:00
|
|
|
|
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [MouseJointOpt](mousejointopt.md)
|
|
|
|
|
|
|
|
|
|
|
|
# Interface: MouseJointOpt
|
|
|
|
|
|
|
2021-04-16 17:10:15 +02:00
|
|
|
|
Mouse joint definition. This requires a world target point, tuning
|
|
|
|
|
|
parameters, and the time step.
|
|
|
|
|
|
|
2020-07-28 20:21:55 -07:00
|
|
|
|
## Hierarchy
|
|
|
|
|
|
|
|
|
|
|
|
* [JointOpt](jointopt.md)
|
|
|
|
|
|
|
|
|
|
|
|
↳ **MouseJointOpt**
|
|
|
|
|
|
|
|
|
|
|
|
↳ [MouseJointDef](mousejointdef.md)
|
|
|
|
|
|
|
|
|
|
|
|
## Index
|
|
|
|
|
|
|
|
|
|
|
|
### Properties
|
|
|
|
|
|
|
|
|
|
|
|
* [collideConnected](mousejointopt.md#optional-collideconnected)
|
2021-04-16 17:10:15 +02:00
|
|
|
|
* [dampingRatio](mousejointopt.md#optional-dampingratio)
|
|
|
|
|
|
* [frequencyHz](mousejointopt.md#optional-frequencyhz)
|
|
|
|
|
|
* [maxForce](mousejointopt.md#optional-maxforce)
|
2020-07-28 20:21:55 -07:00
|
|
|
|
* [userData](mousejointopt.md#optional-userdata)
|
|
|
|
|
|
|
|
|
|
|
|
## Properties
|
|
|
|
|
|
|
|
|
|
|
|
### `Optional` collideConnected
|
|
|
|
|
|
|
|
|
|
|
|
• **collideConnected**? : *boolean*
|
|
|
|
|
|
|
|
|
|
|
|
*Inherited from [JointOpt](jointopt.md).[collideConnected](jointopt.md#optional-collideconnected)*
|
|
|
|
|
|
|
2021-05-11 18:30:36 -07:00
|
|
|
|
*Defined in [src/dynamics/Joint.ts:69](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Joint.ts#L69)*
|
2021-04-16 17:10:15 +02:00
|
|
|
|
|
|
|
|
|
|
Set this flag to true if the attached bodies
|
|
|
|
|
|
should collide.
|
2020-07-28 20:21:55 -07:00
|
|
|
|
|
|
|
|
|
|
___
|
|
|
|
|
|
|
2021-04-16 17:10:15 +02:00
|
|
|
|
### `Optional` dampingRatio
|
|
|
|
|
|
|
|
|
|
|
|
• **dampingRatio**? : *number*
|
|
|
|
|
|
|
2021-05-11 18:30:36 -07:00
|
|
|
|
*Defined in [src/dynamics/joint/MouseJoint.ts:59](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/MouseJoint.ts#L59)*
|
2020-07-28 20:21:55 -07:00
|
|
|
|
|
2021-04-16 17:10:15 +02:00
|
|
|
|
[dampingRatio = 0.7] The damping ratio. 0 = no damping, 1 = critical
|
|
|
|
|
|
damping.
|
2020-07-28 20:21:55 -07:00
|
|
|
|
|
|
|
|
|
|
___
|
|
|
|
|
|
|
2021-04-16 17:10:15 +02:00
|
|
|
|
### `Optional` frequencyHz
|
2020-07-28 20:21:55 -07:00
|
|
|
|
|
2021-04-16 17:10:15 +02:00
|
|
|
|
• **frequencyHz**? : *number*
|
2020-07-28 20:21:55 -07:00
|
|
|
|
|
2021-05-11 18:30:36 -07:00
|
|
|
|
*Defined in [src/dynamics/joint/MouseJoint.ts:54](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/MouseJoint.ts#L54)*
|
2021-04-16 17:10:15 +02:00
|
|
|
|
|
|
|
|
|
|
[frequencyHz = 5.0] The response speed.
|
2020-07-28 20:21:55 -07:00
|
|
|
|
|
|
|
|
|
|
___
|
|
|
|
|
|
|
2021-04-16 17:10:15 +02:00
|
|
|
|
### `Optional` maxForce
|
|
|
|
|
|
|
|
|
|
|
|
• **maxForce**? : *number*
|
2020-07-28 20:21:55 -07:00
|
|
|
|
|
2021-05-11 18:30:36 -07:00
|
|
|
|
*Defined in [src/dynamics/joint/MouseJoint.ts:50](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/MouseJoint.ts#L50)*
|
2021-04-16 17:10:15 +02:00
|
|
|
|
|
|
|
|
|
|
[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).
|
2020-07-28 20:21:55 -07:00
|
|
|
|
|
|
|
|
|
|
___
|
|
|
|
|
|
|
|
|
|
|
|
### `Optional` userData
|
|
|
|
|
|
|
|
|
|
|
|
• **userData**? : *any*
|
|
|
|
|
|
|
|
|
|
|
|
*Inherited from [JointOpt](jointopt.md).[userData](jointopt.md#optional-userdata)*
|
|
|
|
|
|
|
2021-05-11 18:30:36 -07:00
|
|
|
|
*Defined in [src/dynamics/Joint.ts:64](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Joint.ts#L64)*
|
2021-04-16 17:10:15 +02:00
|
|
|
|
|
|
|
|
|
|
Use this to attach application specific data to your joints.
|