@onerjs/loaders 8.36.7 → 8.36.9
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/glTF/1.0/glTFLoader.js
CHANGED
|
@@ -26,6 +26,7 @@ import { SpotLight } from "@onerjs/core/Lights/spotLight.js";
|
|
|
26
26
|
import { GLTFUtils } from "./glTFLoaderUtils.js";
|
|
27
27
|
import { GLTFFileLoader } from "../glTFFileLoader.js";
|
|
28
28
|
import { Constants } from "@onerjs/core/Engines/constants.js";
|
|
29
|
+
import { GetBlobBufferSource } from "@onerjs/core/Buffers/bufferUtils.js";
|
|
29
30
|
/**
|
|
30
31
|
* Tokenizer. Used for shaders compatibility
|
|
31
32
|
* Automatically map world, view, projection, worldViewProjection, attributes and so on
|
|
@@ -1237,7 +1238,7 @@ export class GLTFLoaderBase {
|
|
|
1237
1238
|
sampler.minFilter === ETextureFilterType.LINEAR_MIPMAP_NEAREST ||
|
|
1238
1239
|
sampler.minFilter === ETextureFilterType.LINEAR_MIPMAP_LINEAR;
|
|
1239
1240
|
const samplingMode = Texture.BILINEAR_SAMPLINGMODE;
|
|
1240
|
-
const blob = buffer == null ? new Blob() : new Blob([buffer]);
|
|
1241
|
+
const blob = buffer == null ? new Blob() : new Blob([GetBlobBufferSource(buffer)]);
|
|
1241
1242
|
const blobURL = URL.createObjectURL(blob);
|
|
1242
1243
|
const revokeBlobURL = () => URL.revokeObjectURL(blobURL);
|
|
1243
1244
|
const newTexture = new Texture(blobURL, gltfRuntime.scene, !createMipMaps, true, samplingMode, revokeBlobURL, revokeBlobURL);
|