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

SimplexNoise is undefined in webworkers #24

Closed
kosshi-net opened this issue Sep 15, 2018 · 1 comment
Closed

SimplexNoise is undefined in webworkers #24

kosshi-net opened this issue Sep 15, 2018 · 1 comment

Comments

@kosshi-net
Copy link

Just calling importScripts() does not bring SimplexNoise to the global scope in webworkers. This at least used to work with earlier versions.

Workaround:

let exports = {};
importScripts('simplex-noise.js');
let SimplexNoise = exports.SimplexNoise;
@jwagner
Copy link
Owner

jwagner commented Jul 23, 2022

This should be resolved by using es modules now. https://web.dev/module-workers/

@jwagner jwagner closed this as completed Jul 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants