Jump to content

Alpha on a particle system


UglyDuckling
 Share

Recommended Posts

Is there a way to set a alpha value for an entire particle system?

This is how I'm currently creating my particle system.

// Create particle system
this.smokeEmitter = new Phaser.Particles.Arcade.Emitter(this.game, 900, 1140, 300);
this.smokeEmitter.makeParticles("Smoke");
this.smokeEmitter.setRotation(0, 30);
this.smokeEmitter.setAlpha(0.0, 1.0, 500);
this.smokeEmitter.setScale(0.1, 0.8, 0.15, 0.8, 8000, Phaser.Easing.Sinusoidal.InOut, true);
this.smokeEmitter.setXSpeed(-5, 30);
this.smokeEmitter.setYSpeed(-40, -30);
this.smokeEmitter.gravity = -6;
this.smokeEmitter.start(false, 30000, 300);

The effect I'm looking for is an effect where the particles do not blend in each other and all particles get alpha 0.6, even if they overlap.

I have tried setting the alpha using this.smokeEmitter.alpha and I have also tried setting it on a parent group. But nothing I have tried gives me the result I want.

Link to comment
Share on other sites

Yes, but I does not do what I need it to do. I want to cap the maximum alpha of the particles to 0.6, but currently when they overlay they keep adding to each others also until nothing is transparent. 

In the image below you can see what sort of effect I'm looking for.

Image.png

Right now the only the only solution I can see is writing a custom shader?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...