본문 바로가기

AS3

[Stardust] 기본 사용법


라이브러리 : http://code.google.com/p/stardust-particle-engine/

package
{
    import flash.display.Sprite;
    import flash.display.StageAlign;
    import flash.events.Event;
    import flash.geom.Point;
    
    import idv.cjcat.stardust.common.actions.Age;
    import idv.cjcat.stardust.common.actions.AlphaCurve;
    import idv.cjcat.stardust.common.actions.DeathLife;
    import idv.cjcat.stardust.common.actions.ScaleCurve;
    import idv.cjcat.stardust.common.clocks.SteadyClock;
    import idv.cjcat.stardust.common.emitters.Emitter;
    import idv.cjcat.stardust.common.initializers.Life;
    import idv.cjcat.stardust.common.math.UniformRandom;
    import idv.cjcat.stardust.twoD.actions.Damping;
    import idv.cjcat.stardust.twoD.actions.Move;
    import idv.cjcat.stardust.twoD.emitters.Emitter2D;
    import idv.cjcat.stardust.twoD.initializers.DisplayObjectClass;
    import idv.cjcat.stardust.twoD.initializers.Position;
    import idv.cjcat.stardust.twoD.initializers.Velocity;
    import idv.cjcat.stardust.twoD.particles.Particle2D;
    import idv.cjcat.stardust.twoD.renderers.DisplayObjectRenderer;
    import idv.cjcat.stardust.twoD.zones.LazySectorZone;
    import idv.cjcat.stardust.twoD.zones.SinglePoint;
    
    import jjongun.Utils.Stats;
    
    [SWF(frameRate=60 , backgroundColor="0")]
    public class StardustTest extends Sprite
    {
        private var emitter:Emitter2D;
        private var point:SinglePoint;
        private var render:DisplayObjectRenderer;
        public function StardustTest()
        {
            //initalize
            emitter = new Emitter2D( new SteadyClock(4) );
            emitter.addInitializer( new DisplayObjectClass(circle) );
            emitter.addInitializer( new Life(new UniformRandom(10,5)) );
            point = new SinglePoint();
            emitter.addInitializer( new Position(point));
            emitter.addInitializer( new Velocity(new LazySectorZone(10, 3)));
            
            //action
            emitter.addAction( new Age());
            emitter.addAction( new DeathLife());
            emitter.addAction( new Move());
            emitter.addAction( new Damping(.1));
            emitter.addAction( new ScaleCurve(0,10));
            emitter.addAction( new AlphaCurve(5,0));
            
            render = new DisplayObjectRenderer(this);
            render.addEmitter(emitter);
            
            
            addChild(new Stats());
            
            addEventListener(Event.ENTER_FRAME , loop);
        }
        private function loop(e:Event):void
        {
            point.x = mouseX;
            point.y = mouseY;
            emitter.step();
        }
    }
}
import flash.display.Sprite;

