mirror of
https://github.com/liabru/matter-js.git
synced 2024-11-27 09:50:52 -05:00
fix Vertices.chamfer radius argument, closes #467
This commit is contained in:
parent
18a084574e
commit
3bceef4f7e
1 changed files with 4 additions and 3 deletions
|
@ -268,10 +268,11 @@ var Common = require('../core/Common');
|
|||
* @param {number} qualityMax
|
||||
*/
|
||||
Vertices.chamfer = function(vertices, radius, quality, qualityMin, qualityMax) {
|
||||
radius = radius || [8];
|
||||
|
||||
if (!radius.length)
|
||||
if (typeof radius === 'number') {
|
||||
radius = [radius];
|
||||
} else {
|
||||
radius = radius || [8];
|
||||
}
|
||||
|
||||
// quality defaults to -1, which is auto
|
||||
quality = (typeof quality !== 'undefined') ? quality : -1;
|
||||
|
|
Loading…
Reference in a new issue