npm.io
2.0.4 • Published 2 years ago

@types/gl-fbo

Licence
MIT
Version
2.0.4
Deps
1
Size
4 kB
Vulns
0
Weekly
0
Stars
51.4K

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.