Skip to content

Commit

Permalink
CurvePath: Use correct line type in closePath(). (#26850)
Browse files Browse the repository at this point in the history
* fix #26849

* Update CurvePath.js

---------

Co-authored-by: Michael Herzog <michael.herzog@human-interactive.org>
  • Loading branch information
GuoBinyong and Mugen87 authored Sep 27, 2023
1 parent 083be57 commit 5c00457
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/extras/core/CurvePath.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ class CurvePath extends Curve {

if ( ! startPoint.equals( endPoint ) ) {

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

}

Expand Down

0 comments on commit 5c00457

Please sign in to comment.