@types/gl-fbo
Version:
TypeScript definitions for gl-fbo
50 lines (38 loc) • 1.3 kB
Markdown
# Installation
> `npm install --save @types/gl-fbo`
# Summary
This package contains type definitions for gl-fbo (https://github.com/stackgl/gl-fbo).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/gl-fbo.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/gl-fbo/index.d.ts)
````ts
import texture2D = require("gl-texture2d");
type Texture = ReturnType<typeof texture2D>;
declare class FrameBuffer {
shape: [number, number];
gl: WebGLRenderingContext;
handle: WebGLFramebuffer;
color: Texture[];
depth: Texture | null;
bind(): void;
dispose(): void;
}
interface FrameBufferOptions {
preferFloat?: boolean | undefined;
float?: boolean | undefined;
color?: number | undefined;
depth?: boolean | undefined;
stencil?: boolean | undefined;
}
declare function glFBO(
gl: WebGLRenderingContext,
shape: [number, number],
options?: FrameBufferOptions,
): FrameBuffer;
export = glFBO;
````
### Additional Details
* Last updated: Tue, 07 Nov 2023 03:09:37 GMT
* Dependencies: [@types/gl-texture2d](https://npmjs.com/package/@types/gl-texture2d)
# Credits
These definitions were written by [Nick Krichevsky](https://github.com/ollien).