For now, you cannot share resources within the web worker. You can transfer TypedArraysto and from WebWorkers, although it really depends on what you want to do. If you decode textures in JavaScript, you can do the decoding in the workplace, and then pass the TypedArray with the data back to the main stream. This can happen with zero copy . But the call gl.texImage2dshould happen in the main thread.
As for reading textures in the workplace, you're out of luck.
source
share