One of the coolest, and IMHO most underrated, features introduced by ECMAScript 2015 (ES2015, aka ES6) was the pair of iteration protocols, which d...
For further actions, you may consider blocking this person and/or reporting abuse
Hi Ken. This is a remarkable article. Really enjoyed reading it and I learned a lot about iterator and generator usage in js. It's a concept I was aware of but did not use in daily coding yet.
I personally love messing around with image manipulation using the HTML5 Canvas element. You can load up an image using the native Image object, then paint it to the canvas, grab its ImageData object, and directly manipulate pixel values.
So this sounds very interesting! Can you maybe point me to an example of yours where the whole process (loading the image, manipulating it etc.) is visible?
kindly, matthias
Just whipped one up real quick, here you go! It adds a bunch of extra blue to each pixel in an image.
I used an expanded version of the generator function in the post that persists changes made to each pixel back to the original ImageData object for easier image manipulation.
Very cool! Thank you for the example!