    import Shader from 'f.lux/src/Shader.js'

public class | source

# Shader

Shaders implement the shadowing process by which the shadow state proxies the actual state. Each Property maintains a shader used for shadowing its associated state property.

The Shader#shadowProperty method is responsible for setting up the `Shadow` proxy for the state.

Shaders are setup through StateType instances associated with `Property` objects and there is rarely a need to directly interact with them.

#### See:

- Property
- StateType

## Static Method Summary

Static Public Methods
public static | addDefault(name: *, shader: *) |

## Constructor Summary

Public Constructor
public | constructor(property: *) |

## Member Summary

Public Members
public | [_automountAll]: * |
public | [_automount]: *[] |
public | [_autoshadow]: * |
public | [_elementShaderAutomount]: * |
public | [_elementShader]: * |
public | [_hasJitProperties]: * |
public | [_property]: * |
public | [_shaders]: {} |

## Method Summary

Public Methods
public | add(name: *, shader: *, automount: *): * |
public | addProperty(name: *, stateType: *) |
public | autoShader(): * |
public | autoShadow(): * |
public | automountAll(): boolean |
public | elementShader(): * |
public | get(name: *): * |
public | has(name: *): * |
public | isAutomount(name: *): boolean |
public | property(): * |
public | remove(name: *): * |
public | setAutomountAll(automount: *) |
public | setAutoshadow(value: *): * |
public | setElementShader(shader: *, automount: *): * |
public | setElementType(stateType: *): * |
public | shaderFor(name: *, state: *): * |
public | shadowProperty(time: *, name: *, parentState: *, parentImpl: *): * |
public | shadowUndefinedProperties(state: *, impl: *, define: *) |
public | shouldAutomount(): * |
public | stateType(): * |

## Static Public Methods

### public static addDefault(name: *, shader: *) source

#### Params:

Name | Type | Attribute | Description
name | * |  |
shader | * |  |

## Public Constructors

### public constructor(property: *) source

#### Params:

Name | Type | Attribute | Description
property | * |  |

## Public Members

### public [_automountAll]: * source

### public [_automount]: *[] source

### public [_autoshadow]: * source

### public [_elementShaderAutomount]: * source

### public [_elementShader]: * source

### public [_hasJitProperties]: * source

### public [_property]: * source

### public [_shaders]: {} source

## Public Methods

### public add(name: *, shader: *, automount: *): * source

#### Params:

Name | Type | Attribute | Description
name | * |  |
shader | * |  |
automount | * |  |

#### Return:

*

### public addProperty(name: *, stateType: *) source

#### Params:

Name | Type | Attribute | Description
name | * |  |
stateType | * |  |

### public autoShader(): * source

#### Return:

*

### public autoShadow(): * source

#### Return:

*

### public automountAll(): boolean source

#### Return:

boolean

### public elementShader(): * source

#### Return:

*

### public get(name: *): * source

#### Params:

Name | Type | Attribute | Description
name | * |  |

#### Return:

*

### public has(name: *): * source

#### Params:

Name | Type | Attribute | Description
name | * |  |

#### Return:

*

### public isAutomount(name: *): boolean source

#### Params:

Name | Type | Attribute | Description
name | * |  |

#### Return:

boolean

### public property(): * source

#### Return:

*

### public remove(name: *): * source

#### Params:

Name | Type | Attribute | Description
name | * |  |

#### Return:

*

### public setAutomountAll(automount: *) source

#### Params:

Name | Type | Attribute | Description
automount | * |  |

### public setAutoshadow(value: *): * source

#### Params:

Name | Type | Attribute | Description
value | * |  |

#### Return:

*

### public setElementShader(shader: *, automount: *): * source

#### Params:

Name | Type | Attribute | Description
shader | * |  |
automount | * |  |

#### Return:

*

### public setElementType(stateType: *): * source

#### Params:

Name | Type | Attribute | Description
stateType | * |  |

#### Return:

*

### public shaderFor(name: *, state: *): * source

#### Params:

Name | Type | Attribute | Description
name | * |  |
state | * |  |

#### Return:

*

### public shadowProperty(time: *, name: *, parentState: *, parentImpl: *): * source

#### Params:

Name | Type | Attribute | Description
time | * |  |
name | * |  |
parentState | * |  |
parentImpl | * |  |

#### Return:

*

### public shadowUndefinedProperties(state: *, impl: *, define: *) source

#### Params:

Name | Type | Attribute | Description
state | * |  |
impl | * |  |
define | * |  |

### public shouldAutomount(): * source

#### Return:

*

### public stateType(): * source

#### Return:

*