Options
All
  • Public
  • Public/Protected
  • All
Menu

Class UniformSetter

Helper class to set uniforms

Hierarchy

  • UniformSetter

Index

Constructors

constructor

Properties

Private aspectLocation

aspectLocation: WebGLUniformLocation = -1

Private flipYLocation

flipYLocation: WebGLUniformLocation = -1

Private gl

gl: null | WebGLRenderingContext = null

Private isHoverLocation

isHoverLocation: WebGLUniformLocation = -1

locationMap

locationMap: {} = {}

map of location of uniforms

memberof

UniformSetter

Type declaration

  • [key: string]: WebGLUniformLocation

Private mouseLocation

mouseLocation: WebGLUniformLocation = -1

Private program

program: null | WebGLProgram = null

Private timeLocation

timeLocation: WebGLUniformLocation = -1

valueMap

valueMap: {} = {}

map of uniform values

memberof

UniformSetter

Type declaration

Methods

addUniform

  • addUniform(varName: string, value: Uniform): void

getUniform

  • getUniform(varName: string): Uniform

init

  • init(gl: WebGLRenderingContext, program: WebGLProgram): void
  • Initialize (only node calls)

    memberof

    UniformSetter

    Parameters

    • gl: WebGLRenderingContext
    • program: WebGLProgram

    Returns void

removeUniform

  • removeUniform(varName: string): void

render

  • render(gl: WebGLRenderingContext, renderToCanvas: boolean, time?: number, mouse?: [number, number], isHover?: boolean): void
  • pass values to shader

    memberof

    UniformSetter

    Parameters

    • gl: WebGLRenderingContext
    • renderToCanvas: boolean
    • Optional time: number
    • Optional mouse: [number, number]
    • Optional isHover: boolean

    Returns void

setUniform

  • setUniform(label: string, value: Uniform): void

Generated using TypeDoc