0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2024-11-27 09:50:52 -05:00
This commit is contained in:
liabru 2017-02-02 00:17:01 +00:00
parent 8c140bd11c
commit 0ce686d0c1
10 changed files with 6 additions and 11 deletions

View file

@ -1,5 +1,6 @@
{ {
"rules": { "rules": {
"no-fallthrough": 2,
"no-console": 0, "no-console": 0,
"no-unused-vars": 0, "no-unused-vars": 0,
"indent": [ "indent": [

View file

@ -51,7 +51,6 @@ Example.broadphase = function() {
} else { } else {
return Bodies.rectangle(x, y, Common.random(80, 120), Common.random(20, 30)); return Bodies.rectangle(x, y, Common.random(80, 120), Common.random(20, 30));
} }
break;
case 1: case 1:
return Bodies.polygon(x, y, Math.round(Common.random(1, 8)), Common.random(20, 50)); return Bodies.polygon(x, y, Math.round(Common.random(1, 8)), Common.random(20, 50));

View file

@ -52,7 +52,6 @@ Example.gravity = function() {
} else { } else {
return Bodies.rectangle(x, y, Common.random(80, 120), Common.random(20, 30)); return Bodies.rectangle(x, y, Common.random(80, 120), Common.random(20, 30));
} }
break;
case 1: case 1:
return Bodies.polygon(x, y, Math.round(Common.random(1, 8)), Common.random(20, 50)); return Bodies.polygon(x, y, Math.round(Common.random(1, 8)), Common.random(20, 50));

View file

@ -54,7 +54,6 @@ Example.gyro = function() {
} else { } else {
return Bodies.rectangle(x, y, Common.random(80, 120), Common.random(25, 30), { chamfer: chamfer }); return Bodies.rectangle(x, y, Common.random(80, 120), Common.random(25, 30), { chamfer: chamfer });
} }
break;
case 1: case 1:
return Bodies.polygon(x, y, sides, Common.random(25, 50), { chamfer: chamfer }); return Bodies.polygon(x, y, sides, Common.random(25, 50), { chamfer: chamfer });
} }

View file

@ -54,7 +54,6 @@ Example.mixed = function() {
} else { } else {
return Bodies.rectangle(x, y, Common.random(80, 120), Common.random(25, 30), { chamfer: chamfer }); return Bodies.rectangle(x, y, Common.random(80, 120), Common.random(25, 30), { chamfer: chamfer });
} }
break;
case 1: case 1:
return Bodies.polygon(x, y, sides, Common.random(25, 50), { chamfer: chamfer }); return Bodies.polygon(x, y, sides, Common.random(25, 50), { chamfer: chamfer });
} }

View file

@ -46,7 +46,6 @@ Example.raycasting = function() {
} else { } else {
return Bodies.rectangle(x, y, Common.random(80, 120), Common.random(20, 30)); return Bodies.rectangle(x, y, Common.random(80, 120), Common.random(20, 30));
} }
break;
case 1: case 1:
var sides = Math.round(Common.random(1, 8)); var sides = Math.round(Common.random(1, 8));
sides = (sides === 3) ? 4 : sides; sides = (sides === 3) ? 4 : sides;

View file

@ -53,7 +53,6 @@ Example.sleeping = function() {
} else { } else {
return Bodies.rectangle(x, y, Common.random(80, 120), Common.random(20, 30)); return Bodies.rectangle(x, y, Common.random(80, 120), Common.random(20, 30));
} }
break;
case 1: case 1:
return Bodies.polygon(x, y, Math.round(Common.random(1, 8)), Common.random(20, 50)); return Bodies.polygon(x, y, Math.round(Common.random(1, 8)), Common.random(20, 50));

View file

@ -109,7 +109,6 @@ Example.timescale = function() {
} else { } else {
return Bodies.rectangle(x, y, Common.random(80, 120), Common.random(20, 30), bodyOptions); return Bodies.rectangle(x, y, Common.random(80, 120), Common.random(20, 30), bodyOptions);
} }
break;
case 1: case 1:
return Bodies.polygon(x, y, Math.round(Common.random(4, 8)), Common.random(20, 50), bodyOptions); return Bodies.polygon(x, y, Math.round(Common.random(4, 8)), Common.random(20, 50), bodyOptions);

View file

@ -63,7 +63,6 @@ Example.views = function() {
} else { } else {
return Bodies.rectangle(x, y, Common.random(80, 120), Common.random(20, 30)); return Bodies.rectangle(x, y, Common.random(80, 120), Common.random(20, 30));
} }
break;
case 1: case 1:
var sides = Math.round(Common.random(1, 8)); var sides = Math.round(Common.random(1, 8));
sides = (sides === 3) ? 4 : sides; sides = (sides === 3) ? 4 : sides;

View file

@ -228,8 +228,10 @@ module.exports = Vector;
* @type {vector[]} * @type {vector[]}
* @private * @private
*/ */
Vector._temp = [Vector.create(), Vector.create(), Vector._temp = [
Vector.create(), Vector.create(), Vector.create(), Vector.create(),
Vector.create(), Vector.create()]; Vector.create(), Vector.create(),
Vector.create(), Vector.create()
];
})(); })();