4.1 KiB
Planck.js API Doc › Globals › GearJoint
Class: GearJoint
Hierarchy
-
any
↳ GearJoint
Callable
▸ GearJoint(def: GearJointDef): GearJoint
Defined in joint/index.d.ts:157
Parameters:
| Name | Type |
|---|---|
def |
GearJointDef |
Returns: GearJoint
▸ GearJoint(def: GearJointOpt, bodyA: Body, bodyB: Body, joint1: RevoluteJoint | PrismaticJoint, joint2: RevoluteJoint | PrismaticJoint, ratio?: number): GearJoint
Defined in joint/index.d.ts:158
Parameters:
| Name | Type |
|---|---|
def |
GearJointOpt |
bodyA |
Body |
bodyB |
Body |
joint1 |
RevoluteJoint | PrismaticJoint |
joint2 |
RevoluteJoint | PrismaticJoint |
ratio? |
number |
Returns: GearJoint
Index
Constructors
Properties
Methods
Constructors
constructor
+ new GearJoint(def: GearJointDef): GearJoint
Defined in joint/index.d.ts:160
Parameters:
| Name | Type |
|---|---|
def |
GearJointDef |
Returns: GearJoint
+ new GearJoint(def: GearJointOpt, bodyA: Body, bodyB: Body, joint1: RevoluteJoint | PrismaticJoint, joint2: RevoluteJoint | PrismaticJoint, ratio?: number): GearJoint
Defined in joint/index.d.ts:162
Parameters:
| Name | Type |
|---|---|
def |
GearJointOpt |
bodyA |
Body |
bodyB |
Body |
joint1 |
RevoluteJoint | PrismaticJoint |
joint2 |
RevoluteJoint | PrismaticJoint |
ratio? |
number |
Returns: GearJoint
Properties
Static TYPE
▪ TYPE: "gear-joint"
Defined in joint/index.d.ts:160
Methods
getJoint1
▸ getJoint1(): RevoluteJoint | PrismaticJoint
Defined in joint/index.d.ts:191
Returns: RevoluteJoint | PrismaticJoint
getJoint2
▸ getJoint2(): RevoluteJoint | PrismaticJoint
Defined in joint/index.d.ts:192
Returns: RevoluteJoint | PrismaticJoint
getRatio
▸ getRatio(): number
Defined in joint/index.d.ts:194
Returns: number
setRatio
▸ setRatio(ratio: number): void
Defined in joint/index.d.ts:193
Parameters:
| Name | Type |
|---|---|
ratio |
number |
Returns: void