Skip to content

Commit

Permalink
Added global comments for jshinting
Browse files Browse the repository at this point in the history
  • Loading branch information
timrwood committed Apr 16, 2012
1 parent 0d1d428 commit 653bcca
Show file tree
Hide file tree
Showing 20 changed files with 74 additions and 6 deletions.
42 changes: 36 additions & 6 deletions build/cannon.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ var CANNON = CANNON || {};
// Maintain compatibility with older browsers
var Int32Array = Int32Array || Array;
var Float32Array = Float32Array || Array;
/*global CANNON:true */

/**
* @class CANNON.Broadphase
* @author schteppe
Expand All @@ -53,6 +55,8 @@ CANNON.Broadphase.prototype.collisionPairs = function(world){
throw "collisionPairs not implemented for this BroadPhase class!";
};

/*global CANNON:true */

/**
* @class CANNON.NaiveBroadphase
* @brief Naive broadphase implementation, used in lack of better ones. The naive broadphase looks at all possible pairs without restriction, therefore it has complexity N^2 (which is bad)
Expand Down Expand Up @@ -147,6 +151,8 @@ CANNON.NaiveBroadphase.prototype.collisionPairs = function(world){
}
return [pairs1,pairs2];
};
/*global CANNON:true */

/**
* @class CANNON.Mat3
* @brief Produce a 3x3 matrix. Columns first!
Expand Down Expand Up @@ -359,7 +365,9 @@ CANNON.Mat3.prototype.toString = function(){
for(var i=0; i<9; i++)
r += this.elements[i] + sep;
return r;
};/**
};/*global CANNON:true */

/**
* @class CANNON.Vec3
* @brief 3-dimensional vector
* @param float x
Expand Down Expand Up @@ -621,6 +629,8 @@ CANNON.Vec3.prototype.copy = function(target){
target.z = this.z;
return target;
};
/*global CANNON:true */

/**
* @class CANNON.Quaternion
* @brief 4-dimensional quaternion
Expand Down Expand Up @@ -809,7 +819,9 @@ CANNON.Quaternion.prototype.copy = function(target){
target.y = this.y;
target.z = this.z;
target.w = this.w;
};/**
};/*global CANNON:true */

/**
* @class CANNON.Shape
* @author schteppe
* @brief Base class for shapes
Expand Down Expand Up @@ -891,6 +903,8 @@ CANNON.Shape.types = {
COMPOUND:8
};

/*global CANNON:true */

/**
* @class CANNON.RigidBody
* @brief Rigid body base class
Expand Down Expand Up @@ -1029,6 +1043,8 @@ CANNON.RigidBody = function(mass,shape,material){
*/
this.world = null;
};
/*global CANNON:true */

/**
* @brief Spherical rigid body
* @class CANNON.Sphere
Expand Down Expand Up @@ -1059,7 +1075,9 @@ CANNON.Sphere.prototype.volume = function(){

CANNON.Sphere.prototype.boundingSphereRadius = function(){
return this.radius;
};/**
};/*global CANNON:true */

/**
* @class CANNON.Box
* @param CANNON.Vec3 halfExtents
* @author schteppe
Expand Down Expand Up @@ -1141,7 +1159,9 @@ CANNON.Box.prototype.volume = function(){

CANNON.Box.prototype.boundingSphereRadius = function(){
return this.halfExtents.norm();
};/**
};/*global CANNON:true */

/**
* @class CANNON.Plane
* @extends CANNON.Shape
* @param CANNON.Vec3 normal
Expand All @@ -1163,7 +1183,9 @@ CANNON.Plane.prototype.calculateLocalInertia = function(mass,target){

CANNON.Plane.prototype.volume = function(){
return Infinity; // The plane is infinite...
};/**
};/*global CANNON:true */

/**
* @class CANNON.Compound
* @extends CANNON.Shape
* @brief Compound shape
Expand Down Expand Up @@ -1239,7 +1261,9 @@ CANNON.Compound.prototype.boundingSphereRadius = function(){
r = candidate;
}
return r;
};/**
};/*global CANNON:true */

/**
* @class CANNON.Solver
* @brief Constraint solver.
* @todo The spook parameters should be specified for each constraint, not globally.
Expand Down Expand Up @@ -1570,6 +1594,8 @@ CANNON.Solver.prototype.solve = function(){
this.wylambda[i],
this.wzlambda[i]);
};
/*global CANNON:true */

