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

SVGLoader: Basic A/a command handling to avoid path breakage

上级 c9bb04c1
...@@ -220,7 +220,19 @@ THREE.SVGLoader.prototype = { ...@@ -220,7 +220,19 @@ THREE.SVGLoader.prototype = {
point.y = numbers[ 1 ]; point.y = numbers[ 1 ];
break; break;
// case 'A': break; case 'A':
console.warn( command );
var numbers = parseFloats( data );
for ( var j = 0, jl = numbers.length; j < jl; j += 7 ) {
// TODO
point.x = numbers[ j + 5 ];
point.y = numbers[ j + 6 ];
control.x = point.x;
control.y = point.y;
}
break;
//
case 'm': case 'm':
var numbers = parseFloats( data ); var numbers = parseFloats( data );
...@@ -328,7 +340,19 @@ THREE.SVGLoader.prototype = { ...@@ -328,7 +340,19 @@ THREE.SVGLoader.prototype = {
point.y = point.y + numbers[ 1 ]; point.y = point.y + numbers[ 1 ];
break; break;
// case 'a': break; case 'a':
console.warn( command );
var numbers = parseFloats( data );
for ( var j = 0, jl = numbers.length; j < jl; j += 7 ) {
// TODO
point.x += numbers[ j + 5 ];
point.y += numbers[ j + 6 ];
control.x = point.x;
control.y = point.y;
}
break;
//
case 'Z': case 'Z':
case 'z': case 'z':
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册