Scope: static
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:
name | type | optional | description |
---|---|---|---|
sourceCanvas | HTMLCanvasElement | No | The canvas to take a snapshot of. |
config | Phaser.Types.Renderer.Snapshot.SnapshotState | No | The 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:
name | type | optional | description |
---|---|---|---|
sourceContext | WebGLRenderingContext | No | The WebGL context to take a snapshot of. |
config | Phaser.Types.Renderer.Snapshot.SnapshotState | No | The snapshot configuration object. |
Source: src/renderer/snapshot/WebGLSnapshot.js#L11
Since: 3.0.0