Jump to content

Particle Storm Atlas


NumbOfAthma
 Share

Recommended Posts

Hey guys,

I was wondering if Particle Storm can handle an atlas:

I'm trying to port this:

var emitter = this.game.add.emitter(this.centerX, this.moon.y - ~~(this.moon.y * 0.5), 25);

emitter.makeParticles("prefabs", ['present_0.png', 'present_1.png', 'present_2.png', 'present_3.png', 'present_4.png',  'present_5.png',  'present_6.png', 'present_7.png', 'present_8.png', 'present_9.png']);
emitter.gravity = 200;
emitter.start(true, 3500, null, 15);

and from what I've seen until now there is only this setup in Particle Storm:

var data = {
 lifespan: { min: 2000, max: 3000 },
 image: ['flare_diamond', 'flare_point', 'flare_vertical']
};

Any ideas? Thank you!

Link to comment
Share on other sites

Yes, have a look at the cards example:

    manager = game.plugins.add(Phaser.ParticleStorm);

    var cardBack = {
        lifespan: 1000,
        image: 'cards',
        frame: 'cardBack_blue1',
        vx: { min: -2, max: 2 },
        rotation: { delta: 0.8 },
        scaleX: { initial: 0, value: 1, control: 'yoyo' },
        emit: { name: 'front', at: [ { time: 1, value: 1 } ], inherit: { vx: true, rotation: true } }
    };

    var cardFront = {
        lifespan: 1000,
        image: 'cards',
        frame: ['cardDiamonds6', 'cardHearts3', 'cardClubsK', 'cardJoker', 'cardSpades2'],
        rotation: { delta: 0.8 },
        scaleX: { initial: 0, value: 1, control: 'yoyo' },
        emit: { name: 'back', at: [ { time: 1, value: 1 } ], inherit: { vx: true, rotation: true } }
    };

    manager.addData('back', cardBack);
    manager.addData('front', cardFront);

    emitter = manager.createEmitter();

    emitter.addToWorld();

    emitter.emit('back', 400, 300, { repeat: 10, frequency: 1500 });

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...