Graphics buffer: trying to "fade out" an uint8array / best (fastest) way to manipulate pixels #1166
Replies: 3 comments
-
Posted at 2018-05-27 by @gfwilliams I'd probably do I think that's probably going to be one of the faster methods. If you make sure you use |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-05-27 by @gfwilliams You could also use a 256 element precomputed lookup table I believe:
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-05-27 by n00b Thanks Gordon! mapInPlace sure is much faster. Here's my fade code with callback:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2018-05-27 by n00b
Hi,
I'm playing with an 8x8 neopixel matrix. I want to do a pixel slideshow by loading images out from a server over time. I'd love to have a fade to black transition before moving to the next image. Anyone knows what's the most performant way to do this? Right now I'm doing a setInterval that loops the uint8array buffer (buffer.forEach) and multiply each index value with a gradual value every tick. This is super slow tho.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions