緑から青へのグラデーション(正方形2)

by lenonsun forked from 赤から青へのグラデーション(円) (diff: 6)
♥0 | Line 15 | Modified 2011-10-29 21:37:44 | MIT License
play

ActionScript3 source code

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

// 緑から青へのグラデーション(正方形2)
package 
{
    import frocessing.display.F5MovieClip2D;
    /**
     * rectを使った緑から青へのグラデーション
     */
    public class GraphicExample extends F5MovieClip2D
    {
        public function setup() : void
        {
            var a:Number;
            for( a = 465 ; a >= 0 ; a-- ) {
                stroke(0, 255*a/465, 255 - 255*a/465);     
                rect(0, 0, a, a);
            }
        }
    }      
}

Forked