PIXI.Shader

class Shader

A helper class for shaders.

Constructor


new PIXI.Shader(program: PIXI.Program, uniforms: Dict) → {}
Parameters:
Name Type Attributes Description
program PIXI.Program

The program the shader will use.

uniforms Dict<any>

<optional>

Custom uniforms to use to augment the built-in ones.

Summary


Properties from Shader

PIXI.Program
program

Program that the shader uses.

Dict<any>
uniforms

Public Properties


program Shader.ts:12
program: PIXI.Program

Program that the shader uses.

uniforms Shader.ts:80
uniforms: Dict

Shader uniform values, shortcut for uniformGroup.uniforms.

Public Methods


from Shader.ts:89
static from(vertexSrc: string, fragmentSrc: string, uniforms: Dict) → {PIXI.Shader}

A short hand function to create a shader based of a vertex and fragment shader.

Parameters:
Name Type Attributes Description
vertexSrc string

<optional>

The source of the vertex shader.

fragmentSrc string

<optional>

The source of the fragment shader.

uniforms Dict<any>

<optional>

Custom uniforms to use to augment the built-in ones.

Returns:
Type Description
PIXI.Shader

A shiny new PixiJS shader!


Powered by webdoc!