Fix Vertices.chamfer radius argument

This commit is contained in:
Richard Davey 2017-11-26 23:17:12 +00:00
parent 10d7be0785
commit dc7289e539

View file

@ -275,7 +275,12 @@ var Common = require('../core/Common');
* @param {number} qualityMax
*/
Vertices.chamfer = function(vertices, radius, quality, qualityMin, qualityMax) {
radius = radius || [8];
if (typeof radius === 'number') {
radius = [radius];
} else {
radius = radius || [8];
}
if (!radius.length)
radius = [radius];