提交 729c52f7 编写于 作者: M Mr.doob

SVGLoader: Handle double decimal values. See #13919

上级 a24fe06a
......@@ -630,7 +630,18 @@ THREE.SVGLoader.prototype = {
for ( var i = 0; i < array.length; i ++ ) {
array[ i ] = parseFloat( array[ i ] );
var number = array[ i ];
// Handle values like 48.6037.7
// TODO Find a regex for this
if ( number.indexOf( '.' ) !== number.lastIndexOf( '.' ) ) {
array.splice( i + 1, 0, '0.' + number.split( '.' )[ 2 ] );
}
array[ i ] = parseFloat( number );
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册