You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 5, 2022. It is now read-only.
in sketch.js, the charIndex of a pixel is calculated as follows: const charIndex = floor(map(avg, 0, 255, 0, len));
Instead, it should be const charIndex = floor(map(avg, 0, 256, 0, len));
because otherwise whites (rgb 255, 255, 255) will be mapped to the exact length of the density string which returns '' (an empty string) instead. This results in tearing on videos. The tricky bit was charAt didn't report any error when accessing out of bound index so it went unnoticed.
Nice tutorial btw
The text was updated successfully, but these errors were encountered:
Thank you for submitting this errata! You can make a pull request for the fix if you want to!
We'll be moving to a new website soon so if this issue is still open when we move I'll add the fix myself!
in sketch.js, the
charIndex
of a pixel is calculated as follows:const charIndex = floor(map(avg, 0, 255, 0, len));
Instead, it should be
const charIndex = floor(map(avg, 0, 256, 0, len));
because otherwise whites (rgb 255, 255, 255) will be mapped to the exact length of the
density
string which returns''
(an empty string) instead. This results in tearing on videos. The tricky bit wascharAt
didn't report any error when accessing out of bound index so it went unnoticed.Nice tutorial btw
The text was updated successfully, but these errors were encountered: