提交 6e4e8998 编写于 作者: R rfm1201 提交者: Mr.doob

Last spline coordinates not stored in actions (#8878)

In the actions array of the Path, the last elements of the args array
need to be the x and y of the last point of the segment added to the
path.
Not the case with splineThru => cause an exception if you add an other
segment after the pline (without a moveTo).
Used the same trick as absellipse does.
上级 6ed74271
......@@ -113,6 +113,10 @@ THREE.Path.prototype = Object.assign( Object.create( THREE.CurvePath.prototype )
var curve = new THREE.SplineCurve( npts );
this.curves.push( curve );
var lastPoint = pts[ pts.length - 1 ];
args.push( lastPoint.x );
args.push( lastPoint.y );
this.actions.push( { action: 'splineThru', args: args } );
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册