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 {
1993
1993
const currEdge = this . edges [ i ] ;
1994
1994
const begin = this . vertices [ currEdge [ 0 ] ] ;
1995
1995
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 ] ;
1996
2002
const fromColor = this . vertexStrokeColors . length > 0
1997
2003
? this . vertexStrokeColors . slice (
1998
2004
currEdge [ 0 ] * 4 ,
@@ -2056,7 +2062,7 @@ p5.Geometry = class Geometry {
2056
2062
this . vertices [ prevEdge [ 1 ] ] ,
2057
2063
lastValidDir ,
2058
2064
existingCap . dir . copy ( ) . mult ( - 1 ) ,
2059
- fromColor
2065
+ prevColor
2060
2066
) ;
2061
2067
potentialCaps . delete ( prevEdge [ 1 ] ) ;
2062
2068
connected . add ( prevEdge [ 1 ] ) ;
@@ -2065,7 +2071,7 @@ p5.Geometry = class Geometry {
2065
2071
potentialCaps . set ( prevEdge [ 1 ] , {
2066
2072
point : this . vertices [ prevEdge [ 1 ] ] ,
2067
2073
dir : lastValidDir ,
2068
- color : fromColor
2074
+ color : prevColor
2069
2075
} ) ;
2070
2076
}
2071
2077
lastValidDir = undefined ;
You can’t perform that action at this time.
0 commit comments