Is there something in three.js that is similar to the html drawImage and getImage routines?
I use these to combine and split images in my main program, but am not sure that I could use them in a separate module. Also, it seems that it would be nice to be consistent not mix html routines with three.js routines.
You mean the canvas’s 2D context, drawImage, and getImageData. You can use the canvas directly with a CanvasTexture and set needsUpdate after each new drawing. This should also work with OffscreenCanvas.
Yes, something like the following would work, and it’s always a good practice to use modules while following the DRY (Don’t Repeat Yourself) principle.