0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2025-01-31 18:14:55 -05:00

fix undefined variables, added jshint checks, closes #102

This commit is contained in:
liabru 2015-07-02 20:16:20 +01:00
parent f770a7c586
commit 536e55f496
4 changed files with 20 additions and 4 deletions

View file

@ -25,5 +25,18 @@
"sub" : false, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`.
"trailing" : false, // Prohibit trailing whitespaces.
"white" : false, // Check against strict whitespace and indentation rules.
"indent" : 4 // Specify indentation spacing
"indent" : 4, // Specify indentation spacing
// variables
"undef": true,
"-W079": true, // Silence redefinition errors (they are false positives).
"predef": [
"Matter", "window", "document", "Element", "MatterTools", "PIXI",
"$", "Image", "navigator", "setTimeout", "decomp", "HTMLElement",
"Body", "Composite", "World", "Contact", "Detector", "Grid",
"Pairs", "Pair", "Resolver", "SAT", "Constraint", "MouseConstraint",
"Common", "Engine", "Mouse", "Sleeping", "Bodies", "Composites",
"Axes", "Bounds", "Vector", "Vertices", "Render", "RenderPixi",
"Events", "Query", "Runner", "Svg", "Metrics"
]
}

View file

@ -51,6 +51,7 @@ var Resolver = {};
normal,
bodyBtoA,
contactShare,
positionImpulse,
contactCount = {},
tempA = Vector._temp[0],
tempB = Vector._temp[1],

View file

@ -26,7 +26,7 @@ var Svg = {};
var i, il, total, point, segment, segments,
segmentsQueue, lastSegment,
lastPoint, segmentIndex, points = [],
length = 0, x = 0, y = 0;
lx, ly, length = 0, x = 0, y = 0;
sampleLength = sampleLength || 15;

View file

@ -387,7 +387,8 @@ var Render = {};
options = render.options,
body,
part,
i;
i,
k;
for (i = 0; i < bodies.length; i++) {
body = bodies[i];
@ -684,7 +685,8 @@ var Render = {};
options = render.options,
body,
part,
i;
i,
k;
c.beginPath();