Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Geometry

Hierarchy

Implements

Index

Constructors

constructor

Properties

colorBuffer

colorBuffer: WebGLBuffer

colorLocation

colorLocation: number

colors

colors: number[]

normalBuffer

normalBuffer: WebGLBuffer

normalLocation

normalLocation: number

normals

normals: number[]

positionBuffer

positionBuffer: WebGLBuffer

positionLocation

positionLocation: number

positions

positions: number[]

size

size: number

texcoordBuffer

texcoordBuffer: WebGLBuffer

texcoordLocation

texcoordLocation: number

texcoords

texcoords: number[]

Methods

attachAttributes_

  • attachAttributes_(gl: WebGLRenderingContext | WebGL2RenderingContext, program: WebGLProgram): void
  • Parameters

    • gl: WebGLRenderingContext | WebGL2RenderingContext
    • program: WebGLProgram

    Returns void

bindAttributes_

  • bindAttributes_(gl: WebGLRenderingContext | WebGL2RenderingContext, program: WebGLProgram): void

create

  • create(gl: WebGLRenderingContext | WebGL2RenderingContext, program: WebGLProgram): void
  • Parameters

    • gl: WebGLRenderingContext | WebGL2RenderingContext
    • program: WebGLProgram

    Returns void

createAttribLocation_

  • createAttribLocation_(gl: WebGLRenderingContext | WebGL2RenderingContext, program: WebGLProgram, name: string, size: number, type: number): number
  • Parameters

    • gl: WebGLRenderingContext | WebGL2RenderingContext
    • program: WebGLProgram
    • name: string
    • size: number
    • type: number

    Returns number

createAttributes_

  • createAttributes_(gl: WebGLRenderingContext | WebGL2RenderingContext, program: WebGLProgram): void
  • Parameters

    • gl: WebGLRenderingContext | WebGL2RenderingContext
    • program: WebGLProgram

    Returns void

createBufferData_

  • createBufferData_(gl: WebGLRenderingContext | WebGL2RenderingContext, type: number, array: BufferSource): WebGLBuffer
  • Parameters

    • gl: WebGLRenderingContext | WebGL2RenderingContext
    • type: number
    • array: BufferSource

    Returns WebGLBuffer

Protected createData_

  • createData_(): void

Static fromIndices

  • fromIndices(indices: number[], array: number[], size: number): number[]