Closed roelkok closed 5 days ago
This pull request is automatically built and testable in CodeSandbox.
To see build info of the built libraries, click here or the icon next to each commit SHA.
:tada: This PR is included in version 2.30.4 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Why
The web workers created by KTX2Loader throw the following error:
Uncaught ReferenceError: _KTX2Loader is not defined
. This PR fixes that.What
Updated the
BasisWorker
function to reference the variables that are prepended to the web worker code instead of referencing these values from theKTX2Loader
class.Although the
BasisWorker
function is defined within theKTX2Loader
class, once it's stringified and used as code for a web worker it doesn't have access anymore to its original upper scope. Therefore it will throw anReferenceError
.JSDoc type annotations have been added to get the right type hinting in the
BasisWorker
code.Checklist
Fixes: