When image filters were being applied they were cached or buffered in
`filterCanvas`. It seemed like image would be drawn multiple times (ie
calling `layer.draw()` would cause the `drawFunc` to run about 2 to 4 times).
Each time it ran it would draw on top of the cached `filterCanvas`. The
non-zero alpha values accumulated until they reached 255, effectively
removing the alpha-channel.
To fix it, I create a new `filterCanvas` everytime. I don't check for or
use the previous `filterCanvas`. I haven't notice other issues by removing
it.
I tried to use imageData to speed up the transfer of pixel data. The
modified image would appear "behind" (ie obscured by) the original. I
manually copy the array of pixel data.
Previously, I would work with a regular array and compute/store/copy
to/from that array. It should be faster to create an imageData object,
create the convolution result in that object and finally:
`context.putImageData(result)`.
I removed the ability to do a convolution with a 1D matrix because I was
using all 2D matrices. I also cleaned up some unused variables and filters.
I took the entire group of tests dealing with image filters and put them
into `filterTests.html` and `filterTests.js`. I removed them from
`visualTests.js`.
Unsharp mask, soft blur, sharpen, emboss, edge detect are now "tweenable";
however, I think I need to tweak the convolution matricies. At 0 there
should be no effect applied which corresponds to a matrix with just a
`1` in the middle (ie [...1...]). If the `filterAmount` is small then
the matrix is all near 0's causing the image to 'flash black'. If I always
add a 1 in the middle then the images become too bright...
Renamed Colors.js to ColorPack.js and Colvolution.js to ConvolvePack.js.
Also removed convolution based 'lighten' and 'darken' (from the code
and the tests).