マッハの卵
楕円の回転から非剛体運動(変形)を知覚する現象
♥0 |
Line 20 |
Modified 2011-10-25 01:01:36 |
MIT License
archived:2017-03-20 02:10:04
ActionScript3 source code
/**
* Copyright freddy ( http://wonderfl.net/user/freddy )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/f2kY
*/
package {
import flash.display.Shape;
import flash.events.Event;
import flash.display.Sprite;
public class FlashTest extends Sprite {
public function FlashTest() {
// write as3 code here..
var sp:Sprite = new Sprite();
sp.graphics.lineStyle(10);
var h:int = 150;
var w:int = 170;
sp.graphics.drawEllipse(-w / 2, -h / 2, w, h);
sp.x = 200;
sp.y = 200;
this.addChild(sp);
sp.addEventListener(Event.ENTER_FRAME, function (e:Event):void {
sp.rotation += 10;
});
}
}
}