Fire

by shohei909
炎を難しい。15行。
♥0 | Line 15 | Modified 2010-09-25 16:10:09 | MIT License
play

ActionScript3 source code

/**
 * Copyright shohei909 ( http://wonderfl.net/user/shohei909 )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/dAMu
 */

//炎を難しい。15行。

package {
    import flash.geom.*;
    import flash.display.*;
    public class Fire extends Sprite {
        function Fire() {
            var b:Array = [ new BitmapData( 465,470, false, 0 ), new BitmapData( 465,470 ) ];
            addChild( new Bitmap(b[0]) );
            addEventListener( "exitFrame", function f(e:*):*{
                b[1].perlinNoise( 20+500*Math.random(), 512, 3, 200*Math.random(), true, true, 7, true );
                b[0].draw( b[1], null, new ColorTransform(3,0.7,0.8,1,-200,-15,-10,-242 ) ); 
                b[0].draw( b[0], new Matrix(1,0,0,1,0,-3), new ColorTransform(1.01,1.02,1.02,1,-15,-5,-5,-120),null,null,true )
            });
        }
    }
}