OK @Gordon I understand the concept, but I'm missing some details (I was never good at graphics programming)
First off, before I did try to create an 8bpp image I usually get LOW_MEMORY warnings - so I gave up and stuck to the doublebuffer and drawing.
I looked at the animated clock example - I see they have a pre-computed palette file that is some binary data? For the Uint16Array I don't quite understand what needs to go in it?
At the moment I'm using RGB values, and when drawing converting them to the correct 0...1 value.
I assume from what I'm reading the array maps to each individual pixel? Instead of shifting the data, I'd just move the palette X pixels to the left to right? In that case, do I need to draw a background, or am I just palette shifting at this point to get the same desired effect?
Then I assume here it's draw image and flip? (or is clear better?)
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.
OK @Gordon I understand the concept, but I'm missing some details (I was never good at graphics programming)
First off, before I did try to create an 8bpp image I usually get LOW_MEMORY warnings - so I gave up and stuck to the doublebuffer and drawing.
I looked at the animated clock example - I see they have a pre-computed palette file that is some binary data? For the Uint16Array I don't quite understand what needs to go in it?
At the moment I'm using RGB values, and when drawing converting them to the correct 0...1 value.
I assume from what I'm reading the array maps to each individual pixel? Instead of shifting the data, I'd just move the palette X pixels to the left to right? In that case, do I need to draw a background, or am I just palette shifting at this point to get the same desired effect?
Then I assume here it's draw image and flip? (or is clear better?)