@types/gl
TypeScript icon, indicating that this package has built-in type declarations

6.0.5 • Public • Published

Installation

npm install --save @types/gl

Summary

This package contains type definitions for gl (https://github.com/stackgl/headless-gl#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/gl.

index.d.ts

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;
    };
}

declare function createContext(
    width: number,
    height: number,
    options?: WebGLContextAttributes,
): WebGLRenderingContext & createContext.StackGLExtension;

export = createContext;

Additional Details

  • Last updated: Tue, 07 Nov 2023 03:09:37 GMT
  • Dependencies: none

Credits

These definitions were written by .

Readme

Keywords

none

Package Sidebar

Install

npm i @types/gl

Weekly Downloads

14,173

Version

6.0.5

License

MIT

Unpacked Size

3.99 kB

Total Files

5

Last publish

Collaborators

  • types