Phaser.Renderer.Snapshot

Scope: static

Source: src/renderer/snapshot/index.js#L7

Methods:

Public Members

Canvas

<static> Canvas(sourceCanvas, config)

Description:

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:

nametypeoptionaldescription
sourceCanvasHTMLCanvasElementNoThe canvas to take a snapshot of.
configPhaser.Types.Renderer.Snapshot.SnapshotStateNoThe snapshot configuration object.

Source: src/renderer/snapshot/CanvasSnapshot.js#L11
Since: 3.0.0


WebGL

<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:

nametypeoptionaldescription
sourceContextWebGLRenderingContextNoThe WebGL context to take a snapshot of.
configPhaser.Types.Renderer.Snapshot.SnapshotStateNoThe snapshot configuration object.

Source: src/renderer/snapshot/WebGLSnapshot.js#L11
Since: 3.0.0


Private Members

Updated on