From 2c990d36cf594f3c92aee28bf06524c482ac2f37 Mon Sep 17 00:00:00 2001 From: Roel Kok Date: Wed, 3 Jul 2024 23:25:13 +0200 Subject: [PATCH] fix(KTX2Loader): web worker scope --- src/loaders/KTX2Loader.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/loaders/KTX2Loader.js b/src/loaders/KTX2Loader.js index fa600f74..f2b25571 100644 --- a/src/loaders/KTX2Loader.js +++ b/src/loaders/KTX2Loader.js @@ -129,9 +129,12 @@ class KTX2Loader extends Loader { let transcoderPending let BasisModule - const EngineFormat = KTX2Loader.EngineFormat - const TranscoderFormat = KTX2Loader.TranscoderFormat - const BasisFormat = KTX2Loader.BasisFormat + /** @type KTX2Loader.EngineFormat */ + const EngineFormat = _EngineFormat + /** @type KTX2Loader.TranscoderFormat */ + const TranscoderFormat = _TranscoderFormat + /** @type KTX2Loader.BasisFormat */ + const BasisFormat = _BasisFormat self.addEventListener('message', function (e) { const message = e.data