Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(GLTFImporter): fix GLTF Draco normals #3193

Merged
merged 1 commit into from
Jan 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions Sources/IO/Geometry/DracoReader/example/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,13 @@ function update() {
// Dynamic script loading from CDN
// ----------------------------------------------------------------------------

// Prevent error when draco try to set the export on module
window.module = {};

// Add new script tag with draco CDN
vtkResourceLoader
.loadScript('https://unpkg.com/draco3d@1.3.4/draco_decoder_nodejs.js')
.then(() => {
.loadScript('https://unpkg.com/draco3d@1.5.7/draco_decoder_nodejs.js')
.then(async () => {
// Set decoder function to the vtk reader
vtkDracoReader.setDracoDecoder(window.CreateDracoModule);

// eslint-disable-next-line no-undef
await vtkDracoReader.setDracoDecoder(DracoDecoderModule);
// Trigger data download
reader
.setUrl(
Expand Down
8 changes: 4 additions & 4 deletions Sources/IO/Geometry/DracoReader/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,15 @@ export function newInstance(
): vtkDracoReader;

/**
*
* Get the draco decoder
*/
export function getDracoDecoder(): any;

/**
*
* @param createDracoModule
* Set the draco decoder
* @param dracoDecoder
*/
export function setDracoDecoder(createDracoModule: any): void;
export function setDracoDecoder(dracoDecoder: any): Promise<any>;

/**
* Load the WASM decoder from url and set the decoderModule
Expand Down
Loading