var canvas:BitmapData = new BitmapData(400,400,false, 0x000000);
addChild(new Bitmap(canvas));
addEventListener(Event.ENTER_FRAME, onLoop);
function onLoop(evt:Event):void {
canvas.perlinNoise(200,200, 2, 1, true, false,0, true,
[new Point(mouseX, mouseY),
new Point(-mouseX, -mouseY)]);
}
There area few snippets on the way that involve perlin noise. Starting here with something simple. This creates 2 octave perlin noise and moves each octave based on the mouse location.
Perlin noise was invented by Ken Perlin.
1 comment