From 77874821df93919662defafeab946a1bf024df9e Mon Sep 17 00:00:00 2001 From: m-schuetz Date: Sun, 24 Jan 2021 19:23:39 +0100 Subject: [PATCH] fix ept loader --- examples/github.html | 2 +- gulpfile.js | 4 ++++ src/workers/EptBinaryDecoderWorker.js | 2 +- src/workers/EptZstandardDecoderWorker.js | 6 +++--- src/workers/EptZstandardDecoder_preamble.js | 2 ++ 5 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 src/workers/EptZstandardDecoder_preamble.js diff --git a/examples/github.html b/examples/github.html index dbdd3cbf..68125eff 100644 --- a/examples/github.html +++ b/examples/github.html @@ -190,7 +190,7 @@ - + diff --git a/gulpfile.js b/gulpfile.js index 6ee8e2af..69799b6f 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -41,9 +41,13 @@ let workers = { "src/workers/EptLaszipDecoderWorker.js" ], "EptBinaryDecoderWorker": [ + "libs/ept/ParseBuffer.js", "src/workers/EptBinaryDecoderWorker.js" ], "EptZstandardDecoderWorker": [ + "src/workers/EptZstandardDecoder_preamble.js", + 'libs/zstd-codec/bundle.js', + "libs/ept/ParseBuffer.js", "src/workers/EptZstandardDecoderWorker.js" ] }; diff --git a/src/workers/EptBinaryDecoderWorker.js b/src/workers/EptBinaryDecoderWorker.js index 1b79af17..b71e11dd 100644 --- a/src/workers/EptBinaryDecoderWorker.js +++ b/src/workers/EptBinaryDecoderWorker.js @@ -1,4 +1,4 @@ -importScripts('/libs/ept/ParseBuffer.js'); +// importScripts('/libs/ept/ParseBuffer.js'); onmessage = function(event) { parseEpt(event); } diff --git a/src/workers/EptZstandardDecoderWorker.js b/src/workers/EptZstandardDecoderWorker.js index b5eabed1..d0fc6f3e 100644 --- a/src/workers/EptZstandardDecoderWorker.js +++ b/src/workers/EptZstandardDecoderWorker.js @@ -1,6 +1,6 @@ -window = { }; -document = { }; -importScripts('/libs/zstd-codec/bundle.js', '/libs/ept/ParseBuffer.js'); +// window = { }; +// document = { }; +// importScripts('/libs/zstd-codec/bundle.js', '/libs/ept/ParseBuffer.js'); onmessage = async function(event) { diff --git a/src/workers/EptZstandardDecoder_preamble.js b/src/workers/EptZstandardDecoder_preamble.js new file mode 100644 index 00000000..e60085dd --- /dev/null +++ b/src/workers/EptZstandardDecoder_preamble.js @@ -0,0 +1,2 @@ +window = { }; +document = { }; \ No newline at end of file