{"size": 958, "ext": "js", "max_stars_repo_path": "liquidfun/liquidfun/Box2D/lfjs/jsBindings/Dynamics/Joints/b2GearJoint.js", "max_stars_repo_name": "subatomicglue/fluid", "max_stars_repo_stars_event_min_datetime": "2017-04-02T00:17:47.000Z", "max_stars_repo_stars_event_max_datetime": "2021-11-23T21:42:48.000Z", "max_issues_repo_path": "liquidfun/liquidfun/Box2D/lfjs/jsBindings/Dynamics/Joints/b2GearJoint.js", "max_issues_repo_name": "subatomicglue/fluid", "max_issues_repo_issues_event_min_datetime": "2022-01-09T17:14:54.000Z", "max_issues_repo_issues_event_max_datetime": "2022-01-16T12:35:06.000Z", "max_forks_repo_path": "liquidfun/liquidfun/Box2D/lfjs/jsBindings/Dynamics/Joints/b2GearJoint.js", "max_forks_repo_name": "subatomicglue/fluid", "max_forks_repo_forks_event_min_datetime": "2017-08-06T12:47:18.000Z", "max_forks_repo_forks_event_max_datetime": "2020-08-14T14:16:22.000Z"}
{"max_stars_count": 17, "max_issues_count": 1, "max_forks_count": 5, "avg_line_length": 23.3658536585, "max_line_length": 73, "alphanum_fraction": 0.6816283925}
var b2GearJoint_GetRatio = Module.cwrap("b2GearJoint_GetRatio", 'number',
  ['number']);

function b2GearJoint(def) {
  this.ptr = null;
  this.next = null;
}

b2GearJoint.prototype.GetRatio = function() {
  return b2GearJoint_GetRatio(this.ptr);
};

var b2GearJointDef_Create = Module.cwrap("b2GearJointDef_Create",
  'number',
  ['number',
    // joint Def
    'number', 'number', 'number',
    // gear joint def
    'number', 'number', 'number']);

/**@constructor*/
function b2GearJointDef() {
  this.bodyA = null;
  this.bodyB = null;
  this.collideConnected = false;
  this.joint1 = null;
  this.joint2 = null;
  this.ratio = 0;
}

b2GearJointDef.prototype.Create = function(world) {
  var gearJoint = new b2GearJoint(this);
  gearJoint.ptr = b2GearJointDef_Create(
    world.ptr,
    // joint def
    this.bodyA.ptr, this.bodyB.ptr, this.collideConnected,
    //gear joint def
    this.joint1.ptr, this.joint2.ptr, this.ratio);
  return gearJoint;
};
