NumbOfAthma Posted March 12, 2017 Share Posted March 12, 2017 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 More sharing options...
rich Posted March 12, 2017 Share Posted March 12, 2017 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 More sharing options...
NumbOfAthma Posted March 12, 2017 Author Share Posted March 12, 2017 Thank you, rich! Link to comment Share on other sites More sharing options...
Recommended Posts