CanvasScript3
>
Tests
> BitmapData - PixelDissolve
Code
var stage = new Stage("canvas", 420, 500, 12); var loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, function(e) { var bitmap = loader.content; var bitmapdata = bitmap.bitmapData; var bottomHalf = new Rectangle(0, 250, 420, 250); var point = new Point(0, bottomHalf.y); var seed = Math.random(); var step = 0; loader.addEventListener(Event.ENTER_FRAME, function(e) { seed = bitmapdata.pixelDissolve(bitmapdata, bottomHalf, point, seed, null, 0xFF000000); step++; trace("step: " + step + "/30"); if (step == 30) { //it should be done. loader.removeEventListener(Event.ENTER_FRAME, arguments.callee); } }) }); loader.load(new URLRequest('img/photo01.jpg')); stage.addChild(loader);
Canvas
Output