forked from: F5GraphicsSample5

by hacker_szoe51ih forked from F5GraphicsSample5 (diff: 3)
♥0 | Line 24 | Modified 2010-07-04 22:54:09 | MIT License
play

ActionScript3 source code

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

// forked from nutsu's F5GraphicsSample5
// forked from nutsu's F5GraphicsSample3
// forked from nutsu's F5GraphicsSample2
package {
    
    import flash.display.Sprite;
    import frocessing.core.F5Graphics2D;
    
    [SWF(width=465,height=465,backgroundColor=0)]
    public class F5GraphicsSample5 extends Sprite {
        
        public function F5GraphicsSample5() {
            var fg:F5Graphics2D = new F5Graphics2D( graphics );
            //fg.colorMode( "hsv", 465, 1, 465 ); //HSVモード
            for ( var i:int = 0 ; i < 400; i++ ) {
                var cx:Number = Math.random()*465;
                var cy:Number = Math.random()*465;
                var cr:Number = Math.random()*20;
                //線と塗りの指定
                if ( Math.random() > 0.5 ) {
                    fg.noStroke();
                    fg.fill( cx, 1, cy, 0.25 );
                }else {
                    fg.noFill();
                    fg.strokeWeight( Math.random()*4 );
                    fg.stroke(0xff3333);
                }
                //円の描画
                fg.circle( cx, cy, cr );
            }
        }
    }
}