forked from mikeseven/node-webgl
-
Notifications
You must be signed in to change notification settings - Fork 171
/
Copy pathindex.d.ts
32 lines (26 loc) · 1016 Bytes
/
index.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
declare namespace createContext {
interface STACKGL_destroy_context {
destroy(): void;
}
interface STACKGL_resize_drawingbuffer {
resize(width: GLint, height: GLint): void;
}
interface StackGLExtension {
getExtension(extensionName: "STACKGL_destroy_context"): STACKGL_destroy_context | null;
getExtension(extensionName: "STACKGL_resize_drawingbuffer"): STACKGL_resize_drawingbuffer | null;
}
const WebGLRenderingContext: WebGLRenderingContext & StackGLExtension & {
new(): WebGLRenderingContext & StackGLExtension;
prototype: WebGLRenderingContext & StackGLExtension;
};
const WebGL2RenderingContext: WebGL2RenderingContext & StackGLExtension & {
new(): WebGL2RenderingContext & StackGLExtension;
prototype: WebGL2RenderingContext & StackGLExtension;
};
}
declare function createContext(
width: number,
height: number,
options?: WebGLContextAttributes,
): WebGLRenderingContext & createContext.StackGLExtension;
export = createContext;