src/nodes/RenderTexture.js
function (rect) {
        if (rect) {
            this.context.clearRect(rect.origin.x, rect.origin.y, rect.size.width, rect.size.height)
        } else {
            this.canvas.width = this.canvas.width
            if (cc.FLIP_Y_AXIS) {
                this.context.scale(1, -1)
                this.context.translate(0, -this.canvas.height)
            }
        }
    }
function (rect) {
        if (rect) {
            this.context.clearRect(rect.origin.x, rect.origin.y, rect.size.width, rect.size.height)
        } else {
            this.canvas.width = this.canvas.width
            if (cc.FLIP_Y_AXIS) {
                this.context.scale(1, -1)
                this.context.translate(0, -this.canvas.height)
            }
        }
    }
function ( rect ) { if ( rect ) { this . context . clearRect ( rect . origin . x , rect . origin . y , rect . size . width , rect . size . height ) } else { this . canvas . width = this . canvas . width if ( cc . FLIP_Y_AXIS ) { this . context . scale ( 1 , - 1 ) this . context . translate ( 0 , - this . canvas . height ) } } }
Clear the canvas
Clear the canvas