1
0
Эх сурвалжийг харах

GLTFExporter: Make attribute prefix more robust. (#33357)

Michael Herzog 3 сар өмнө
parent
commit
84335585d4

+ 1 - 1
examples/jsm/exporters/GLTFExporter.js

@@ -1848,7 +1848,7 @@ class GLTFWriter {
 			const validVertexAttributes =
 					/^(POSITION|NORMAL|TANGENT|TEXCOORD_\d+|COLOR_\d+|JOINTS_\d+|WEIGHTS_\d+)$/;
 
-			if ( ! validVertexAttributes.test( attributeName ) ) attributeName = '_' + attributeName;
+			if ( ! validVertexAttributes.test( attributeName ) && ! attributeName.startsWith( '_' ) ) attributeName = '_' + attributeName;
 
 			if ( cache.attributes.has( this.getUID( attribute ) ) ) {
 

粤ICP备19079148号