Particle tint working correctly

This commit is contained in:
Richard Davey 2022-12-19 18:35:40 +00:00
parent e3e8f0d417
commit a5b7ffdb08
3 changed files with 1 additions and 12 deletions

View file

@ -233,18 +233,11 @@ var EmitterOp = new Class({
this.setMethods(method);
console.log('loadconfig', this.propertyKey, this.emitOnly);
if (this.emitOnly)
{
// Reset it back again
this.onUpdate = this.defaultUpdate;
}
if (this.propertyKey === 'tint')
{
this.onUpdate = this.staticValueUpdate;
}
},
/**

View file

@ -650,7 +650,7 @@ var Particle = new Class({
this.alpha = ops.alpha.onUpdate(this, 'alpha', t, this.alpha);
// this.tint = ops.tint.onUpdate(this, 'tint', t, this.tint);
this.tint = ops.tint.onUpdate(this, 'tint', t, this.tint);
this.bounce = ops.bounce.onUpdate(this, 'bounce', t, this.bounce);

View file

@ -2594,10 +2594,6 @@ var ParticleEmitter = new Class({
* particle. The value should be given in hex format, i.e. 0xff0000
* for a red tint, and should not include the alpha channel.
*
* Changing this property changes the tint that particles have when
* they are emitted. It does not change their tint during their lifetime.
* For that, see the `ParticleEmitter.color` property instead.
*
* Tints are additive, meaning a tint value of white (0xffffff) will
* effectively reset the tint to nothing.
*