You can have a preallocated Uint8Array or the right size, and then use .set 3 times to set the contents at 3 specific indexes - that should be super fast (and will also allow for some rotation type effects if you want).
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
You can have a preallocated
Uint8Array
or the right size, and then use.set
3 times to set the contents at 3 specific indexes - that should be super fast (and will also allow for some rotation type effects if you want).