mirror of
https://github.com/liabru/matter-js.git
synced 2024-11-30 10:20: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
|
* @param {number} qualityMax
|
||||||
*/
|
*/
|
||||||
Vertices.chamfer = function(vertices, radius, quality, qualityMin, qualityMax) {
|
Vertices.chamfer = function(vertices, radius, quality, qualityMin, qualityMax) {
|
||||||
radius = radius || [8];
|
if (typeof radius === 'number') {
|
||||||
|
|
||||||
if (!radius.length)
|
|
||||||
radius = [radius];
|
radius = [radius];
|
||||||
|
} else {
|
||||||
|
radius = radius || [8];
|
||||||
|
}
|
||||||
|
|
||||||
// quality defaults to -1, which is auto
|
// quality defaults to -1, which is auto
|
||||||
quality = (typeof quality !== 'undefined') ? quality : -1;
|
quality = (typeof quality !== 'undefined') ? quality : -1;
|
||||||
|
|
Loading…
Reference in a new issue