Skip to content

Commit

Permalink
fix(GLTFImporter): fix the environment texture path
Browse files Browse the repository at this point in the history
  • Loading branch information
daker authored and floryst committed Nov 20, 2024
1 parent 0c3933d commit 9ab3172
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Sources/IO/Geometry/GLTFImporter/example/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -265,10 +265,13 @@ fetch(`${baseUrl}/${modelsFolder}/model-index.json`)

if (selectedFlavor === 'glTF-Draco') {
vtkResourceLoader
.loadScript('https://unpkg.com/[email protected]/draco_decoder_nodejs.js')
.loadScript(
'https://unpkg.com/[email protected]/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));
Expand Down

0 comments on commit 9ab3172

Please sign in to comment.