Sign in to follow this  

Fading out emitters particles

Recommended Posts


I'm trying to do simple explosion with emitter. I want particles to slowly fade out so I do:

emitter.setAlpha(0.2, 1, 10, Phaser.Easing.Linear.None, false);
emitter.autoAlpha = true;

But when i run game and emitter start doing it's job it throws at the console:

Uncaught TypeError: Cannot read property 'v' of undefined
    at Phaser.Particle.update (phaser_phaser_1.js:99052)
    at Phaser.Particles.Arcade.Emitter.update (phaser_phaser_1.js:99548)
    at Phaser.World.Phaser.Group.update (phaser_phaser_1.js:33716)
    at Phaser.Stage.update (phaser_phaser_1.js:31820)
    at Phaser.Game.updateLogic (phaser_phaser_1.js:36338)
    at Phaser.Game.update (phaser_phaser_1.js:36280)
    at Phaser.RequestAnimationFrame.updateRAF (phaser_phaser_1.js:61979)
    at _onLoop (phaser_phaser_1.js:61962)


What am I doing wrong with this task?


Solved - it seems like I set too low alpha rate parameter (third param. in setAlpha).

I misunderstood how it works. Now I get it. If I set rate as 1500 ms particles will fade out in this time. It works now.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.