mirror of
https://github.com/liabru/matter-js.git
synced 2024-11-23 09:26:51 -05:00
fix lint
This commit is contained in:
parent
8c140bd11c
commit
0ce686d0c1
10 changed files with 6 additions and 11 deletions
|
@ -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": [
|
||||||
|
|
|
@ -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));
|
||||||
|
|
||||||
|
|
|
@ -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));
|
||||||
|
|
||||||
|
|
|
@ -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 });
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 });
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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));
|
||||||
|
|
||||||
|
|
|
@ -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);
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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()
|
||||||
|
];
|
||||||
|
|
||||||
})();
|
})();
|
Loading…
Reference in a new issue