flash on 2011-11-25
授業でサンプルコード。「Processingの方が楽じゃね?」→「じゃあFrocessing!」
/**
* Copyright yamashitam ( http://wonderfl.net/user/yamashitam )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/26O5
*/
package {
import flash.display.Sprite;
import frocessing.core.F5Graphics2D;
import frocessing.core.F5C;
[SWF(width=465,height=465,backgroundColor=0)]
public class F5GraphicsSample1 extends Sprite{
public function F5GraphicsSample1() {
var fg:F5Graphics2D = new F5Graphics2D( graphics );
fg.stroke( 255, 0.1 );
fg.fill( 255, 32, 32, 0.1 );
fg.translate( 232, 232 );
fg.rectMode( F5C.CENTER );
for ( var i:int = 0; i < 48; i++ ) {
fg.rect( 0, 0, 400, 26 );
fg.rotate( Math.PI / 24 );
}
}
}
}