|
@@ -795,7 +795,7 @@ export class GLTFFileLoader implements IDisposable, ISceneLoaderPluginAsync, ISc
|
|
|
}
|
|
|
|
|
|
// Bail if there are no other chunks.
|
|
|
- if (dataReader.byteOffset + chunkLength === dataReader.buffer.byteLength) {
|
|
|
+ if (dataReader.byteOffset + chunkLength === length) {
|
|
|
return dataReader.loadAsync(chunkLength).then(() => {
|
|
|
return { json: this._parseJson(dataReader.readString(chunkLength)), bin: null };
|
|
|
});
|
|
@@ -829,7 +829,7 @@ export class GLTFFileLoader implements IDisposable, ISceneLoaderPluginAsync, ISc
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (dataReader.byteOffset !== dataReader.buffer.byteLength) {
|
|
|
+ if (dataReader.byteOffset !== length) {
|
|
|
return dataReader.loadAsync(8).then(readAsync);
|
|
|
}
|
|
|
|