0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2024-11-23 09:26:51 -05:00

changed default minimum area in Bodies.fromVertices

This commit is contained in:
liabru 2015-04-21 21:07:09 +01:00
parent 8031090377
commit 998ab33c07

View file

@ -178,7 +178,7 @@ var Bodies = {};
* @param {object} [options]
* @param {bool} [flagInternal=false]
* @param {number} [removeCollinear=0.01]
* @param {number} [minimumArea=0]
* @param {number} [minimumArea=10]
* @return {body}
*/
Bodies.fromVertices = function(x, y, vertexSets, options, flagInternal, removeCollinear, minimumArea) {
@ -197,7 +197,7 @@ var Bodies = {};
flagInternal = typeof flagInternal !== 'undefined' ? flagInternal : false;
removeCollinear = typeof removeCollinear !== 'undefined' ? removeCollinear : 0.01;
minimumArea = typeof minimumArea !== 'undefined' ? minimumArea : 0;
minimumArea = typeof minimumArea !== 'undefined' ? minimumArea : 10;
if (!window.decomp) {
Common.log('Bodies.fromVertices: poly-decomp.js required. Could not decompose vertices. Fallback to convex hull.', 'warn');