Skip to content

Commit ec6048d

Browse files
committed
Fix renderer canvas clear color issue
1 parent dbe06b6 commit ec6048d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cocos2d/core/renderer/RendererCanvas.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,9 @@ cc.rendererCanvas = {
163163

164164
ctx.setTransform(1, 0, 0, 1, 0, 0);
165165
ctx.clearRect(0, 0, viewport.width, viewport.height);
166-
if (this._clearColor.r !== 0 ||
167-
this._clearColor.g !== 0 ||
168-
this._clearColor.b !== 0) {
166+
if (this._clearColor.r !== 255 ||
167+
this._clearColor.g !== 255 ||
168+
this._clearColor.b !== 255) {
169169
wrapper.setFillStyle(this._clearFillStyle);
170170
wrapper.setGlobalAlpha(this._clearColor.a);
171171
ctx.fillRect(0, 0, viewport.width, viewport.height);

0 commit comments

Comments
 (0)