That looks amazing, and you've got a pretty high resolution out of it too!
Since it's basically single-threaded it's going to be difficult to handle the graphics updates nicely. I guess you could just turn the lights off for one whole rotation while you did the work.
Looking at the code, I reckon you might be able to get it faster using Graphics.createArrayBuffer instead of createCallback. You could then use g.setRotation to make the orientation such that each row of the backing ArrayBuffer was actually a column - and then when you went to render it you could just use new Uint8Array(g.buffer, width*3*column, width*3) to get each column - it references the array so doesn't actually copy any data.
I'm sure it'd still delay the sending of a few columns, but it might not be as noticeable.
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.
That looks amazing, and you've got a pretty high resolution out of it too!
Since it's basically single-threaded it's going to be difficult to handle the graphics updates nicely. I guess you could just turn the lights off for one whole rotation while you did the work.
Looking at the code, I reckon you might be able to get it faster using Graphics.createArrayBuffer instead of createCallback. You could then use
g.setRotation
to make the orientation such that each row of the backing ArrayBuffer was actually a column - and then when you went to render it you could just usenew Uint8Array(g.buffer, width*3*column, width*3)
to get each column - it references the array so doesn't actually copy any data.I'm sure it'd still delay the sending of a few columns, but it might not be as noticeable.