forked from: forked from: flash on 2009-10-19
/**
* Copyright yabuchany ( http://wonderfl.net/user/yabuchany )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/sIaX
*/
// forked from yabuchany's forked from: flash on 2009-10-19
// forked from yabuchany's flash on 2009-10-19
package {
import frocessing.display.*;
public class Main extends F5MovieClip2DBmp{
public function Main() {
super();
}
public function setup():void {
noStroke();
smooth();
fill(0);
var offset:Number = 50; // Y offset
var scaleVal = 20 // Scale value for the wave magnitude
var angleInc = PI/18.0; // Increment between the next angle
var angle:Number = 0;
for(var x:int = 0;x<=width;x+=5){
var y:int = offset+(sin(angle)*scaleVal);
fill(255);
rect(x,y,2,4);
y = offset+(cos(angle)*scaleVal);
fill(0);
rect(x,y,2,4);
angle += angleInc }
}
}
}