Skip to content

Commit 8433558

Browse files
authored
GLTFExporter: Make attribute prefix more robust. (#33357)
1 parent f1103c4 commit 8433558

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

examples/jsm/exporters/GLTFExporter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1848,7 +1848,7 @@ class GLTFWriter {
18481848
const validVertexAttributes =
18491849
/^(POSITION|NORMAL|TANGENT|TEXCOORD_\d+|COLOR_\d+|JOINTS_\d+|WEIGHTS_\d+)$/;
18501850

1851-
if ( ! validVertexAttributes.test( attributeName ) ) attributeName = '_' + attributeName;
1851+
if ( ! validVertexAttributes.test( attributeName ) && ! attributeName.startsWith( '_' ) ) attributeName = '_' + attributeName;
18521852

18531853
if ( cache.attributes.has( this.getUID( attribute ) ) ) {
18541854

0 commit comments

Comments
 (0)