Skip to content

Commit 5c00457

Browse files
GuoBinyongMugen87
andauthored
CurvePath: Use correct line type in closePath(). (#26850)
* fix #26849 * Update CurvePath.js --------- Co-authored-by: Michael Herzog <[email protected]>
1 parent 083be57 commit 5c00457

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/extras/core/CurvePath.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ class CurvePath extends Curve {
3333

3434
if ( ! startPoint.equals( endPoint ) ) {
3535

36-
this.curves.push( new Curves[ 'LineCurve' ]( endPoint, startPoint ) );
36+
const lineType = ( startPoint.isVector2 === true ) ? 'LineCurve' : 'LineCurve3';
37+
this.curves.push( new Curves[ lineType ]( endPoint, startPoint ) );
3738

3839
}
3940

0 commit comments

Comments
 (0)