Explorar el Código

fix: update vertices according uv.y when linecap is square (#27429)

Yuyao Nie hace 1 año
padre
commit
93b292382c
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      examples/jsm/loaders/SVGLoader.js

+ 2 - 1
examples/jsm/loaders/SVGLoader.js

@@ -3082,7 +3082,8 @@ class SVGLoader extends Loader {
 						} else {
 
 							tempV2_3.toArray( vertices, 1 * 3 );
-							tempV2_3.toArray( vertices, 3 * 3 );
+							// using tempV2_4 to update 3rd vertex if the uv.y of 3rd vertex is 1
+							uvs[ 3 * 2 + 1 ] === 1 ? tempV2_4.toArray( vertices, 3 * 3 ) : tempV2_3.toArray( vertices, 3 * 3 );
 							tempV2_4.toArray( vertices, 0 * 3 );
 
 						}