Head-First-HTML5 icon indicating copy to clipboard operation
Head-First-HTML5 copied to clipboard

Chapter 8 Videobooth.js

Open spaceyyy opened this issue 1 year ago • 0 comments

Where is the exercise to complete this code?

I believe the code would have to be added into the videobooth.html for a button to be pressed for an additional filter, but I couldn't find the exercise in the book or anywhere online. Thanks in advance! Awesome book(s) by the way!!

/*

  • bwcartoon is an extra filter for an exercise */ function bwcartoon(pos, r, g, b, outputData) { var offset = pos * 4; if (outputData[offset] < 120) { outputData[offset] = 80; outputData[++offset] = 80; outputData[++offset] = 80; } else { outputData[offset] = 255; outputData[++offset] = 255; outputData[++offset] = 255; } outputData[++offset] = 255; ++offset; }

spaceyyy avatar Jul 31 '23 19:07 spaceyyy