Process the non-blocking image compression to a base64 string.
Buffer used to create the image data.
Buffered image width.
Buffered image height.
Expand a buffer in RED format to a buffer in RGBA format.
Buffer used to create the image data.
Buffered image width.
Buffered image height.
Reduce a buffer in RGBA format to a buffer in RED format.
Buffer used to create the image data.
Buffered image width.
Buffered image height.
Load a function onto a given Worker. The function must be a pure function with no external dependencies or requirements on global scope.
The name of the function to load
A reference to the function that should be loaded
A Promise which resolves once the Worker has loaded the function.
Execute a task on a specific Worker.
The named function to execute on the worker. This function must first have been loaded.
An array of parameters with which to call the requested function
An array of transferable objects which are transferred to the worker thread. See https://developer.mozilla.org/en-US/docs/Glossary/Transferable_objects
A Promise which resolves with the returned result of the function once complete.
Handle messages emitted by the Worker thread.
The dispatched message event
Handle errors emitted by the Worker thread.
The dispatched error event
A Promise which resolves once the Worker is ready to accept tasks
A queue of active tasks that this Worker is executing.
Boolean to know if the texture compressor should control the hash.
Previous texture hash.
An auto-incrementing task index.
A path reference to the JavaScript file which provides companion worker-side functionality.
Wrapper for a web worker meant to convert a pixel buffer to the specified image format and quality and return a base64 image
The worker name to be initialized
Worker initialization options
Should the worker run in debug mode?