class circle extends Sprite{
    public function circle()
    {
        this.graphics.beginFill(Math.random() * 145879);
        this.graphics.drawCircle(0,0,10);
        this.graphics.endFill();
    }
}
유튭 강좌 : https://www.youtube.com/user/cjcat2266#g/u
  • 이전 댓글 더보기
  • BlogIcon 匿名 2014.01.22 02:55

    다지bullet proof web hosting and web marketing립드

  • BlogIcon nike schuhe 2014.01.22 18:32

    마마Sko kan forblive på i lufthavne

    Sko forbliver normalt On i lufthavne

    Lufthavne til at stoppe mandat, at personer fjerne deres sko, når de går igennem sikkerhedskontrollen før bording et fly.

    Sorterværk har ledt Ralph Lauren Outlet efter sko bomber siden briten Richard Reid forsøgte at antænde sine sko på en flyvning fra Paris til Miami i 2001. Men med hensyn til TSA fastsatte standarder, 어메

  • BlogIcon Nike Blazer Homme 2014.03.13 00:34

    로있5 På vegne af

    Air Jordan 7, til den dag i dag, leverer ligesom par andre. Men vær opmærksom på, at du vil give en stor grad af ankel assistance og betydelige portioner af både front-to-back pasformen og den generelle holdbarhed. Og dem med smalle fødder skal være dobbelt så tvivlsom, fordi Nike Air Jordan 7 sko tætsiddende blonder snøreringe vil ikke tjene dig godt. Air Jordan VII (7) blev frig마이

  • 이용약관위배로 관리자 삭제된 댓글입니다.

  • BlogIcon 匿名 2014.08.19 14:28

    이용약관위배로 관리자 삭제된 댓글입니다.

  • BlogIcon 管道管件 2014.08.31 11:06

    데메 ,承插管头管,910压型机;








    24-210-840型琉璃瓦机
    ,HT-24-200-;
    压型钢板型号 24-210-840 用途
    有效覆盖宽度(mm) 840
    展开宽度(mm) 1000 屋面板、墙面板
    波高(mm) 24
    板厚(mm) 0,异径管-1.3-0.8


    ,简述彩钢设;











    来源:적지

  • BlogIcon 匿名 2014.09.11 12:19

    이용약관위배로 관리자 삭제된 댓글입니다.

  • BlogIcon moncler sale womens 2014.09.29 18:52

    이용약관위배로 관리자 삭제된 댓글입니다.

  • BlogIcon oakley sunglasses wholesale 2014.10.02 01:40

    이용약관위배로 관리자 삭제된 댓글입니다.

  • BlogIcon chanel earrings cc 2014.10.26 08:54

    이용약관위배로 관리자 삭제된 댓글입니다.

  • BlogIcon 眼镜批发市场 2014.11.12 00:51

    이용약관위배로 관리자 삭제된 댓글입니다.

  • BlogIcon moncler bady lacquer 2014.11.12 11:44

    이용약관위배로 관리자 삭제된 댓글입니다.

  • BlogIcon moncler hong kong ifc 2014.11.12 11:46

    이용약관위배로 관리자 삭제된 댓글입니다.

  • 匿名 2015.01.07 17:46

    이용약관위배로 관리자 삭제된 댓글입니다.

  • 匿名 2015.01.15 12:20

    이용약관위배로 관리자 삭제된 댓글입니다.

  • 匿名 2015.02.06 14:13

    이는剑侠情缘服务端密传服务端街头篮球服务端A3私服务端破天一剑服务端

    魔域服务端魔兽世界服务端天龙八部服务端RF服务端传奇归来私服务端

    风云雄霸天下服务端天之炼狱一条龙大话西游服务端精灵复兴私服务端


    传奇世界私服开服一条龙服务-

    魔兽私服开区一条龙服务-


    IDC服务器以及空间租用-

    魔域开区sf一条龙开区服务-

    传奇广告代理-


    客服咨询QQ(企鹅扣扣)1292124634

    Email:1292124634@qq.com

    商业版本免费开放下载




    前沿科技1.80怀旧复古赤月终极烟花教主淘宝秒杀商城升级版



    前沿科技1.76雄霸特色大极品+50元素倚天辟地狂风连击传奇



    前沿科技3D真彩无英雄中变靓装元素傲天朱雀神龙毒血斩



    前沿科技至尊中变1.89无英雄元素立法之殿版

    히간

  • BlogIcon iphone 6 Online store 2015.03.16 09:00

    를기I sat cross legged on my bed and slowly strummed my guitar. I've been playing ever since I was 12. I'm 16 now. I'm not exactly sure what I was playing, just noise I guess. Music is my passion. Whether I'm having an amazing day, or a horrible one, I always find time to play.

    Anyways, my name's Alexandria Marie Love. Yes, that's actually my last name. I go by Alex. The only people who call me Ale려지

  • 하있simulation burberry parfum femme de saut fourrure". de préférence de l'empereur de l'histoire de la Chine. le lendemain,La lutte des classes complète de la echarpe burberry homme pas cher soi - disant, Sur la route, 张俊人 rédacteur photo). par 仇士良 édit eunuque faux nom à tort que le Roi Li chen Huang trop de lui la poésie de l'expansion de l'impact so리들

  • 匿名 2015.04.05 10:19

    리마In fact, AIRMAX and not stand still, today we join in the use of special powers of the Nike Air Max 2009 sale, AIRMAX identification of a new era to create. Nike Air Max 2009 sale, the use of a feature of the technology of today's most ardent Flywire.



    Although the use of new technologies and maintaining AIRMAX traditional shoe design line of the body, new technology and tradition in the col련있

  • 匿名 2015.04.08 09:20

    조히火车采集器html简单模板示范






    Local Singles







    [标签:来源]








    Today people hardly get the time to interact because of their hectic schedule. Today various websites have created opportunities to interact with local singles of our choice. You could be living in any part of the world; through these websites one can meet suitable local singles of one's choice. This is a much bette메수