mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 08:02:39 +08:00
fix wx canvas fillRect clearColor (#3055)
This commit is contained in:
@@ -56,8 +56,11 @@ RenderComponentWalker.prototype = {
|
||||
visit (scene) {
|
||||
let ctx = this._device._ctx;
|
||||
let canvas = this._device._canvas;
|
||||
ctx.fillStyle = cc.Camera.main.backgroundColor.toHEX("#rrggbbaa");
|
||||
let color = cc.Camera.main.backgroundColor;
|
||||
let rgba = `rgba(${color.r}, ${color.g}, ${color.b}, ${color.a/255})`;
|
||||
ctx.fillStyle = rgba;
|
||||
ctx.setTransform(1, 0, 0, 1, 0, 0);
|
||||
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
||||
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
||||
this._device._stats.drawcalls = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user