Browse Source

CurvePath.getPoints() for Arcs resolution should be doubled (#9168)

* CurvePath.getPoints() for Arcs resolution should be doubled

- like previous behaviour
- see #9079

* CurvePath: increase resolution of spline curves
Joshua Koo 9 years ago
parent
commit
8dcd65ebc4
1 changed files with 6 additions and 1 deletions
  1. 6 1
      src/extras/core/CurvePath.js

+ 6 - 1
src/extras/core/CurvePath.js

@@ -163,7 +163,12 @@ THREE.CurvePath.prototype = Object.assign( Object.create( THREE.Curve.prototype
 		for ( var i = 0, curves = this.curves; i < curves.length; i ++ ) {
 
 			var curve = curves[ i ];
-			var pts = curve.getPoints( curve instanceof THREE.LineCurve ? 1 : divisions );
+			var resolution = curve instanceof THREE.EllipseCurve ? divisions * 2
+				: curve instanceof THREE.LineCurve ? 1
+				: curve instanceof THREE.SplineCurve ? divisions * curves.points.length
+				: divisions;
+
+			var pts = curve.getPoints( resolution );
 
 			for ( var j = 0; j < pts.length; j++ ) {