Constructor Summary
| Public Constructor | ||
| public |
|
|
Member Summary
| Public Members | ||
| public |
id: * |
|
| Private Members | ||
| private |
_defines: *[] |
|
| private |
_isValid: boolean |
|
| private |
_moduleNames: *[] |
|
| private |
_moduleNumId: number |
|
| private |
_modules: *[] |
|
| private |
_needsRecompile: boolean |
|
Method Summary
| Public Methods | ||
| public |
addModule(mod: shaderModule, sibling: shaderModule): * add a module |
|
| public |
define(name: String, value: Any) add a define to a shader, e.g. |
|
| public |
getAttributeSrc(mod: *, srcHeadVert: *, srcVert: *): {"srcHeadVert": *, "srcVert": *} |
|
| public |
getCurrentModules(): * |
|
| public |
getDefine(name: *): * |
|
| public |
getDefines(): * |
|
| public |
getNumModules(): * |
|
| public |
hasDefine(name: String): Boolean return true if shader has define |
|
| public |
hasModule(modId: *): boolean |
|
| public |
removeDefine(name: name) remove a define from a shader |
|
| public |
removeModule(mod: shaderModule) remove a module from shader |
|
| public |
|
|
| public |
setModules(names: *) |
|
| public |
toggleDefine(name: name, enabled: any) easily enable/disable a define without a value |
|
Public Constructors
public constructor() source
Public Members
public id: * source
Private Members
private _defines: *[] source
private _isValid: boolean source
private _moduleNames: *[] source
private _moduleNumId: number source
private _modules: *[] source
private _needsRecompile: boolean source
Public Methods
public addModule(mod: shaderModule, sibling: shaderModule): * source
add a module
Params:
| Name | Type | Attribute | Description |
| mod | shaderModule | the module to be added |
|
| sibling | shaderModule |
|
sibling module, new module will share the same group |
Return:
| * |
public define(name: String, value: Any) source
add a define to a shader, e.g. #define DO_THIS_THAT 1
Params:
| Name | Type | Attribute | Description |
| name | String | ||
| value | Any | (can be empty) |
public getAttributeSrc(mod: *, srcHeadVert: *, srcVert: *): {"srcHeadVert": *, "srcVert": *} source
Params:
| Name | Type | Attribute | Description |
| mod | * | ||
| srcHeadVert | * | ||
| srcVert | * |
Return:
| {"srcHeadVert": *, "srcVert": *} |
public hasDefine(name: String): Boolean source
return true if shader has define
Params:
| Name | Type | Attribute | Description |
| name | String |
Return:
| Boolean |
public hasModule(modId: *): boolean source
Params:
| Name | Type | Attribute | Description |
| modId | * |
Return:
| boolean |
public removeDefine(name: name) source
remove a define from a shader
Params:
| Name | Type | Attribute | Description |
| name | name |
public removeModule(mod: shaderModule) source
remove a module from shader
Params:
| Name | Type | Attribute | Description |
| mod | shaderModule | the module to be removed |
public replaceModuleSrc() source
public setModules(names: *) source
Params:
| Name | Type | Attribute | Description |
| names | * |