Namespace: Snapshot

Phaser.Renderer. Snapshot

Methods


<static> Canvas(sourceCanvas, config)

Takes a snapshot of an area from the current frame displayed by a 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
sourceCanvas HTMLCanvasElement

The canvas to take a snapshot of.

config SnapshotState

The snapshot configuration object.

Since: 3.0.0
Source: src/renderer/snapshot/CanvasSnapshot.js (Line 11)

<static> WebGL(sourceCanvas, config)

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
sourceCanvas HTMLCanvasElement

The canvas to take a snapshot of.

config SnapshotState

The snapshot configuration object.

Since: 3.0.0
Source: src/renderer/snapshot/WebGLSnapshot.js (Line 11)