-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtypes.js
20 lines (17 loc) · 910 Bytes
/
types.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/**
* @typedef {"2d" | "webgl" | "experimental-webgl" | "webgl2" | "webgl2-compute" | "bitmaprenderer" | "gpupresent" | "webgpu"} ContextType A DOMString containing the context identifier defining the drawing context associated to the canvas.
*/
/**
* @typedef {object} CanvasContextOptions Options for canvas creation. All optional.
* @property {number} [width=300] Request an initial canvas width.
* @property {number} [height=150] Request an initial canvas height.
* @property {boolean} [offscreen=false] Request an offscreen canvas.
* @property {boolean} [worker=false] Handle use in a worker.
* @property {CanvasRenderingContext2DSettings | WebGLContextAttributes} [contextAttributes={}] Attributes to be passed to getContext.
*/
/**
* @typedef {object} CanvasContextReturnValue
* @property {HTMLCanvasElement | OffscreenCanvas} canvas
* @property {RenderingContext} context
*/
export {};