提交 e6ab398a 编写于 作者: S Sneha Belkhale

support draco compressed custom attributes

上级 6a03a339
......@@ -528,21 +528,23 @@ THREE.GLTFLoader = ( function () {
for ( var attributeName in gltfAttributeMap ) {
if ( ! ( attributeName in ATTRIBUTES ) ) continue;
var threeAttributeName = ATTRIBUTES[ attributeName ] || attributeName.toLowerCase();
threeAttributeMap[ ATTRIBUTES[ attributeName ] ] = gltfAttributeMap[ attributeName ];
threeAttributeMap[ threeAttributeName ] = gltfAttributeMap[ attributeName ];
}
for ( attributeName in primitive.attributes ) {
if ( ATTRIBUTES[ attributeName ] !== undefined && gltfAttributeMap[ attributeName ] !== undefined ) {
var threeAttributeName = ATTRIBUTES[ attributeName ] || attributeName.toLowerCase();
if ( gltfAttributeMap[ attributeName ] !== undefined ) {
var accessorDef = json.accessors[ primitive.attributes[ attributeName ] ];
var componentType = WEBGL_COMPONENT_TYPES[ accessorDef.componentType ];
attributeTypeMap[ ATTRIBUTES[ attributeName ] ] = componentType;
attributeNormalizedMap[ ATTRIBUTES[ attributeName ] ] = accessorDef.normalized === true;
attributeTypeMap[ threeAttributeName ] = componentType;
attributeNormalizedMap[ threeAttributeName ] = accessorDef.normalized === true;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册