File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -1993,6 +1993,12 @@ p5.Geometry = class Geometry {
19931993 const currEdge = this . edges [ i ] ;
19941994 const begin = this . vertices [ currEdge [ 0 ] ] ;
19951995 const end = this . vertices [ currEdge [ 1 ] ] ;
1996+ const prevColor = ( this . vertexStrokeColors . length > 0 && prevEdge )
1997+ ? this . vertexStrokeColors . slice (
1998+ prevEdge [ 1 ] * 4 ,
1999+ ( prevEdge [ 1 ] + 1 ) * 4
2000+ )
2001+ : [ 0 , 0 , 0 , 0 ] ;
19962002 const fromColor = this . vertexStrokeColors . length > 0
19972003 ? this . vertexStrokeColors . slice (
19982004 currEdge [ 0 ] * 4 ,
@@ -2056,7 +2062,7 @@ p5.Geometry = class Geometry {
20562062 this . vertices [ prevEdge [ 1 ] ] ,
20572063 lastValidDir ,
20582064 existingCap . dir . copy ( ) . mult ( - 1 ) ,
2059- fromColor
2065+ prevColor
20602066 ) ;
20612067 potentialCaps . delete ( prevEdge [ 1 ] ) ;
20622068 connected . add ( prevEdge [ 1 ] ) ;
@@ -2065,7 +2071,7 @@ p5.Geometry = class Geometry {
20652071 potentialCaps . set ( prevEdge [ 1 ] , {
20662072 point : this . vertices [ prevEdge [ 1 ] ] ,
20672073 dir : lastValidDir ,
2068- color : fromColor
2074+ color : prevColor
20692075 } ) ;
20702076 }
20712077 lastValidDir = undefined ;
You can’t perform that action at this time.
0 commit comments