I'm having a bit of trouble coming up with the right approach to achieve a particular effect.
I want to make a "ripple" effect using BitmapData.draw(), such that the final image can be rippled vertically, horizontally, or both. I have written a rudimentary trial version of it that uses a translation matrix in cooperation with the clipping rectangle, but it is too processor intensive to apply the effect using this method at high resolution (i.e. using the clipping rectangle to manipulate each column or row of pixels individually.)
I was considering using a method that would draw all of the slices that share a common translation value along the graph of the ripple (advancing the parameter in multiples of Math.PI), but this would add complexity and execution time to the already sluggish for ... loop.
At this point, I'm looking at using a much lower resolution approach that would use a skewing matrix and a larger rectangle to simulate the ripple in fewer manipulations. Can anyone think of an easier way of making something like this with better resolution without compromising speed?
+Q__


Reply With Quote