@inweb/viewer-three 27.4.5 → 27.4.6
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.
|
@@ -4386,8 +4386,8 @@ class GltfStructure {
|
|
|
4386
4386
|
return await this.textureLoader.loadAsync(fullUrl);
|
|
4387
4387
|
} else if (image.bufferView !== undefined) {
|
|
4388
4388
|
const bufferView = this.json.bufferViews[image.bufferView];
|
|
4389
|
-
const
|
|
4390
|
-
const blob = new Blob([
|
|
4389
|
+
const { buffer } = await this.getBufferView(bufferView.byteOffset || 0, bufferView.byteLength, 5121);
|
|
4390
|
+
const blob = new Blob([buffer], { type: image.mimeType });
|
|
4391
4391
|
const url = URL.createObjectURL(blob);
|
|
4392
4392
|
const texture = await this.textureLoader.loadAsync(url);
|
|
4393
4393
|
URL.revokeObjectURL(url);
|
|
@@ -4417,6 +4417,7 @@ class GltfStructure {
|
|
|
4417
4417
|
})
|
|
4418
4418
|
);
|
|
4419
4419
|
}
|
|
4420
|
+
await this.flushBufferRequests();
|
|
4420
4421
|
await Promise.all(texturePromises);
|
|
4421
4422
|
}
|
|
4422
4423
|
loadMaterials() {
|