Skip to content

Particle emitter color bug #7069

Closed

Description

@Golen87

Version

  • Phaser Version: 3.88.2
  • Operating system: Linux, Ubuntu
  • Browser: Chrome Version 133.0.6943.53

Description

If a ParticleEmitter is provided with color: [0xFF0000, 0x00FF00], the particles will correctly interpolate red->green.

However, if the ParticleEmitter's config is updated using updateConfig or setConfig, the color cycle repeats red->green->red->green. Each update adds another cycle length, which quickly turns into rapid flickering.

Example Test Code

https://phaser.io/sandbox/YSJesSAQ

Click on the game multiple times to see the cycle count increase, causing a rapid flicker.

Additional Information

The updateConfig is empty in this example, but in my own project I need the function to adjust the particle angle. Adding color made me stumble across the issue. Depending on the cause of the problem, the same bug may affect other emitter properties.

Activity

  1. changed the title [-]Particle emitter color[/-] [+]Particle emitter color bug[/+] on Mar 1, 2025
  2. zekeatchan commented on Mar 12, 2025

    @zekeatchan
    Contributor

    Hi @Golen87. Thanks for submitting this issue. @samme has provided a PR to fix this and I've merged it with the master branch. It will be part of the next release. Do test it out and let us know if you encounter any issues.

  3. locked as resolved and limited conversation to collaborators on Sep 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions