Skip to content

Particle emitter color bug #7069

@Golen87

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.

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