@awayfl/awayfl-player
Version:
Flash Player emulator for executing SWF files (published for FP versions 6 and up) in javascript
32 lines (29 loc) • 740 B
text/typescript
import { b2JointDef, b2Joint } from '../Joints';
/**
* Gear joint definition. This definition requires two existing
* revolute or prismatic joints (any combination will work).
* The provided joints must attach a dynamic body to a static body.
* @see b2GearJoint
*/
export class b2GearJointDef extends b2JointDef {
constructor() {
super();
this.type = b2Joint.e_gearJoint;
this.joint1 = null;
this.joint2 = null;
this.ratio = 1.0;
}
/**
* The first revolute/prismatic joint attached to the gear joint.
*/
public joint1: b2Joint;
/**
* The second revolute/prismatic joint attached to the gear joint.
*/
public joint2: b2Joint;
/**
* The gear ratio.
* @see b2GearJoint for explanation.
*/
public ratio: number;
}