Constructor
new ProgramLibrary()
Members
Array.<{data: null, ready: boolean, sources: Array.<string>}>
static cache
Put data in cache due to asynchrone loading
Array.<{data: string, ready: boolean}>
static chunks
Chunks in cache
number
static Target
Target
Properties:
Name | Type | Description |
---|---|---|
Vertex |
number | |
Fragment |
number |
Methods
static get(name) → {Program}
Get the program with the given name
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Program's name |
A Program instance, otherwise null is the program doesn't exist
async static loadFromFile(name, vertexShaderFile, fragmentShaderFile, definesopt) → (nullable) {Program}
Load a new program
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
name |
string | Program's name | |
vertexShaderFile |
string | Path to the vertex shader file | |
fragmentShaderFile |
string | Path to the fragment shader file | |
defines |
Array.<string> |
<optional> |
An array with defines data |
A Program instance