0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2024-11-27 09:50:52 -05:00

fixed Vertices.fromPath when parsing scientific notation

This commit is contained in:
liabru 2015-04-26 19:41:49 +01:00
parent bc8840673f
commit dae684d082

View file

@ -57,7 +57,7 @@ var Vertices = {};
* @return {vertices} vertices
*/
Vertices.fromPath = function(path, body) {
var pathPattern = /L?\s*([\-\d\.]+)[\s,]*([\-\d\.]+)*/ig,
var pathPattern = /L?\s*([\-\d\.e]+)[\s,]*([\-\d\.e]+)*/ig,
points = [];
path.replace(pathPattern, function(match, x, y) {