mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 21:24:09 +00:00
Fixed Color error. Values now working :)
This commit is contained in:
parent
2f2d8d694f
commit
2edfa51ccd
3 changed files with 17 additions and 10 deletions
|
@ -1,4 +1,4 @@
|
|||
var CHECKSUM = {
|
||||
build: '88f5e960-f031-11e6-8333-5dcb4000555b'
|
||||
build: 'a93a63e0-f068-11e6-8898-3dfb7b565f68'
|
||||
};
|
||||
module.exports = CHECKSUM;
|
|
@ -36,6 +36,8 @@ Color.prototype = {
|
|||
this.blue = 0;
|
||||
this.alpha = 0;
|
||||
|
||||
this.dirty = true;
|
||||
|
||||
return this.update();
|
||||
},
|
||||
|
||||
|
@ -49,6 +51,8 @@ Color.prototype = {
|
|||
this.blue = blue;
|
||||
this.alpha = alpha;
|
||||
|
||||
this.dirty = true;
|
||||
|
||||
return this.update();
|
||||
},
|
||||
|
||||
|
@ -62,6 +66,8 @@ Color.prototype = {
|
|||
this.blueGL = blue;
|
||||
this.alphaGL = alpha;
|
||||
|
||||
this.dirty = true;
|
||||
|
||||
return this.update();
|
||||
},
|
||||
|
||||
|
@ -76,6 +82,8 @@ Color.prototype = {
|
|||
this.alpha = color.a;
|
||||
}
|
||||
|
||||
this.dirty = true;
|
||||
|
||||
return this.update();
|
||||
},
|
||||
|
||||
|
@ -86,9 +94,9 @@ Color.prototype = {
|
|||
return this;
|
||||
}
|
||||
|
||||
this.color = GetColor(this.r, this.g, this.b);
|
||||
this.color32 = GetColor32(this.r, this.g, this.b, this.a);
|
||||
this.rgba = 'rgba(' + this.r + ',' + this.g + ',' + this.b + ',' + (255 / this.a) + ')';
|
||||
this._color = GetColor(this.r, this.g, this.b);
|
||||
this._color32 = GetColor32(this.r, this.g, this.b, this.a);
|
||||
this._rgba = 'rgba(' + this.r + ',' + this.g + ',' + this.b + ',' + (255 / this.a) + ')';
|
||||
|
||||
this.dirty = false;
|
||||
|
||||
|
|
|
@ -117,16 +117,15 @@ CanvasRenderer.prototype = {
|
|||
var ctx = this.gameContext;
|
||||
var config = this.gameConfig;
|
||||
|
||||
if (config.clearBeforeRender)
|
||||
{
|
||||
ctx.clearRect(0, 0, this.width, this.height);
|
||||
}
|
||||
|
||||
if (!config.transparent)
|
||||
{
|
||||
ctx.fillStyle = config.backgroundColor;
|
||||
ctx.fillStyle = config.backgroundColor.rgba;
|
||||
ctx.fillRect(0, 0, this.width, this.height);
|
||||
}
|
||||
else if (config.clearBeforeRender)
|
||||
{
|
||||
ctx.clearRect(0, 0, this.width, this.height);
|
||||
}
|
||||
|
||||
// Add Pre-render hook
|
||||
|
||||
|
|
Loading…
Reference in a new issue