Hierarchy

  • Framebuffer

Methods

  • Parameters

    • x: number
    • y: number

    Returns number

  • Parameters

    • points: {
          x: number;
          y: number;
      }[]

    Returns number[]

  • Parameters

    • x: number
    • y: number

    Returns number

  • Parameters

    • points: {
          x: number;
          y: number;
      }[]

    Returns number[]

  • Gets current image data as a BLOB. Use callback to handle data.

    Parameters

    • callback: ((blob: Blob) => void)

      Use callback to handle Blob

        • (blob: Blob): void
        • Parameters

          • blob: Blob

          Returns void

    • type: "png" | "jpeg" = 'png'

    Returns void

  • Gets current image data from the framebuffer as Base64 string

    Parameters

    • type: "png" | "jpeg" = 'png'

    Returns string

  • Returns one pixel at defined position

    Parameters

    • x: number
    • y: number

    Returns Uint8Array

  • Computes normalised X, Y, Z of event in the clip space

    Parameters

    • x: number

      X coordinate of the event

    • y: number

      Y coordinate of the event

    Returns vec3

  • Parameters

    • points: {
          x: number;
          y: number;
      }[]

    Returns vec3[]

  • Computes normalised X, Y, Z of event in the clip space with near and far bounds, This can be used to refine near and far clipping planes for more precise evaluation in the second pass.

    Parameters

    • x: number

      X coordinate of the event

    • y: number

      Y coordinate of the event

    Returns {
        far: vec3;
        middle: vec3;
        near: vec3;
    }

    • far: vec3
    • middle: vec3
    • near: vec3

Constructors

  • Parameters

    • gl: WebGLRenderingContext
    • width: number
    • height: number
    • withDepth: boolean
    • glVersion: number

    Returns Framebuffer

Properties

depthTexture: WebGLTexture
framebuffer: WebGLFramebuffer
height: number
isReady: boolean = true
renderbuffer: WebGLRenderbuffer
texture: WebGLTexture
width: number

Generated using TypeDoc