Constructor
new L3D.Material()
Extends
Properties
If true, the object with this material will be included in shadow rendering.
- Overrides:
Get the filename of the asset.
- Overrides:
The unique identifier of the object. Changing a node's ID can have unintended consequences.
If true, objects with this material will not be skipped if they are not visible by the camera.
If true, the material will not calculate any lighting.
- Overrides:
Is the asset loaded?
- Overrides:
Is the asset loading?
- Overrides:
True if the asset does not have an error.
- Overrides:
The name of the object.
- Overrides:
Emitted when there was an error loaading the asset.
- Overrides:
Emitted when the asset has finished loading.
- Overrides:
Emitted when the asset has started loading.
- Overrides:
Fired when the object has been modified.
- Overrides:
Fired when the object's name changes.
- Overrides:
Emitted when the state of the asset has changed.
- Overrides:
Emitted when the assets data has been updated.
- Overrides:
The URL of the asset.
The public properties of the shader.
The RenderQueue to use.
If true, the material will evaluate shadow maps from lights.
The RenderState to apply when rendering this material.
The name of the shader used by this material.
The shader used by this material.
- Overrides:
Inidicates whether the asset is Unloaded, Loading, Loaded, or Error. The onStateChange signal will be emitted when the state's value changes.
If true, the material will not do any backface culling.
The shader uniforms set by this material.
If true, the material will recieve ambient light.
Methods
clone(options) → Object
- Overrides:
Creates a clone of this object.
options |
Object | Options for the clone method. |
- Object
configure(o)
- Overrides:
Load the material from a JSON object.
o |
Object |
destroy()
- Overrides:
Destroy any render assets created by the asset.
getPropertyInfo(path) → Object
- Overrides:
Get information about a particular property of this object.
path |
String |
- Object
getRenderAsset(gl) → RenderAsset
- Overrides:
Get a RenderAsset for this asset. If a RenderAsset hadn't been requested for the given GLContext yet, a new one will be created. Otherwise the previous one will be updated and returned.
A RenderAsset is the WebGL version of the asset, such as the GLTexture for an Texture asset. Because the editor has multiple GLContexts, RenderAssets are generated for each GLContext that requires it.
gl |
GLContext |
serialize() → Object
- Overrides:
Serialize this material to a JSON object
- Object
setModified()
- Overrides:
Fires the objects onModified signal.
setProperty(name, value, add)
Set a property value for the material. This will result in setting a uniform value on the associated shader.
name |
String | The name of the property. |
value |
* | The value to set the property to. |
add |
bool | Add the property if the property hasn't been found on the material, perhaps because the material is still loading. |
toJSON() → Object
- Overrides:
Serialize the object to a JSON structure
- Object
The serialized version of the object.
updateRenderAsset(renderAsset)
- Overrides:
Update the given RenderAsset.
renderAsset |
RenderAsset | The RenderAsset to update. |