API

Interface IPipelineContext

Class used to store and describe the pipeline context associated with an effect

interface IPipelineContext {
    isAsync: boolean;
    isReady: boolean;
    dispose(): void;
    setArray(uniformName: string, array: FloatArray): void;
    setArray2(uniformName: string, array: FloatArray): void;
    setArray3(uniformName: string, array: FloatArray): void;
    setArray4(uniformName: string, array: FloatArray): void;
    setColor3(uniformName: string, color3: IColor3Like): void;
    setColor4(uniformName: string, color3: IColor3Like, alpha: number): void;
    setDirectColor4(uniformName: string, color4: IColor4Like): void;
    setEngine<T extends AbstractEngine>(engine: T): void;
    setFloat(uniformName: string, value: number): void;
    setFloat2(uniformName: string, x: number, y: number): void;
    setFloat3(uniformName: string, x: number, y: number, z: number): void;
    setFloat4(
        uniformName: string,
        x: number,
        y: number,
        z: number,
        w: number,
    ): void;
    setInt(uniformName: string, value: number): void;
    setInt2(uniformName: string, x: number, y: number): void;
    setInt3(uniformName: string, x: number, y: number, z: number): void;
    setInt4(
        uniformName: string,
        x: number,
        y: number,
        z: number,
        w: number,
    ): void;
    setIntArray(uniformName: string, array: Int32Array): void;
    setIntArray2(uniformName: string, array: Int32Array): void;
    setIntArray3(uniformName: string, array: Int32Array): void;
    setIntArray4(uniformName: string, array: Int32Array): void;
    setMatrices(uniformName: string, matrices: Float32Array): void;
    setMatrix(uniformName: string, matrix: IMatrixLike): void;
    setMatrix2x2(uniformName: string, matrix: Float32Array): void;
    setMatrix3x3(uniformName: string, matrix: Float32Array): void;
    setQuaternion(uniformName: string, quaternion: IQuaternionLike): void;
    setUInt(uniformName: string, value: number): void;
    setUInt2(uniformName: string, x: number, y: number): void;
    setUInt3(uniformName: string, x: number, y: number, z: number): void;
    setUInt4(
        uniformName: string,
        x: number,
        y: number,
        z: number,
        w: number,
    ): void;
    setUIntArray(uniformName: string, array: Uint32Array): void;
    setUIntArray2(uniformName: string, array: Uint32Array): void;
    setUIntArray3(uniformName: string, array: Uint32Array): void;
    setUIntArray4(uniformName: string, array: Uint32Array): void;
    setVector2(uniformName: string, vector2: IVector2Like): void;
    setVector3(uniformName: string, vector3: IVector3Like): void;
    setVector4(uniformName: string, vector4: IVector4Like): void;
}
Index
isAsync: boolean

Gets a boolean indicating that this pipeline context is supporting asynchronous creating

isReady: boolean

