forked from: A-B
/**
* Copyright bradsedito ( http://wonderfl.net/user/bradsedito )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/3nQ0
*/
// forked from christian's A-B
package
{
import flash.geom.*;
import flash.display.*;
import flash.events.Event;
import flash.utils.getTimer;
import frocessing.color.ColorHSV;
[ SWF (width = '465', height = '465', backgroundColor = '0xFFFFFF', frameRate = '30')]
public class A_B extends Sprite
{
private var e : BitmapData = new BitmapData (233, 233, true, 0x00);
private var s : BitmapData = new BitmapData (465, 465, true, 0x00);
private var m : Matrix = new Matrix (2, 0, 0, 2, 0, 0);
private var o : Array = [new Point (), new Point ()];
private var c : ColorHSV = new ColorHSV ();
private var t : Number;
public function A_B ()
{
//Wonderfl.disable_capture ();
stage.scaleMode = 'noScale';
addChild (new Bitmap (s));
addEventListener (Event.ENTER_FRAME, setRender);
}
private function setRender ($ : Event) : void
{
t = getTimer ();
o[1].x =- (o[0].x = Math.cos (t * 0.00005) * 1000);
o[1].y =- (o[0].y = Math.sin (t * 0.00005) * 1000);
e.perlinNoise (100, 100, 2, 0xAAA, false, false, 8, false, o);
e.paletteMap (e, e.rect, e.rect.topLeft, null, null, null, a);
s.draw (e, m, null, null, null, true);
}
private function map () : Array
{
a = [];
for (var i : int = 0x00; i < 0xFF; i++) { a.push (c.value32); c.h += 0x05; }
return a;
}
private var a : Array = map ();
}
}