figureone
    Preparing search index...

    FigureElementPrimitive that can be used to utilize custom shaders for WebGL.

    Hierarchy (View Summary)

    Index

    Methods

    • Buffer a texture for the shape to be painted with.

      Parameters

      • location: string
      • mapFrom: Rect = ...
      • mapTo: Rect = ...
      • mapToBuffer: string = 'a_vertex'
      • points: number[] = []
      • repeat: boolean = false
      • onLoad: (() => void) | null = null
      • loadColor: TypeColor = ...

      Returns void

    • Add a uniform.

      Length 16 corresponds to a 4x4 matrix and can only be 'FLOAT_VECTOR' type.

      Parameters

      • uniformName: string

        The variable name used in the shader

      • length: 1 | 2 | 3 | 4 | 16 = 1

        (1) number of values in uniform

      • type: TypeGLUniform = 'FLOAT'

        type of value. Use '_VECTOR' suffix if using vector methods on the uniform in the shader ('FLOAT').

      • initialValue: number | number[] | null = null

        initial value to use for uniform - if null then uniform will be all 0 (null)

      Returns void