From 23a0fce2c019fedad72a8e4f2712ae2c3576f27e Mon Sep 17 00:00:00 2001 From: liabru Date: Tue, 29 Apr 2014 15:29:21 +0100 Subject: [PATCH] appease jshint --- demo/js/Demo.js | 6 +++--- src/body/Composite.js | 6 +++--- src/collision/Query.js | 3 ++- src/geometry/Vertices.js | 4 ++-- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/demo/js/Demo.js b/demo/js/Demo.js index 135f115..04b1079 100644 --- a/demo/js/Demo.js +++ b/demo/js/Demo.js @@ -905,10 +905,10 @@ if (renderController.clear) renderController.clear(_engine.render); - if (Events) { + /*if (Events) { // clear all events - //Events.off(_engine); - } + Events.off(_engine); + }*/ _engine.enableSleeping = false; _engine.world.gravity.y = 1; diff --git a/src/body/Composite.js b/src/body/Composite.js index 6ea8fa0..b8e13d0 100644 --- a/src/body/Composite.js +++ b/src/body/Composite.js @@ -372,13 +372,13 @@ var Composite = {}; object; switch (type) { - case 'body': + case 'body': objects = Composite.allBodies(composite); break; - case 'constraint': + case 'constraint': objects = Composite.allConstraints(composite); break; - case 'composite': + case 'composite': objects = Composite.allComposites(composite).concat(composite); break; } diff --git a/src/collision/Query.js b/src/collision/Query.js index fc80a1c..a1bcafe 100644 --- a/src/collision/Query.js +++ b/src/collision/Query.js @@ -17,8 +17,9 @@ var Query = {}; * @return {object[]} Collisions */ Query.ray = function(bodies, startPoint, endPoint, rayWidth) { + rayWidth = rayWidth || Number.MIN_VALUE; + var rayAngle = Vector.angle(startPoint, endPoint), - rayWidth = rayWidth || Number.MIN_VALUE, rayLength = Vector.magnitude(Vector.sub(startPoint, endPoint)), rayX = (endPoint.x + startPoint.x) * 0.5, rayY = (endPoint.y + startPoint.y) * 0.5, diff --git a/src/geometry/Vertices.js b/src/geometry/Vertices.js index ea3a899..d2801cd 100644 --- a/src/geometry/Vertices.js +++ b/src/geometry/Vertices.js @@ -175,7 +175,7 @@ var Vertices = {}; * @param {number} scaleY * @param {vector} point */ - Vertices.scale = function(vertices, scaleX, scaleY, point) { + Vertices.scale = function(vertices, scaleX, scaleY, point) { if (scaleX === 1 && scaleY === 1) return vertices; @@ -192,6 +192,6 @@ var Vertices = {}; } return vertices; - }; + }; })(); \ No newline at end of file