mirror of
https://github.com/liabru/matter-js.git
synced 2024-11-23 09:26:51 -05:00
appease jshint
This commit is contained in:
parent
a46851597a
commit
23a0fce2c0
4 changed files with 10 additions and 9 deletions
|
@ -905,10 +905,10 @@
|
||||||
if (renderController.clear)
|
if (renderController.clear)
|
||||||
renderController.clear(_engine.render);
|
renderController.clear(_engine.render);
|
||||||
|
|
||||||
if (Events) {
|
/*if (Events) {
|
||||||
// clear all events
|
// clear all events
|
||||||
//Events.off(_engine);
|
Events.off(_engine);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
_engine.enableSleeping = false;
|
_engine.enableSleeping = false;
|
||||||
_engine.world.gravity.y = 1;
|
_engine.world.gravity.y = 1;
|
||||||
|
|
|
@ -372,13 +372,13 @@ var Composite = {};
|
||||||
object;
|
object;
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'body':
|
case 'body':
|
||||||
objects = Composite.allBodies(composite);
|
objects = Composite.allBodies(composite);
|
||||||
break;
|
break;
|
||||||
case 'constraint':
|
case 'constraint':
|
||||||
objects = Composite.allConstraints(composite);
|
objects = Composite.allConstraints(composite);
|
||||||
break;
|
break;
|
||||||
case 'composite':
|
case 'composite':
|
||||||
objects = Composite.allComposites(composite).concat(composite);
|
objects = Composite.allComposites(composite).concat(composite);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,8 +17,9 @@ var Query = {};
|
||||||
* @return {object[]} Collisions
|
* @return {object[]} Collisions
|
||||||
*/
|
*/
|
||||||
Query.ray = function(bodies, startPoint, endPoint, rayWidth) {
|
Query.ray = function(bodies, startPoint, endPoint, rayWidth) {
|
||||||
|
rayWidth = rayWidth || Number.MIN_VALUE;
|
||||||
|
|
||||||
var rayAngle = Vector.angle(startPoint, endPoint),
|
var rayAngle = Vector.angle(startPoint, endPoint),
|
||||||
rayWidth = rayWidth || Number.MIN_VALUE,
|
|
||||||
rayLength = Vector.magnitude(Vector.sub(startPoint, endPoint)),
|
rayLength = Vector.magnitude(Vector.sub(startPoint, endPoint)),
|
||||||
rayX = (endPoint.x + startPoint.x) * 0.5,
|
rayX = (endPoint.x + startPoint.x) * 0.5,
|
||||||
rayY = (endPoint.y + startPoint.y) * 0.5,
|
rayY = (endPoint.y + startPoint.y) * 0.5,
|
||||||
|
|
|
@ -175,7 +175,7 @@ var Vertices = {};
|
||||||
* @param {number} scaleY
|
* @param {number} scaleY
|
||||||
* @param {vector} point
|
* @param {vector} point
|
||||||
*/
|
*/
|
||||||
Vertices.scale = function(vertices, scaleX, scaleY, point) {
|
Vertices.scale = function(vertices, scaleX, scaleY, point) {
|
||||||
if (scaleX === 1 && scaleY === 1)
|
if (scaleX === 1 && scaleY === 1)
|
||||||
return vertices;
|
return vertices;
|
||||||
|
|
||||||
|
@ -192,6 +192,6 @@ var Vertices = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
return vertices;
|
return vertices;
|
||||||
};
|
};
|
||||||
|
|
||||||
})();
|
})();
|
Loading…
Reference in a new issue