From f2ba6a8bde5fe201a17c0dc380ed023c97b2274e Mon Sep 17 00:00:00 2001 From: Adnane Belmadiaf Date: Wed, 13 Nov 2024 23:14:45 +0100 Subject: [PATCH] fix(GLTFImporter): fix the environment texture path --- Sources/IO/Geometry/GLTFImporter/example/index.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Sources/IO/Geometry/GLTFImporter/example/index.js b/Sources/IO/Geometry/GLTFImporter/example/index.js index 365628c5ff4..2546731529a 100644 --- a/Sources/IO/Geometry/GLTFImporter/example/index.js +++ b/Sources/IO/Geometry/GLTFImporter/example/index.js @@ -58,7 +58,7 @@ const variantsModels = [ ]; const environmentTex = createTextureWithMipmap( - '/Data/pbr/kiara_dawn_4k.jpg', + `${__BASE_PATH__}/data/pbr/kiara_dawn_4k.jpg`, 8 ); renderer.setUseEnvironmentTextureAsBackground(false); @@ -265,10 +265,13 @@ fetch(`${baseUrl}/${modelsFolder}/model-index.json`) if (selectedFlavor === 'glTF-Draco') { vtkResourceLoader - .loadScript('https://unpkg.com/draco3d@1.3.4/draco_decoder_nodejs.js') + .loadScript( + 'https://unpkg.com/draco3dgltf@1.3.6/draco_decoder_gltf_nodejs.js' + ) .then(() => { // Set decoder function to the vtk reader - reader.setDracoDecoder(window.CreateDracoModule); + // eslint-disable-next-line no-undef + reader.setDracoDecoder(DracoDecoderModule); reader .setUrl(url, { binary: true, sceneId: selectedScene }) .then(reader.onReady(ready));