Skip to content

Commit 7c03028

Browse files
committed
Updated jsdocs
1 parent 3206a58 commit 7c03028

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

src/renderer/snapshot/index.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,20 @@
77
/**
88
* @callback SnapshotCallback
99
*
10-
* @param {HTMLImageElement} snapshot - [description]
10+
* @param {(Phaser.Display.Color)|HTMLImageElement)} snapshot - Either a Color object if a single pixel is being grabbed, or a new Image which contains a snapshot of the canvas contents.
11+
*/
12+
13+
/**
14+
* @typedef {object} SnapshotState
15+
*
16+
* @property {SnapshotCallback} callback - The function to call after the snapshot is taken.
17+
* @property {string} [type='image/png'] - The format of the image to create, usually `image/png` or `image/jpeg`.
18+
* @property {number} [encoderOptions=0.92] - The image quality, between 0 and 1. Used for image formats with lossy compression, such as `image/jpeg`.
19+
* @property {integer} [x=0] - The x coordinate to start the snapshot from.
20+
* @property {integer} [y=0] - The y coordinate to start the snapshot from.
21+
* @property {integer} [width] - The width of the snapshot.
22+
* @property {integer} [height] - The height of the snapshot.
23+
* @property {boolean} [getPixel=false] - Is this a snapshot to get a single pixel, or an area?
1124
*/
1225

1326
/**

0 commit comments

Comments
 (0)