ai / offscreen-canvas

Polyfill for OffscreenCanvas to move Three.js/WebGL/2D canvas to Web Worker
MIT License
332 stars 13 forks source link

Add support for worker options #24

Open FallingSnow opened 3 years ago

FallingSnow commented 3 years ago

https://developer.mozilla.org/en-US/docs/Web/API/Worker/Worker

var myWorker = new Worker(aURL, options);

Worker supports an options variable being passed to the worker constructor. These options are required to enable es modules.

https://github.com/ai/offscreen-canvas/blob/ef3ac052cf3db22dd370ab9578fe5b0b982a9124/create-worker.js#L3

ai commented 3 years ago

Please send PR