From f100f7a247128d26e4beb599fcadaab0f6c79742 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20H=C3=A4rtl?= Date: Mon, 8 Jun 2026 11:28:35 +0200 Subject: [PATCH 1/2] Do not flag data URIs as absolute --- source/ResourceLoader/loader_utils.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/ResourceLoader/loader_utils.js b/source/ResourceLoader/loader_utils.js index ff8eed14..7053a3c6 100644 --- a/source/ResourceLoader/loader_utils.js +++ b/source/ResourceLoader/loader_utils.js @@ -60,6 +60,9 @@ class ResourceLoaderUtils { * @returns {boolean} `true` if the URL is absolute, `false` otherwise. */ static isAbsoluteUrl(url) { + if (url.startsWith("data:")) { + return false; + } const colonIndex = url.indexOf(":"); const slashIndex = url.indexOf("/"); return colonIndex !== -1 && (slashIndex === -1 || colonIndex < slashIndex); From abb9fd4b8692754258fdf0a8faca314e7f28b66b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20H=C3=A4rtl?= Date: Mon, 8 Jun 2026 15:43:27 +0200 Subject: [PATCH 2/2] Fix draco indices loading --- source/gltf/primitive.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/gltf/primitive.js b/source/gltf/primitive.js index 2a0eec1b..93b354f3 100644 --- a/source/gltf/primitive.js +++ b/source/gltf/primitive.js @@ -394,9 +394,15 @@ class gltfPrimitive extends GltfObject { copyDataFromDecodedGeometry(gltf, dracoGeometry, primitiveAttributes) { // indices - let indexBuffer = dracoGeometry.index.array; if (this.indices !== undefined) { + let indexBuffer = this.loadArrayIntoArrayBuffer( + dracoGeometry.index.array, + dracoGeometry.index.array.constructor.name + ); this.loadBufferIntoGltf(indexBuffer, gltf, this.indices, 34963, "index buffer view"); + + // DRACO decoder always outputs uint32 indices + gltf.accessors[this.indices].componentType = GL.UNSIGNED_INT; } // Position