Skip to content

Commit c3cc431

Browse files
committed
Particle.color has been removed as it's now calculated during rendering to allow for Camera alpha support.
1 parent bc40830 commit c3cc431

2 files changed

Lines changed: 1 addition & 17 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ The process of managing scissors in the WebGLRenderer has been completely rewrit
6666
* `Game.destroy` has a new boolean argument `noReturn`. If set it will remove all Core plugins when the game instance is destroyed. You cannot restart Phaser on the same web page after doing this, so only set it if you know you're done and don't need to run Phaser again.
6767
* The `MouseManager` will no longer process its native events if the manager reference has been removed (i.e. you move the pointer as the game is destroying itself)
6868
* The `TouchManager` will no longer process its native events if the manager reference has been removed (i.e. you move the pointer as the game is destroying itself)
69+
* `Particle.color` has been removed as it's now calculated during rendering to allow for Camera alpha support.
6970

7071
### Game Config Resolution Specific Bug Fixes
7172

src/gameobjects/particles/Particle.js

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -212,15 +212,6 @@ var Particle = new Class({
212212
*/
213213
this.tint = 0xffffff;
214214

215-
/**
216-
* The full color of this Particle, computed from its alpha and tint.
217-
*
218-
* @name Phaser.GameObjects.Particles.Particle#color
219-
* @type {integer}
220-
* @since 3.0.0
221-
*/
222-
this.color = 16777215;
223-
224215
/**
225216
* The lifespan of this Particle in ms.
226217
*
@@ -397,10 +388,6 @@ var Particle = new Class({
397388

398389
this.tint = emitter.tint.onEmit(this, 'tint');
399390

400-
var ua = ((this.alpha * 255) | 0) & 0xFF;
401-
402-
this.color = ((ua << 24) | GetColor(this.tint)) >>> 0;
403-
404391
this.index = emitter.alive.length;
405392
},
406393

@@ -571,10 +558,6 @@ var Particle = new Class({
571558

572559
this.tint = emitter.tint.onUpdate(this, 'tint', t, this.tint);
573560

574-
var ua = ((this.alpha * 255) | 0) & 0xFF;
575-
576-
this.color = ((ua << 24) | GetColor(this.tint)) >>> 0;
577-
578561
this.lifeCurrent -= delta;
579562

580563
return (this.lifeCurrent <= 0);

0 commit comments

Comments
 (0)