Phaser API Documentation

  Version: 
<static> WebGL(sourceContext, config)

Description:

Takes a snapshot of an area from the current frame displayed by a WebGL canvas.

This is then copied to an Image object. When this loads, the results are sent to the callback provided in the Snapshot Configuration object.

Parameters:

name type description
sourceContext WebGLRenderingContext

The WebGL context to take a snapshot of.

config Phaser.Types.Renderer.Snapshot.SnapshotState

The snapshot configuration object.

Since: 3.0.0