PIXI.Program
class Program
Helper class to create a shader program.
Constructor
new PIXI.Program(vertexSrc: string, fragmentSrc: string, name: string) → {}
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
| vertexSrc | string |
<optional> |
The source of the vertex shader. |
|
| fragmentSrc | string |
<optional> |
The source of the fragment shader. |
|
| name | string | 'pixi-shader' |
Name for shader |
Summary
Properties from Program
| string |
|
| string |
|
| { [key: string]: IAttributeData } |
Assigned when a program is first bound to the shader system. |
| string |
Source code for the fragment shader. |
| { [key: string]: IUniformData } |
Assigned when a program is first bound to the shader system. |
| string |
Source code for the vertex shader. |
Methods from Program
| PIXI.Program |
A short hand function to create a program based of a vertex and fragment shader. |
Public Properties
static defaultFragmentSrc: string
The default fragment shader source.
attributeData: { [key: string]: IAttributeData }
Assigned when a program is first bound to the shader system.
uniformData: { [key: string]: IUniformData }
Assigned when a program is first bound to the shader system.
Public Methods
static from(vertexSrc: string, fragmentSrc: string, name: string) → {PIXI.Program}
A short hand function to create a program based of a vertex and fragment shader.
This method will also check to see if there is a cached program.
| Name | Type | Attributes | Description |
|---|---|---|---|
| vertexSrc | string |
<optional> |
The source of the vertex shader. |
| fragmentSrc | string |
<optional> |
The source of the fragment shader. |
| name | string |
<optional> |
Name for shader |
| Type | Description |
|---|---|
| PIXI.Program |
A shiny new PixiJS shader program! |