Phaser API Documentation

  Version: 
copyFrame(source, [target], [brightness], [clear], [clearAlpha])

Description:

Copy the source Render Target to the target Render Target.

You can optionally set the brightness factor of the copy.

The difference between this method and drawFrame is that this method uses a faster copy shader, where only the brightness can be modified. If you need color level manipulation, see drawFrame instead.

Parameters:

name type arguments Default description
source Phaser.Renderer.WebGL.RenderTarget

The source Render Target.

target Phaser.Renderer.WebGL.RenderTarget <optional>

The target Render Target.

brightness number <optional> 1

The brightness value applied to the frame copy.

clear boolean <optional> true

Clear the target before copying?

clearAlpha boolean <optional> true

Clear the alpha channel when running gl.clear on the target?