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

2.0.4 • Public • Published

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

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

Credits

These definitions were written by Nick Krichevsky.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/gl-fbo

Weekly Downloads

23

Version

2.0.4

License

MIT

Unpacked Size

3.92 kB

Total Files

5

Last publish

Collaborators

  • types