オーロラ
thanks
http://d.hatena.ne.jp/haru-komugi/20080406/1207426034
http://soap.vc
/**
* Copyright imaji_fl ( http://wonderfl.net/user/imaji_fl )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/bnYO
*/
//thanks
//http://d.hatena.ne.jp/haru-komugi/20080406/1207426034
//http://soap.vc
package {
import flash.display.Sprite;
import flash.display.Bitmap;
import flash.events.Event
import flash.display.BitmapData
import flash.geom.Point
public class FlashTest extends Sprite {
private var bmp:Bitmap
private var bmp_data:BitmapData
private var offset:Array
private var rand:Number
public function FlashTest() {
// write as3 code here..
bmp=new Bitmap()
bmp_data=new BitmapData(stage.stageWidth,stage.stageHeight,true,0xFFFF8000);
offset = [new Point(0,0),new Point(0,0)];
rand=Math.floor(Math.random()*0xFFFF);
addChild(bmp)
addEventListener(Event.ENTER_FRAME ,loopBitmap);
}
private function loopBitmap(e:Event):void {
//x.yにちょい移動させる
offset[0].x+=4;
offset[1].y+=1;
//パーリンノイズ作成
bmp_data.perlinNoise(300 ,500 , 2 , rand , false , true , (8|4|2|1) , false , offset);
bmp.bitmapData=bmp_data
}
}
}