Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Particle Emitter alpha default Phaser 3.88.2 #7044

Open
asafSpino opened this issue Feb 16, 2025 · 3 comments
Open

Particle Emitter alpha default Phaser 3.88.2 #7044

asafSpino opened this issue Feb 16, 2025 · 3 comments

Comments

@asafSpino
Copy link

In Phaser version 3.88.2, we noticed an issue with the particle system.
Previously, when emitting particles, their alpha value defaulted to undefined and we would set it to start at 0, but now it starts at 1. Since we animate the particle alpha, this change is causing weird behavior with the existing particle emitters.
It would resolve the issue if the default alpha could be set to 0 or if it was configurable.
Thanks!

@samme
Copy link
Contributor

samme commented Feb 16, 2025

What's your code?

@samme
Copy link
Contributor

samme commented Feb 18, 2025

The default alpha is supposed to be 1, never undefined, but you can configure any emit value:

alpha: { start: 0, end: 1, ease: (t) => t }

For custom op functions, give both onEmit and onUpdate:

alpha: { onEmit: () => 0, onUpdate: (particle, key, t) => t }

@asafSpino
Copy link
Author

Ok I understand thanks!
Wanted to make sure this was the wanted change because will have to adapt many of my emitters to this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants