|
@@ -3027,10 +3027,12 @@ class GLTFParser {
|
|
|
|
|
|
if ( accessorDef.bufferView === undefined && accessorDef.sparse === undefined ) {
|
|
|
|
|
|
- // Ignore empty accessors, which may be used to declare runtime
|
|
|
- // information about attributes coming from another source (e.g. Draco
|
|
|
- // compression extension).
|
|
|
- return Promise.resolve( null );
|
|
|
+ const itemSize = WEBGL_TYPE_SIZES[ accessorDef.type ];
|
|
|
+ const TypedArray = WEBGL_COMPONENT_TYPES[ accessorDef.componentType ];
|
|
|
+ const normalized = accessorDef.normalized === true;
|
|
|
+
|
|
|
+ const array = new TypedArray( accessorDef.count * itemSize );
|
|
|
+ return Promise.resolve( new BufferAttribute( array, itemSize, normalized ) );
|
|
|
|
|
|
}
|
|
|
|