/**
* @class CANNON.Material
* @brief Defines a physics material.
Expand All @@ -1585,6 +1611,8 @@ CANNON.Material = function(name){
this.id = -1;
};

/*global CANNON:true */

/**
* @class CANNON.ContactMaterial
* @brief Defines what happens when two materials meet.
Expand All @@ -1610,6 +1638,8 @@ CANNON.ContactMaterial = function(m1, m2, friction, restitution){

};

/*global CANNON:true */

/**
* @class CANNON.World
* @brief The physics world
Expand Down
2 changes: 2 additions & 0 deletions src/collision/Broadphase.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/*global CANNON:true */

/**
* @class CANNON.Broadphase
* @author schteppe
Expand Down
2 changes: 2 additions & 0 deletions src/collision/NaiveBroadphase.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/*global CANNON:true */

/**
* @class CANNON.NaiveBroadphase
* @brief Naive broadphase implementation, used in lack of better ones. The naive broadphase looks at all possible pairs without restriction, therefore it has complexity N^2 (which is bad)
Expand Down
2 changes: 2 additions & 0 deletions src/constraints/Constraint.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/*global CANNON:true */

/**
* Constraint base class
* @author schteppe
Expand Down
2 changes: 2 additions & 0 deletions src/constraints/PointToPointConstraint.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/*global CANNON:true */

/**
* Point to point constraint class
* @author schteppe
Expand Down
2 changes: 2 additions & 0 deletions src/demo/Demo.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/*global CANNON:true */

/**
* @class CANNON.Demo
* @brief Demo framework class. If you want to learn how to connect Cannon.js with Three.js, please look at the examples/ instead.
Expand Down
2 changes: 2 additions & 0 deletions src/material/ContactMaterial.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/*global CANNON:true */

/**
* @class CANNON.ContactMaterial
* @brief Defines what happens when two materials meet.
Expand Down
2 changes: 2 additions & 0 deletions src/material/Material.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/*global CANNON:true */

/**
* @class CANNON.Material
* @brief Defines a physics material.
Expand Down
2 changes: 2 additions & 0 deletions src/math/Mat3.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/*global CANNON:true */

/**
* @class CANNON.Mat3
* @brief Produce a 3x3 matrix. Columns first!
Expand Down
2 changes: 2 additions & 0 deletions src/math/MatN.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/*global CANNON:true */

/**
* @class CANNON.MatN
* @brief Any matrix size class
Expand Down
2 changes: 2 additions & 0 deletions src/math/Quaternion.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/*global CANNON:true */

/**
* @class CANNON.Quaternion
* @brief 4-dimensional quaternion
Expand Down
2 changes: 2 additions & 0 deletions src/math/Vec3.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/*global CANNON:true */

/**
* @class CANNON.Vec3
* @brief 3-dimensional vector
Expand Down
2 changes: 2 additions & 0 deletions src/objects/Box.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/*global CANNON:true */

/**
* @class CANNON.Box
* @param CANNON.Vec3 halfExtents
Expand Down
2 changes: 2 additions & 0 deletions src/objects/Compound.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/*global CANNON:true */

/**
* @class CANNON.Compound
* @extends CANNON.Shape
Expand Down
2 changes: 2 additions & 0 deletions src/objects/Plane.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/*global CANNON:true */

/**
* @class CANNON.Plane
* @extends CANNON.Shape
Expand Down
2 changes: 2 additions & 0 deletions src/objects/RigidBody.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/*global CANNON:true */

/**
* @class CANNON.RigidBody
* @brief Rigid body base class
Expand Down
2 changes: 2 additions & 0 deletions src/objects/Shape.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/*global CANNON:true */

/**
* @class CANNON.Shape
* @author schteppe
Expand Down
2 changes: 2 additions & 0 deletions src/objects/Sphere.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/*global CANNON:true */

/**
* @brief Spherical rigid body
* @class CANNON.Sphere
Expand Down
2 changes: 2 additions & 0 deletions src/solver/Solver.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/*global CANNON:true */

/**
* @class CANNON.Solver
* @brief Constraint solver.
Expand Down
2 changes: 2 additions & 0 deletions src/world/World.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/*global CANNON:true */

/**
* @class CANNON.World
* @brief The physics world
Expand Down

0 comments on commit 653bcca

Please sign in to comment.