Skip to content

Commit 2edfa51

Browse files
committed
Fixed Color error. Values now working :)
1 parent 2f2d8d6 commit 2edfa51

3 files changed

Lines changed: 17 additions & 10 deletions

File tree

v3/src/checksum.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
var CHECKSUM = {
2-
build: '88f5e960-f031-11e6-8333-5dcb4000555b'
2+
build: 'a93a63e0-f068-11e6-8898-3dfb7b565f68'
33
};
44
module.exports = CHECKSUM;

v3/src/graphics/color/Color.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ Color.prototype = {
3636
this.blue = 0;
3737
this.alpha = 0;
3838

39+
this.dirty = true;
40+
3941
return this.update();
4042
},
4143

@@ -49,6 +51,8 @@ Color.prototype = {
4951
this.blue = blue;
5052
this.alpha = alpha;
5153

54+
this.dirty = true;
55+
5256
return this.update();
5357
},
5458

@@ -62,6 +66,8 @@ Color.prototype = {
6266
this.blueGL = blue;
6367
this.alphaGL = alpha;
6468

69+
this.dirty = true;
70+
6571
return this.update();
6672
},
6773

@@ -76,6 +82,8 @@ Color.prototype = {
7682
this.alpha = color.a;
7783
}
7884

85+
this.dirty = true;
86+
7987
return this.update();
8088
},
8189

@@ -86,9 +94,9 @@ Color.prototype = {
8694
return this;
8795
}
8896

89-
this.color = GetColor(this.r, this.g, this.b);
90-
this.color32 = GetColor32(this.r, this.g, this.b, this.a);
91-
this.rgba = 'rgba(' + this.r + ',' + this.g + ',' + this.b + ',' + (255 / this.a) + ')';
97+
this._color = GetColor(this.r, this.g, this.b);
98+
this._color32 = GetColor32(this.r, this.g, this.b, this.a);
99+
this._rgba = 'rgba(' + this.r + ',' + this.g + ',' + this.b + ',' + (255 / this.a) + ')';
92100

93101
this.dirty = false;
94102

v3/src/renderer/canvas/CanvasRenderer.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,16 +117,15 @@ CanvasRenderer.prototype = {
117117
var ctx = this.gameContext;
118118
var config = this.gameConfig;
119119

120-
if (config.clearBeforeRender)
121-
{
122-
ctx.clearRect(0, 0, this.width, this.height);
123-
}
124-
125120
if (!config.transparent)
126121
{
127-
ctx.fillStyle = config.backgroundColor;
122+
ctx.fillStyle = config.backgroundColor.rgba;
128123
ctx.fillRect(0, 0, this.width, this.height);
129124
}
125+
else if (config.clearBeforeRender)
126+
{
127+
ctx.clearRect(0, 0, this.width, this.height);
128+
}
130129

131130
// Add Pre-render hook
132131

0 commit comments

Comments
 (0)