Skip to content

Commit

Permalink
change indents to 2 spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
haskasu committed Sep 12, 2018
1 parent 1c4809b commit 39c93fb
Show file tree
Hide file tree
Showing 13 changed files with 182 additions and 182 deletions.
22 changes: 11 additions & 11 deletions liquidfun/Box2D/lfjs/jsBindings/Dynamics/Joints/b2DistanceJoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ function b2DistanceJoint(def) {
b2DistanceJoint.prototype = Object.create(b2Joint.prototype);
b2DistanceJoint.prototype.constructor = b2DistanceJoint;

b2DistanceJoint.prototype.SetLength = function(length) {
b2DistanceJoint_SetLength(this.ptr, length);
this.length = length;
b2DistanceJoint.prototype.SetLength = function (length) {
b2DistanceJoint_SetLength(this.ptr, length);
this.length = length;
}
b2DistanceJoint.prototype.SetFrequency = function(hz) {
b2DistanceJoint_SetFrequency(this.ptr, hz);
this.frequencyHz = hz;
b2DistanceJoint.prototype.SetFrequency = function (hz) {
b2DistanceJoint_SetFrequency(this.ptr, hz);
this.frequencyHz = hz;
}
b2DistanceJoint.prototype.SetDampingRatio = function(ratio) {
b2DistanceJoint_SetDampingRatio(this.ptr, ratio);
this.dampingRatio = ratio;
b2DistanceJoint.prototype.SetDampingRatio = function (ratio) {
b2DistanceJoint_SetDampingRatio(this.ptr, ratio);
this.dampingRatio = ratio;
}

var b2DistanceJointDef_Create = Module.cwrap("b2DistanceJointDef_Create",
Expand Down Expand Up @@ -57,7 +57,7 @@ function b2DistanceJointDef() {
this.frequencyHz = 0;
}

b2DistanceJointDef.prototype.Create = function(world) {
b2DistanceJointDef.prototype.Create = function (world) {
var distanceJoint = new b2DistanceJoint(this);
distanceJoint.ptr = b2DistanceJointDef_Create(
world.ptr,
Expand All @@ -70,7 +70,7 @@ b2DistanceJointDef.prototype.Create = function(world) {
return distanceJoint;
};

b2DistanceJointDef.prototype.InitializeAndCreate = function(bodyA, bodyB, anchorA, anchorB) {
b2DistanceJointDef.prototype.InitializeAndCreate = function (bodyA, bodyB, anchorA, anchorB) {
this.bodyA = bodyA;
this.bodyB = bodyB;
var distanceJoint = new b2DistanceJoint(this);
Expand Down
26 changes: 13 additions & 13 deletions liquidfun/Box2D/lfjs/jsBindings/Dynamics/Joints/b2FrictionJoint.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
var b2FrictionJointDef_Create = Module.cwrap("b2FrictionJointDef_Create",
'number',
['number',
// joint Def
'number', 'number', 'number',
// friction joint def
'number', 'number', 'number',
'number', 'number', 'number']);
// joint Def
'number', 'number', 'number',
// friction joint def
'number', 'number', 'number',
'number', 'number', 'number']);

var b2FrictionJointDef_InitializeAndCreate = Module.cwrap("b2FrictionJointDef_InitializeAndCreate",
'number',
Expand All @@ -31,7 +31,7 @@ function b2FrictionJointDef() {
this.userData = null;
}

b2FrictionJointDef.prototype.Create = function(world) {
b2FrictionJointDef.prototype.Create = function (world) {
var frictionJoint = new b2FrictionJoint(this);
frictionJoint.ptr = b2FrictionJointDef_Create(
world.ptr,
Expand All @@ -43,7 +43,7 @@ b2FrictionJointDef.prototype.Create = function(world) {
return frictionJoint;
};

b2FrictionJointDef.prototype.InitializeAndCreate = function(bodyA, bodyB, anchor) {
b2FrictionJointDef.prototype.InitializeAndCreate = function (bodyA, bodyB, anchor) {
this.bodyA = bodyA;
this.bodyB = bodyB;
var frictionJoint = new b2FrictionJoint(this);
Expand Down Expand Up @@ -72,11 +72,11 @@ function b2FrictionJoint(def) {
b2FrictionJoint.prototype = Object.create(b2Joint.prototype);
b2FrictionJoint.prototype.constructor = b2FrictionJoint;

b2FrictionJoint.prototype.SetMaxForce = function(force) {
b2FrictionJoint_SetMaxForce(this.ptr, force);
this.maxForce = force;
b2FrictionJoint.prototype.SetMaxForce = function (force) {
b2FrictionJoint_SetMaxForce(this.ptr, force);
this.maxForce = force;
}
b2FrictionJoint.prototype.SetMaxTorque = function(torque) {
b2FrictionJoint_SetMaxTorque(this.ptr, torque);
this.maxTorque = torque;
b2FrictionJoint.prototype.SetMaxTorque = function (torque) {
b2FrictionJoint_SetMaxTorque(this.ptr, torque);
this.maxTorque = torque;
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ function b2GearJoint(def) {
b2GearJoint.prototype = Object.create(b2Joint.prototype);
b2GearJoint.prototype.constructor = b2GearJoint;

b2GearJoint.prototype.SetRatio = function(ratio) {
b2GearJoint_SetRatio(this.ptr, ratio);
this.ratio = ratio;
b2GearJoint.prototype.SetRatio = function (ratio) {
b2GearJoint_SetRatio(this.ptr, ratio);
this.ratio = ratio;
}

var b2GearJointDef_Create = Module.cwrap("b2GearJointDef_Create",
Expand All @@ -33,7 +33,7 @@ function b2GearJointDef() {
this.ratio = 0;
}

b2GearJointDef.prototype.Create = function(world) {
b2GearJointDef.prototype.Create = function (world) {
var gearJoint = new b2GearJoint(this);
gearJoint.ptr = b2GearJointDef_Create(
world.ptr,
Expand Down
20 changes: 10 additions & 10 deletions liquidfun/Box2D/lfjs/jsBindings/Dynamics/Joints/b2Joint.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,40 +36,40 @@ function b2Joint(def) {
this.userData = def.userData;
}

b2Joint.prototype.GetBodyA = function() {
b2Joint.prototype.GetBodyA = function () {
return world.bodiesLookup[b2Joint_GetBodyA(this.ptr)];
};

b2Joint.prototype.GetBodyB = function() {
b2Joint.prototype.GetBodyB = function () {
return world.bodiesLookup[b2Joint_GetBodyB(this.ptr)];
};

b2Joint.prototype.GetType = function() {
b2Joint.prototype.GetType = function () {
return b2Joint_GetType(this.ptr);
};

b2Joint.prototype.GetAnchorA = function() {
b2Joint.prototype.GetAnchorA = function () {
b2Joint_GetAnchorA(this.ptr, _vec2Buf.byteOffset);
var result = new Float32Array(_vec2Buf.buffer, _vec2Buf.byteOffset, _vec2Buf.length);
return new b2Vec2(result[0], result[1]);
};
b2Joint.prototype.GetAnchorB = function() {

b2Joint.prototype.GetAnchorB = function () {
b2Joint_GetAnchorB(this.ptr, _vec2Buf.byteOffset);
var result = new Float32Array(_vec2Buf.buffer, _vec2Buf.byteOffset, _vec2Buf.length);
return new b2Vec2(result[0], result[1]);
};
b2Joint.prototype.GetReactionForce = function(inv_dt) {
b2Joint.prototype.GetReactionForce = function (inv_dt) {
b2Joint_GetReactionForce(this.ptr, inv_dt, _vec2Buf);
var result = new Float32Array(_vec2Buf.buffer, _vec2Buf.byteOffset, _vec2Buf.length);
return new b2Vec2(result[0], result[1]);
}
b2Joint.prototype.GetReactionTorque = function(inv_dt) {
b2Joint.prototype.GetReactionTorque = function (inv_dt) {
return b2Joint_GetReactionTorque(this.ptr, inv_dt);
}
b2Joint.prototype.IsActive = function() {
b2Joint.prototype.IsActive = function () {
return b2Joint_IsActive(this.ptr);
}
b2Joint.prototype.GetCollideConnected = function() {
b2Joint.prototype.GetCollideConnected = function () {
return b2Joint_GetCollideConnected(this.ptr);
}
26 changes: 13 additions & 13 deletions liquidfun/Box2D/lfjs/jsBindings/Dynamics/Joints/b2MotorJoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,25 @@ function b2MotorJoint(def) {
b2MotorJoint.prototype = Object.create(b2Joint.prototype);
b2MotorJoint.prototype.constructor = b2MotorJoint;

b2MotorJoint.prototype.SetAngularOffset = function(angle) {
b2MotorJoint.prototype.SetAngularOffset = function (angle) {
b2MotorJoint_SetAngularOffset(this.ptr, angle);
this.angularOffset = angle;
};
b2MotorJoint.prototype.SetLinearOffset = function(v) {
b2MotorJoint.prototype.SetLinearOffset = function (v) {
b2MotorJoint_SetLinearOffset(this.ptr, v.x, v.y);
this.linearOffset.Set(v.x, v.y);
};
b2MotorJoint.prototype.SetMaxForce = function(force) {
b2MotorJoint_SetMaxForce(this.ptr, force);
this.maxForce = force;
b2MotorJoint.prototype.SetMaxForce = function (force) {
b2MotorJoint_SetMaxForce(this.ptr, force);
this.maxForce = force;
}
b2MotorJoint.prototype.SetMaxTorque = function(torque) {
b2MotorJoint_SetMaxTorque(this.ptr, torque);
this.maxTorque = torque;
b2MotorJoint.prototype.SetMaxTorque = function (torque) {
b2MotorJoint_SetMaxTorque(this.ptr, torque);
this.maxTorque = torque;
}
b2MotorJoint.prototype.SetCorrectionFactor = function(factor) {
b2MotorJoint_SetCorrectionFactor(this.ptr, factor);
this.correctionFactor = factor;
b2MotorJoint.prototype.SetCorrectionFactor = function (factor) {
b2MotorJoint_SetCorrectionFactor(this.ptr, factor);
this.correctionFactor = factor;
}

var b2MotorJointDef_Create = Module.cwrap("b2MotorJointDef_Create",
Expand Down Expand Up @@ -76,7 +76,7 @@ function b2MotorJointDef() {
this.maxTorque = 0;
}

b2MotorJointDef.prototype.Create = function(world) {
b2MotorJointDef.prototype.Create = function (world) {
var motorJoint = new b2MotorJoint(this);
motorJoint.ptr = b2MotorJointDef_Create(
world.ptr,
Expand All @@ -88,7 +88,7 @@ b2MotorJointDef.prototype.Create = function(world) {
return motorJoint;
};

b2MotorJointDef.prototype.InitializeAndCreate = function(bodyA, bodyB) {
b2MotorJointDef.prototype.InitializeAndCreate = function (bodyA, bodyB) {
this.bodyA = bodyA;
this.bodyB = bodyB;
var motorJoint = new b2MotorJoint(this);
Expand Down
22 changes: 11 additions & 11 deletions liquidfun/Box2D/lfjs/jsBindings/Dynamics/Joints/b2MouseJoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@ function b2MouseJoint(def) {
b2MouseJoint.prototype = Object.create(b2Joint.prototype);
b2MouseJoint.prototype.constructor = b2MouseJoint;

b2MouseJoint.prototype.SetTarget = function(p) {
b2MouseJoint.prototype.SetTarget = function (p) {
b2MouseJoint_SetTarget(this.ptr, p.x, p.y);
this.target.Set(p.x, p.y);
};
b2MouseJoint.prototype.SetMaxForce = function(force) {
b2MouseJoint_SetMaxForce(this.ptr, force);
this.maxForce = force;
b2MouseJoint.prototype.SetMaxForce = function (force) {
b2MouseJoint_SetMaxForce(this.ptr, force);
this.maxForce = force;
}
b2MouseJoint.prototype.SetFrequency = function(hz) {
b2MouseJoint_SetFrequency(this.ptr, hz);
this.frequencyHz = hz;
b2MouseJoint.prototype.SetFrequency = function (hz) {
b2MouseJoint_SetFrequency(this.ptr, hz);
this.frequencyHz = hz;
}
b2MouseJoint.prototype.SetDampingRatio = function(ratio) {
b2MouseJoint_SetDampingRatio(this.ptr, ratio);
this.dampingRatio = ratio;
b2MouseJoint.prototype.SetDampingRatio = function (ratio) {
b2MouseJoint_SetDampingRatio(this.ptr, ratio);
this.dampingRatio = ratio;
}

var b2MouseJointDef_Create = Module.cwrap("b2MouseJointDef_Create",
Expand All @@ -55,7 +55,7 @@ function b2MouseJointDef() {
this.target = new b2Vec2();
}

b2MouseJointDef.prototype.Create = function(world) {
b2MouseJointDef.prototype.Create = function (world) {
var mouseJoint = new b2MouseJoint(this);
mouseJoint.ptr = b2MouseJointDef_Create(
world.ptr,
Expand Down
48 changes: 24 additions & 24 deletions liquidfun/Box2D/lfjs/jsBindings/Dynamics/Joints/b2PrismaticJoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,58 +31,58 @@ function b2PrismaticJoint(def) {
b2PrismaticJoint.prototype = Object.create(b2Joint.prototype);
b2PrismaticJoint.prototype.constructor = b2PrismaticJoint;

b2PrismaticJoint.prototype.EnableLimit = function(flag) {
b2PrismaticJoint.prototype.EnableLimit = function (flag) {
return b2PrismaticJoint_EnableLimit(this.ptr, flag);
};

b2PrismaticJoint.prototype.EnableMotor = function(flag) {
b2PrismaticJoint.prototype.EnableMotor = function (flag) {
return b2PrismaticJoint_EnableMotor(this.ptr, flag);
};

b2PrismaticJoint.prototype.GetJointTranslation = function() {
b2PrismaticJoint.prototype.GetJointTranslation = function () {
return b2PrismaticJoint_GetJointTranslation(this.ptr);
};

b2PrismaticJoint.prototype.GetMotorSpeed = function() {
b2PrismaticJoint.prototype.GetMotorSpeed = function () {
return b2PrismaticJoint_GetMotorSpeed(this.ptr);
};

b2PrismaticJoint.prototype.GetMotorForce = function(hz) {
b2PrismaticJoint.prototype.GetMotorForce = function (hz) {
return b2PrismaticJoint_GetMotorForce(this.ptr, hz);
};

b2PrismaticJoint.prototype.IsLimitEnabled = function() {
b2PrismaticJoint.prototype.IsLimitEnabled = function () {
return b2PrismaticJoint_IsLimitEnabled(this.ptr);
};

b2PrismaticJoint.prototype.IsMotorEnabled = function() {
b2PrismaticJoint.prototype.IsMotorEnabled = function () {
return b2PrismaticJoint_IsMotorEnabled(this.ptr);
};

b2PrismaticJoint.prototype.GetMotorEnabled = function() {
b2PrismaticJoint.prototype.GetMotorEnabled = function () {
return b2PrismaticJoint_IsMotorEnabled(this.ptr);
};

b2PrismaticJoint.prototype.SetMotorSpeed = function(speed) {
b2PrismaticJoint.prototype.SetMotorSpeed = function (speed) {
return b2PrismaticJoint_SetMotorSpeed(this.ptr, speed);
};

b2PrismaticJoint.prototype.GetLocalAxisA = function() {
b2PrismaticJoint_GetLocalAxisA(this.ptr, _vec2Buf.byteOffset);
var result = new Float32Array(_vec2Buf.buffer, _vec2Buf.byteOffset, _vec2Buf.length);
return new b2Vec2(result[0], result[1]);
b2PrismaticJoint.prototype.GetLocalAxisA = function () {
b2PrismaticJoint_GetLocalAxisA(this.ptr, _vec2Buf.byteOffset);
var result = new Float32Array(_vec2Buf.buffer, _vec2Buf.byteOffset, _vec2Buf.length);
return new b2Vec2(result[0], result[1]);
}
b2PrismaticJoint.prototype.GetJointSpeed = function() {
return b2PrismaticJoint_GetJointSpeed(this.ptr);
b2PrismaticJoint.prototype.GetJointSpeed = function () {
return b2PrismaticJoint_GetJointSpeed(this.ptr);
}
b2PrismaticJoint.prototype.SetLimits = function(lower, upper) {
b2PrismaticJoint_SetLimits(this.ptr, lower, upper);
this.lowerTranslation = lower;
this.upperTranslation = upper;
b2PrismaticJoint.prototype.SetLimits = function (lower, upper) {
b2PrismaticJoint_SetLimits(this.ptr, lower, upper);
this.lowerTranslation = lower;
this.upperTranslation = upper;
}
b2PrismaticJoint.prototype.SetMaxMotorForce = function(force) {
b2PrismaticJoint_SetMaxMotorForce(this.ptr, force);
this.maxMotorForce = force;
b2PrismaticJoint.prototype.SetMaxMotorForce = function (force) {
b2PrismaticJoint_SetMaxMotorForce(this.ptr, force);
this.maxMotorForce = force;
}

var b2PrismaticJointDef_Create = Module.cwrap("b2PrismaticJointDef_Create",
Expand Down Expand Up @@ -129,7 +129,7 @@ function b2PrismaticJointDef() {
this.upperTranslation = 0;
}

b2PrismaticJointDef.prototype.Create = function(world) {
b2PrismaticJointDef.prototype.Create = function (world) {
var prismaticJoint = new b2PrismaticJoint(this);
prismaticJoint.ptr = b2PrismaticJointDef_Create(
world.ptr,
Expand All @@ -144,7 +144,7 @@ b2PrismaticJointDef.prototype.Create = function(world) {
return prismaticJoint;
};

b2PrismaticJointDef.prototype.InitializeAndCreate = function(bodyA, bodyB, anchor, axis) {
b2PrismaticJointDef.prototype.InitializeAndCreate = function (bodyA, bodyB, anchor, axis) {
this.bodyA = bodyA;
this.bodyB = bodyB;
var prismaticJoint = new b2PrismaticJoint(this);
Expand Down
Loading

0 comments on commit 39c93fb

Please sign in to comment.