@galacean/engine-loader 2.0.0-alpha.11 → 2.0.0-alpha.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.js CHANGED
@@ -282,7 +282,9 @@ var decoderMap = {};
282
282
  header.name = name;
283
283
  header.type = type;
284
284
  header.version = fileVersion;
285
- header.headerLength = offset + nameUint8Array.byteLength + typeUint8Array.byteLength + 9;
285
+ // Align to 4 bytes so that data following the header can be accessed via TypedArray views
286
+ var rawLength = offset + nameUint8Array.byteLength + typeUint8Array.byteLength + 9;
287
+ header.headerLength = rawLength + 3 & ~3;
286
288
  return header;
287
289
  };
288
290
  _create_class(FileHeader, [