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

SVGLoader: Fixed getReflection() and fixed control point after c command.

上级 f36c9c59
......@@ -289,6 +289,8 @@ THREE.SVGLoader.prototype = {
point.x + numbers[ j + 4 ],
point.y + numbers[ j + 5 ]
);
control.x = point.x + numbers[ j + 2 ];
control.y = point.y + numbers[ j + 3 ];
point.x += numbers[ j + 4 ];
point.y += numbers[ j + 5 ];
}
......@@ -297,8 +299,6 @@ THREE.SVGLoader.prototype = {
case 's':
var numbers = parseFloats( data );
path.bezierCurveTo(
// TODO: Not sure if point needs
// to be added to reflection...
getReflection( point.x, control.x ),
getReflection( point.y, control.y ),
point.x + numbers[ 0 ],
......@@ -620,7 +620,7 @@ THREE.SVGLoader.prototype = {
function getReflection( a, b ) {
return 2 * a - ( b - a );
return a - ( b - a );
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册