Constructor
new Box2dGearJoint(objectA, objectB, joint1, joint2, ratioopt)
Create a gear joint
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
objectA | Box2dObject | |||
objectB | Box2dObject | |||
joint1 | Box2dJoint | |||
joint2 | Box2dJoint | |||
ratio | ratio | <optional> | 1 |
- Source
Extends
- Box2dJoint
Methods
getJoint1() → {Box2dJoint}
Get the first joint
- Source
Returns:
- Type:
- Box2dJoint
getJoint2() → {Box2dJoint}
Get the second joint
- Source
Returns:
- Type:
- Box2dJoint
getRatio() → {number}
Get the gear ratio
- Source
Returns:
- Type:
- number
setRatio(ratio)
Set the gear ratio
Parameters:
Name | Type | Description |
---|---|---|
ratio | number |
- Source