{"id":112,"date":"2008-12-03T00:00:24","date_gmt":"2008-12-03T07:00:24","guid":{"rendered":"https:\/\/actionsnippet.com\/?p=276"},"modified":"2008-12-03T00:00:24","modified_gmt":"2008-12-03T07:00:24","slug":"perlinnoise","status":"publish","type":"post","link":"https:\/\/actionsnippet.com\/?p=112","title":{"rendered":"perlinNoise()"},"content":{"rendered":"<pre class=\"brush: as3; title: ; notranslate\" title=\"\">\r\nvar canvas:BitmapData = new BitmapData(400,400,false, 0x000000);\r\naddChild(new Bitmap(canvas));\r\n\r\naddEventListener(Event.ENTER_FRAME, onLoop);\r\nfunction onLoop(evt:Event):void {\r\n  canvas.perlinNoise(200,200, 2, 1, true, false,0, true, \r\n                              &#x5B;new Point(mouseX, mouseY),\r\n                              new Point(-mouseX, -mouseY)]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t    \r\n}\r\n<\/pre>\n<p>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.<\/p>\n<p>Perlin noise was invented by <a href='http:\/\/mrl.nyu.edu\/~perlin\/'>Ken Perlin<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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, &#x5B;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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24,25],"tags":[3,4,82,83],"class_list":["post-112","post","type-post","status-publish","format-standard","hentry","category-bitmapdata","category-pixel-manipulation","tag-actionscript","tag-flash","tag-perlin","tag-textures"],"_links":{"self":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/posts\/112","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=112"}],"version-history":[{"count":0,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/posts\/112\/revisions"}],"wp:attachment":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}