Phaser API Documentation

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

Description:

Copy the source Render Target to the target Render Target.

The difference with this copy is that no resizing takes place. If the source Render Target is larger than the target then only a portion the same size as the target dimensions is copied across.

You can optionally set the brightness factor of the copy.

Parameters:

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

The source Render Target.

target Phaser.Renderer.WebGL.RenderTarget

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?

eraseMode boolean <optional> false

Erase source from target using ERASE Blend Mode?

Examples: