From 2e80cbaf22385007140a10a9bb9db2f31314a79e Mon Sep 17 00:00:00 2001 From: Harry Collin Date: Fri, 26 Apr 2024 10:32:01 +0100 Subject: [PATCH 1/2] Assign extras to texture in GLTFLoader --- examples/jsm/loaders/GLTFLoader.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/jsm/loaders/GLTFLoader.js b/examples/jsm/loaders/GLTFLoader.js index 0679071232d106..28300ec6b813fb 100644 --- a/examples/jsm/loaders/GLTFLoader.js +++ b/examples/jsm/loaders/GLTFLoader.js @@ -3317,6 +3317,8 @@ class GLTFParser { } + assignExtrasToUserData(texture, sourceDef); + texture.userData.mimeType = sourceDef.mimeType || getImageURIMimeType( sourceDef.uri ); return texture; From c14b373237162e09609caaa8ea2354fbb2b40cf9 Mon Sep 17 00:00:00 2001 From: Michael Herzog Date: Fri, 26 Apr 2024 15:08:55 +0200 Subject: [PATCH 2/2] Update GLTFLoader.js Clean up. --- examples/jsm/loaders/GLTFLoader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/jsm/loaders/GLTFLoader.js b/examples/jsm/loaders/GLTFLoader.js index 28300ec6b813fb..ef68d8fbc197ae 100644 --- a/examples/jsm/loaders/GLTFLoader.js +++ b/examples/jsm/loaders/GLTFLoader.js @@ -3317,7 +3317,7 @@ class GLTFParser { } - assignExtrasToUserData(texture, sourceDef); + assignExtrasToUserData( texture, sourceDef ); texture.userData.mimeType = sourceDef.mimeType || getImageURIMimeType( sourceDef.uri );