-
Notifications
You must be signed in to change notification settings - Fork 0
/
offscreen-canvas.d.ts
34 lines (30 loc) · 1.77 KB
/
offscreen-canvas.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
interface OffscreenCanvasRenderingContext2DSettings {
alpha?: boolean;
colorSpace?: PredefinedColorSpace;
desynchronized?: boolean;
willReadFrequently?: boolean;
}
interface OffscreenImageBitmapRenderingContextSettings {
alpha?: boolean;
}
interface OffscreenWebGLContextAttributes {
alpha?: boolean;
antialias?: boolean;
depth?: boolean;
desynchronized?: boolean;
failIfMajorPerformanceCaveat?: boolean;
powerPreference?: WebGLPowerPreference;
premultipliedAlpha?: boolean;
preserveDrawingBuffer?: boolean;
stencil?: boolean;
}
interface OffscreenCanvas extends EventTarget {
/** Set the third parameter (`_set_to_undefined`) to `undefined` so that TypeScript recognizes that you are using the Better-TypeScript version of it */
getContext(contextId: "2d", options?: OffscreenCanvasRenderingContext2DSettings, _set_to_undefined?: undefined): OffscreenCanvasRenderingContext2D | null;
/** Set the third parameter (`_set_to_undefined`) to `undefined` so that TypeScript recognizes that you are using the Better-TypeScript version of it */
getContext(contextId: "bitmaprenderer", options?: OffscreenImageBitmapRenderingContextSettings, _set_to_undefined?: undefined): ImageBitmapRenderingContext | null;
/** Set the third parameter (`_set_to_undefined`) to `undefined` so that TypeScript recognizes that you are using the Better-TypeScript version of it */
getContext(contextId: "webgl", options?: OffscreenWebGLContextAttributes, _set_to_undefined?: undefined): WebGLRenderingContext | null;
/** Set the third parameter (`_set_to_undefined`) to `undefined` so that TypeScript recognizes that you are using the Better-TypeScript version of it */
getContext(contextId: "webgl2", options?: OffscreenWebGLContextAttributes, _set_to_undefined?: undefined): WebGL2RenderingContext | null;
}