Phaser API Documentation

  Version: 
drawFrame(source, [target], [clearAlpha], [colorMatrix])

Description:

Copy the source Render Target to the target Render Target, using the given Color Matrix.

The difference between this method and copyFrame is that this method uses a color matrix shader, where you have full control over the luminance values used during the copy. If you don't need this, you can use the faster copyFrame method 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.

clearAlpha boolean <optional> true

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

colorMatrix Phaser.Display.ColorMatrix <optional>

The Color Matrix to use when performing the draw.

Examples: