タグ

2010年7月6日のブックマーク (2件)

  • Controul > Speedy Voronoi diagrams in as3/flash

    A Voronoi diagram is a decomposition of space, here a 2d plane, on a nearest neighbour basis. The diagram splits the plane in regions, each corresponding to a site (a point of interest), and containing all the points closer to this site than to any other. Voronoi diagrams have many applications, in fields as different as botanics and astrology. A few examples of computer graphic uses for Voronoi d

  • [AS]リスナー関数の弱参照について

    避けて通ってきたところを理解できた(気がする)のでメモ。 リスナー関数を弱参照にする場合は、addEvenListener()の第5引数をtrueとする。 //例 //第5引数のデフォルト値はfalse this.addEventListener(Event.ENTER_FRAME, this.enterFrameHandler,false,0,true); trueを設定することでリスナー関数は弱参照となりガベージコレクション(GC)の対象となる。 ※弱参照とGCについては偉い人のサイトがわかりやすいです。 イベントリスナ (AS3) とガーベジコレクション:akihiro kamijo Tweenのアニメーションが途中で止まる:FumioNonaka.com はまったのはここで弱参照となるリスナー関数の状態。 どういうことかというと・・・ 以下の処理ではリスナー関数が弱参照でGCが発動

    [AS]リスナー関数の弱参照について