Gets a boolean indicating that the context is ready to be used (like shaders / pipelines are compiled and ready for instance)

  • Sets an array 4 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6,7,8] will result in [[1,2,3,4],[5,6,7,8]] in the shader)

    Parameters

    • uniformName: string

      Name of the variable.

    • array: FloatArray

      array to be set.

    Returns void

  • Sets a Color4 on a uniform variable.

    Parameters

    • uniformName: string

      Name of the variable.

    • color3: IColor3Like

      Value to be set.

    • alpha: number

      Alpha value to be set.

    Returns void

  • Sets a Color4 on a uniform variable

    Parameters

    • uniformName: string

      defines the name of the variable

    • color4: IColor4Like

      defines the value to be set

    Returns void

  • Sets a float2 on a uniform variable.

    Parameters

    • uniformName: string

      Name of the variable.

    • x: number

      First float in float2.

    • y: number

      Second float in float2.

    Returns void

  • Sets a float3 on a uniform variable.

    Parameters

    • uniformName: string

      Name of the variable.

    • x: number

      First float in float3.

    • y: number

      Second float in float3.

    • z: number

      Third float in float3.

    Returns void

  • Sets a float4 on a uniform variable.

    Parameters

    • uniformName: string

      Name of the variable.

    • x: number

      First float in float4.

    • y: number

      Second float in float4.

    • z: number

      Third float in float4.

    • w: number

      Fourth float in float4.

    Returns void

  • Sets an int2 value on a uniform variable.

    Parameters

    • uniformName: string

      Name of the variable.

    • x: number

      First int in int2.

    • y: number

      Second int in int2.

    Returns void

  • Sets an int3 value on a uniform variable.

    Parameters

    • uniformName: string

      Name of the variable.

    • x: number

      First int in int3.

    • y: number

      Second int in int3.

    • z: number

      Third int in int3.

    Returns void

  • Sets an int4 value on a uniform variable.

    Parameters

    • uniformName: string

      Name of the variable.

    • x: number

      First int in int4.

    • y: number

      Second int in int4.

    • z: number

      Third int in int4.

    • w: number

      Fourth int in int4.

    Returns void

  • Sets an int array on a uniform variable.

    Parameters

    • uniformName: string

      Name of the variable.

    • array: Int32Array

      array to be set.

    Returns void

  • Sets an int array 2 on a uniform variable. (Array is specified as single array eg. [1,2,3,4] will result in [[1,2],[3,4]] in the shader)

    Parameters

    • uniformName: string

      Name of the variable.

    • array: Int32Array

      array to be set.

    Returns void

  • Sets an int array 3 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6] will result in [[1,2,3],[4,5,6]] in the shader)

    Parameters

    • uniformName: string

      Name of the variable.

    • array: Int32Array

      array to be set.

    Returns void

  • Sets an int array 4 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6,7,8] will result in [[1,2,3,4],[5,6,7,8]] in the shader)

    Parameters

    • uniformName: string

      Name of the variable.

    • array: Int32Array

      array to be set.

    Returns void

  • Sets matrices on a uniform variable.

    Parameters

    • uniformName: string

      Name of the variable.

    • matrices: Float32Array

      matrices to be set.

    Returns void

  • Sets a 2x2 matrix on a uniform variable. (Specified as [1,2,3,4] will result in [1,2][3,4] matrix)

    Parameters

    • uniformName: string

      Name of the variable.

    • matrix: Float32Array

      matrix to be set.

    Returns void

  • Sets a 3x3 matrix on a uniform variable. (Specified as [1,2,3,4,5,6,7,8,9] will result in [1,2,3][4,5,6][7,8,9] matrix)

    Parameters

    • uniformName: string

      Name of the variable.

    • matrix: Float32Array

      matrix to be set.

    Returns void

  • Sets a Quaternion on a uniform variable.

    Parameters

    • uniformName: string

      Name of the variable.

    • quaternion: IQuaternionLike

      Value to be set.

    Returns void

  • Sets an unsigned integer value on a uniform variable.

    Parameters

    • uniformName: string

      Name of the variable.

    • value: number

      Value to be set.

    Returns void

  • Sets an unsigned int2 value on a uniform variable.

    Parameters

    • uniformName: string

      Name of the variable.

    • x: number

      First unsigned int in uint2.

    • y: number

      Second unsigned int in uint2.

    Returns void

  • Sets an unsigned int3 value on a uniform variable.

    Parameters

    • uniformName: string

      Name of the variable.

    • x: number

      First unsigned int in uint3.

    • y: number

      Second unsigned int in uint3.

    • z: number

      Third unsigned int in uint3.

    Returns void

  • Sets an unsigned int4 value on a uniform variable.

    Parameters

    • uniformName: string

      Name of the variable.

    • x: number

      First unsigned int in uint4.

    • y: number

      Second unsigned int in uint4.

    • z: number

      Third unsigned int in uint4.

    • w: number

      Fourth unsigned int in uint4.

    Returns void

  • Sets an unsigned int array on a uniform variable.

    Parameters

    • uniformName: string

      Name of the variable.

    • array: Uint32Array

      array to be set.

    Returns void

  • Sets an unsigned int array 2 on a uniform variable. (Array is specified as single array eg. [1,2,3,4] will result in [[1,2],[3,4]] in the shader)

    Parameters

    • uniformName: string

      Name of the variable.

    • array: Uint32Array

      array to be set.

    Returns void

  • Sets an unsigned int array 3 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6] will result in [[1,2,3],[4,5,6]] in the shader)

    Parameters

    • uniformName: string

      Name of the variable.

    • array: Uint32Array

      array to be set.

    Returns void

  • Sets an unsigned int array 4 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6,7,8] will result in [[1,2,3,4],[5,6,7,8]] in the shader)

    Parameters

    • uniformName: string

      Name of the variable.

    • array: Uint32Array

      array to be set.

    Returns void

  • Sets a Vector2 on a uniform variable.

    Parameters

    • uniformName: string

      Name of the variable.

    • vector2: IVector2Like

      vector2 to be set.

    Returns void

  • Sets a Vector3 on a uniform variable.

    Parameters

    • uniformName: string

      Name of the variable.

    • vector3: IVector3Like

      Value to be set.

    Returns void

  • Sets a Vector4 on a uniform variable.

    Parameters

    • uniformName: string

      Name of the variable.

    • vector4: IVector4Like

      Value to be set.

    Returns void