Kaynağa Gözat

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

Michael Herzog 1 ay önce
ebeveyn
işleme
84335585d4
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      examples/jsm/exporters/GLTFExporter.js

+ 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号