archive-com.com » COM » N » NITOYON.COM

Total: 757

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".
  • Processing "FireCube" example ported to ActionScript 3.0 - TECH-NI Blog
    http processing org learning topics firecube html package import flash display import flash filters import flash geom public class FireCube extends Sprite private const WIDTH int 200 private const HEIGHT int 150 public function FireCube stage align TL stage scaleMode noScale scaleX scaleY 2 Create circle var circle Sprite new Sprite circle graphics beginFill 0x808080 circle graphics drawCircle 0 0 10 circle graphics endFill Create buffered image var fire BitmapData new BitmapData WIDTH HEIGHT false 0 var pg BitmapData fire clone var noiseBmd BitmapData new BitmapData WIDTH 1 var bmp Bitmap new Bitmap pg addChild bmp Generate the palette var r Array g Array b Array for var x int 0 x 256 x Hue goes from 0 to 85 red to yellow Saturation is always the maximum 255 Lightness is 0 255 for x 0 128 and 255 for x 128 255 HSVtoRGB x 3 1 Math min x 3 255 0 1 r g b Use ConvolutionFilter to calculate for every pixel var filter ConvolutionFilter new ConvolutionFilter 3 3 0 0 0 16 16 16 0 16 0 65 Prepare points and matrix var matrix Matrix new Matrix var pt0 Point new Point 0 HEIGHT 1 var pt1 Point new Point 0 1 var pt2 Point new Point 0 1 Do loop addEventListener enterFrame function event void Randomize the bottom row of the fire buffer noiseBmd noise Math random 0xffffffff 0 190 7 true fire copyPixels noiseBmd noiseBmd rect pt0 Display circle matrix tx mouseX matrix ty mouseY fire draw circle matrix Add pixel values around current pixel fire applyFilter fire fire rect pt1 filter Output everything to screen using our palette colors pg paletteMap fire fire rect pt2 r g b AS3 does not natively support HSV private function HSVtoRGB h int s Number v Number r

    Original URL path: http://tech.nitoyon.com/en/blog/2009/03/25/processing-firecube-example-ported-to-actionscript-30/ (2016-02-13)
    Open archived version from archive


  • Tag: ActionScript - TECH-NI Blog
    released 26 Jun 2008 ActionScript Google Earth control in Google Maps 26 May 2008 ActionScript Google Maps Google Maps Globe 23 May 2008 ActionScript Google Maps Google Maps API for Flash without MXML 18 May 2008 ActionScript Google Maps Keynote like cube transition by FIVe3D 12 May 2008 ActionScript Here document in AS3 0 26 Jan 2008 ActionScript Introduction of Spark project in English 17 Jan 2008 ActionScript as3Query alpha

    Original URL path: http://tech.nitoyon.com/en/blog/tags/actionscript/ (2016-02-13)
    Open archived version from archive

  • 50 polygons Mona Lisa in AS3 - TECH-NI Blog
    totalTime Number 0 private var time Date private var scoreText TextField public function Evolve stage scaleMode noScale stage align TL init image var bmp Bitmap new MonaLisa inputBmd bmp bitmapData addChild bmp imgWidth bmp width imgHeight bmp height rect inputBmd rect score scoreMax rect width rect height 255 init buffer bestBmd inputBmd clone bestBmd fillRect rect 0x000000 testBmd inputBmd clone testBmd fillRect rect 0x000000 debugBmd inputBmd clone addChild new Bitmap bestBmd x bmp width 10 init data and canvas canvas new Sprite for var i int 0 i POLYGONS i polygons i new Polygon canvas addChild new Sprite drawTest testToBest init ui var tf TextField new TextField tf text click to start tf y bmp height 10 tf scaleX tf scaleY 3 addChild tf stage addEventListener click function event void mutating mutating time mutating new Date null tf text mutating Now Simulating click to start scoreText new TextField scoreText autoSize left scoreText y bmp height 60 scoreText scaleX scoreText scaleY 3 addChild scoreText start timer setInterval update 10 private function update void if mutating return var t Date new Date totalTime t getTime time getTime 1000 time t for var i int 0 i 10 i update1 scoreText text int 1 score scoreMax 10000 100 n mutations candidates n int totalTime 10 10 s private function update1 void var index int Math random POLYGONS var backup Polygon polygons index clone polygons index mutate drawTest var diffBmd BitmapData testBmd compare inputBmd as BitmapData diffBmd applyFilter diffBmd rect pt0 monotoneFilter var testScore uint 0 for var i int 0 i 0x100 i testScore diffBmd threshold diffBmd rect pt0 i i 0xff i if score testScore score testScore testToBest mutations else polygons index backup candidates private function drawTest void canvas graphics clear for var i int 0 i POLYGONS i polygons i draw

    Original URL path: http://tech.nitoyon.com/en/blog/2009/02/17/50-polygons-mona-lisa-in-as3/ (2016-02-13)
    Open archived version from archive

  • Color Illusion Generator released - TECH-NI Blog
    a Color Illusion Generator which enables to create a illusion movie from an arbitrary image Example Flash Player 9 0 Required You can embed the movie to your blog Source code Illusion as Tweet 26 Jun 2008 View history ActionScript Google Earth control in Google Maps 50 polygons Mona Lisa in AS3 Please enable JavaScript to view the comments powered by Disqus comments powered by Disqus About Profile nitoyon I

    Original URL path: http://tech.nitoyon.com/en/blog/2008/06/26/color-illusion-generator-released/ (2016-02-13)
    Open archived version from archive

  • Google Earth control in Google Maps - TECH-NI Blog
    RotationControl 10 addChild r r x WIDTH 60 r y 90 r addEventListener change function event Event void var matrix Matrix new Matrix matrix translate WIDTH 2 HEIGHT 2 matrix rotate r value Math PI 180 matrix translate WIDTH 2 HEIGHT 2 map transform matrix matrix r dispatchEvent new Event change mapContainer addChild map private function updateValue value int void var rad Number value 100 60 Math PI 180 var p Number Math sin rad VIEWDISTANCE bmd lock var HW int WIDTH 2 var HH int HEIGHT 2 for var j int HH j HH j var pj Number 1 j p for var i int HW i HW i var x int pj i var y int pj j Math cos rad bmd setPixel i HW j HH getColor x i 1 0x80 y j 1 0x80 0 bmd unlock mapContainer filters new DisplacementMapFilter bmd new Point 0 0 1 2 256 256 color private static function bounds val Number min Number Number POSITIVE INFINITY max Number Number NEGATIVE INFINITY Number return Math max Math min val max min private static function getColor r int g int b int uint return Math floor bounds r 0 255 0x10000 Math floor bounds g 0 255 0x100 Math floor bounds b 0 255 import flash display Sprite import flash events import flash geom Point class ScrollBar extends Sprite public var value int public function ScrollBar value int void value value useHandCursor buttonMode true graphics beginFill 0xffffff graphics lineStyle 0 graphics drawRect 0 2 8 112 graphics endFill var tab Sprite new Sprite tab graphics beginFill 0xffffff tab graphics lineStyle 0 tab graphics drawRect 8 0 24 8 tab graphics endFill tab y value addChild tab addEventListener mouseDown function event MouseEvent void stage addEventListener mouseMove mouseMoveHandler stage addEventListener mouseUp mouseUpHandler mouseMoveHandler event

    Original URL path: http://tech.nitoyon.com/en/blog/2008/05/26/google-earth-control-in-google/ (2016-02-13)
    Open archived version from archive

  • Tag: Google Maps - TECH-NI Blog
    Maps 26 May 2008 ActionScript Google Maps Google Maps Globe 23 May 2008 ActionScript Google Maps Google Maps API for Flash without MXML 18 May 2008 ActionScript Google Maps Back to tag list About Profile nitoyon I m a programmer

    Original URL path: http://tech.nitoyon.com/en/blog/tags/google-maps/ (2016-02-13)
    Open archived version from archive

  • Google Maps Globe - TECH-NI Blog
    stage align TL map new Map map key ABQIAAAA6de2NwhEAYfH7t7oAYcX3xRWPxFShKMZYAUclLzloAj2mNQgoRQZnk8BRyG0g m2di3bWaT Ji54Lg map setSize new Point 800 500 map addEventListener MapEvent MAP READY function event void var lng Number 0 var types Array MapType SATELLITE MAP TYPE MapType PHYSICAL MAP TYPE MapType NORMAL MAP TYPE var type int 0 map setCenter new LatLng 0 lng 1 types 0 map disableDragging setInterval function void lng 3 type Math random 0 05 type 1 3 type map setCenter new LatLng 0 lng 1 types type lng lng 360 200 var bmd BitmapData new BitmapData WIDTH HEIGHT false 0 for var j int 0 j RADIUS 2 j var ay Number Math PI 2 Math acos 1 j RADIUS var dy Number RADIUS j RADIUS ay var rx Number RADIUS Math cos ay for var i int RADIUS rx i RADIUS rx i var ax Number Math PI 2 Math acos 1 i RADIUS rx rx var dx Number RADIUS i rx ax bmd setPixel i j getColor dx 3 128 dy 3 128 128 var diff Number HEIGHT 2 RADIUS 2 map filters new DisplacementMapFilter bmd new Point diff diff 1 2 128 128 var matrix Matrix new Matrix matrix translate diff diff

    Original URL path: http://tech.nitoyon.com/en/blog/2008/05/23/google-maps-globe/ (2016-02-13)
    Open archived version from archive

  • てっく煮
    で使えるようにしてみました ブログ Go 言語で宇宙旅行風のアニメーション GIF を作った 2016年01月18日 Go Go 言語でアニメーション GIF を作成する 2016年01月07日 Go Go 言語でソースコードから画像生成する 2015年12月31日 Go Visual Studio Code は JavaScript 開発が超絶便利になる可能性を秘めている 2015年11月20日 JavaScript Node js Object observe の死 ECMAScript の提案取り下げ V8 からも削除予定 2015年11月18日 JavaScript JavaScript フレームワークがデータバインディングを実現する4通りの手法 2014年07月18日 JavaScript Vue js が data に渡した値を激しく書き換える件について 2014年06月30日 JavaScript Ruby で HTTPS 接続するときの証明書で悩んだ話 2014年05月30日 Ruby D3 js で自作クラスにイベント発行機能を追加する 2014年04月02日 JavaScript Git for Windows でレポジトリー上の CR LF を LF に変換する手順 2014年03月28日 Git

    Original URL path: http://tech.nitoyon.com/ja/ (2016-02-13)
    Open archived version from archive



  •