|
@@ -1167,26 +1167,12 @@ THREE.GLTFExporter.prototype = {
|
|
|
|
|
|
// Prefix all geometry attributes except the ones specifically
|
|
|
// listed in the spec; non-spec attributes are considered custom.
|
|
|
- var validVertexAttributes = [
|
|
|
- /^POSITION$/,
|
|
|
- /^NORMAL$/,
|
|
|
- /^TANGENT$/,
|
|
|
- /^TEXCOORD_\d+$/,
|
|
|
- /^COLOR_\d+$/,
|
|
|
- /^JOINTS_\d+$/,
|
|
|
- /^WEIGHTS_\d+$/,
|
|
|
- ];
|
|
|
-
|
|
|
- var isValidAttribute = false;
|
|
|
- for (var i = 0; i < validVertexAttributes.length; i++) {
|
|
|
- if (validVertexAttributes[i].test(attributeName)) {
|
|
|
- isValidAttribute = true;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- if (!isValidAttribute) {
|
|
|
- console.log(`Prefixing ${attributeName}`)
|
|
|
- attributeName = '_' + attributeName
|
|
|
+ var validVertexAttributes =
|
|
|
+ /^(POSITION|NORMAL|TANGENT|TEXCOORD_\d+|COLOR_\d+|JOINTS_\d+|WEIGHTS_\d+)$/;
|
|
|
+ if ( ! validVertexAttributes.test( attributeName ) ) {
|
|
|
+
|
|
|
+ attributeName = '_' + attributeName;
|
|
|
+
|
|
|
}
|
|
|
|
|
|
if ( cachedData.attributes.has( attribute ) ) {
|