Browse Source

SVGLoader: Add vertices along counterclockwise if bevel. (#27121)

* fix: add vertices along counterclockwise if bevel

* fix: correcting the index of temp vector inserted into vertices when lineCap is square
Yuyao Nie 1 year ago
parent
commit
b5d11679f4
1 changed files with 4 additions and 4 deletions
  1. 4 4
      examples/jsm/loaders/SVGLoader.js

+ 4 - 4
examples/jsm/loaders/SVGLoader.js

@@ -2968,8 +2968,8 @@ class SVGLoader extends Loader {
 					// Bevel join triangle
 
 					addVertex( currentPointR, u, 1 );
-					addVertex( nextPointR, u, 0 );
-					addVertex( innerPoint, u, 0.5 );
+					addVertex( innerPoint, u, 0 );
+					addVertex( nextPointR, u, 1 );
 
 				}
 
@@ -3106,8 +3106,8 @@ class SVGLoader extends Loader {
 
 						} else {
 
-							tempV2_3.toArray( vertices, vl - 2 * 3 );
-							tempV2_4.toArray( vertices, vl - 1 * 3 );
+							tempV2_4.toArray( vertices, vl - 2 * 3 );
+							tempV2_3.toArray( vertices, vl - 1 * 3 );
 							tempV2_4.toArray( vertices, vl - 4 * 3 );
 
 						}