Commit 0a95753 1 parent 89758ed commit 0a95753 Copy full SHA for 0a95753
File tree 7 files changed +210
-157
lines changed
7 files changed +210
-157
lines changed Original file line number Diff line number Diff line change @@ -49,16 +49,13 @@ function update() {
49
49
// Dynamic script loading from CDN
50
50
// ----------------------------------------------------------------------------
51
51
52
- // Prevent error when draco try to set the export on module
53
- window . module = { } ;
54
-
55
52
// Add new script tag with draco CDN
56
53
vtkResourceLoader
57
- . loadScript ( 'https://unpkg.com/draco3d@1.3.4 /draco_decoder_nodejs.js' )
58
- . then ( ( ) => {
54
+ . loadScript ( 'https://unpkg.com/draco3d@1.5.7 /draco_decoder_nodejs.js' )
55
+ . then ( async ( ) => {
59
56
// Set decoder function to the vtk reader
60
- vtkDracoReader . setDracoDecoder ( window . CreateDracoModule ) ;
61
-
57
+ // eslint-disable-next-line no-undef
58
+ await vtkDracoReader . setDracoDecoder ( DracoDecoderModule ) ;
62
59
// Trigger data download
63
60
reader
64
61
. setUrl (
Original file line number Diff line number Diff line change @@ -118,15 +118,15 @@ export function newInstance(
118
118
) : vtkDracoReader ;
119
119
120
120
/**
121
- *
121
+ * Get the draco decoder
122
122
*/
123
123
export function getDracoDecoder ( ) : any ;
124
124
125
125
/**
126
- *
127
- * @param createDracoModule
126
+ * Set the draco decoder
127
+ * @param dracoDecoder
128
128
*/
129
- export function setDracoDecoder ( createDracoModule : any ) : void ;
129
+ export async function setDracoDecoder ( dracoDecoder : any ) : void ;
130
130
131
131
/**
132
132
* Load the WASM decoder from url and set the decoderModule
You can’t perform that action at this time.
0 commit comments