提交 be800da8 编写于 作者: E Emery

Make ellipses work with negative angles

上级 d5b6d6ad
......@@ -24,6 +24,14 @@ THREE.EllipseCurve.prototype.getPoint = function ( t ) {
var angle;
var deltaAngle = this.aEndAngle - this.aStartAngle;
if(deltaAngle < 0) {
deltaAngle += Math.PI*2;
}
if(deltaAngle > Math.PI*2) {
deltaAngle -= Math.PI*2;
}
if ( this.aClockwise === true ) {
angle = this.aEndAngle + ( 1 - t ) * ( Math.PI * 2 - deltaAngle );
......@@ -39,4 +47,4 @@ THREE.EllipseCurve.prototype.getPoint = function ( t ) {
return new THREE.Vector2( tx, ty );
};
\ No newline at end of file
};
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册