diff --git a/src/components/gltf-model-plus.js b/src/components/gltf-model-plus.js index c31aefea56daace751e5b3670f1d3ec5f229560b..b90e236874a1a121f81527da664dcee9edbe815e 100644 --- a/src/components/gltf-model-plus.js +++ b/src/components/gltf-model-plus.js @@ -209,8 +209,15 @@ async function loadEnvMap() { return texture; } -function resolveGLTFUri(gltfProperty, basePath) { - return resolveMedia(new URL(gltfProperty.uri, basePath).href).then(({ raw }) => (gltfProperty.uri = raw)); +async function resolveGLTFUri(gltfProperty, basePath) { + const url = new URL(gltfProperty.uri, basePath); + + if (url.protocol === "blob:") { + gltfProperty.uri = url.href; + } else { + const { raw } = await resolveMedia(url.href); + gltfProperty.uri = raw; + } } async function loadGLTF(src, preferredTechnique, onProgress) { @@ -271,6 +278,8 @@ async function loadGLTF(src, preferredTechnique, onProgress) { await Promise.all(pendingFarsparkPromises); + console.log(parser.json); + const gltf = await new Promise((resolve, reject) => parser.parse( (scene, scenes, cameras, animations, json) => {