LambertMaterial
Contents
[
Hide
]LambertMaterial class
Material for lambert shading model
Methods
constructor
| Name | Description |
|---|---|
| constructor() | Initializes a new instance of the LambertMaterial class. |
Result:
constructor_overload
| Name | Description |
|---|---|
| constructor_overload(name) | Initializes a new instance of the LambertMaterial class. |
Parameters:
| Name | Type | Description |
|---|---|---|
| name | String | Name |
Result:
getEmissiveColor
| Name | Description |
|---|---|
| getEmissiveColor() | Gets or sets the emissive color |
Result:
setEmissiveColor
| Name | Description |
|---|---|
| setEmissiveColor(value) | Gets or sets the emissive color |
Result:
getAmbientColor
| Name | Description |
|---|---|
| getAmbientColor() | Gets or sets the ambient color The Example: var mat = new LambertMaterial(); mat.AmbientColor = new Vector3(1, 1, 1); ambient. |
Result:
setAmbientColor
| Name | Description |
|---|---|
| setAmbientColor(value) | Gets or sets the ambient color The Example: var mat = new LambertMaterial(); mat.AmbientColor = new Vector3(1, 1, 1); ambient. |
Result:
getDiffuseColor
| Name | Description |
|---|---|
| getDiffuseColor() | Gets or sets the diffuse color The Example: var mat = new LambertMaterial(); mat.DiffuseColor = new Vector3(1, 0, 0); diffuse. |
Result:
setDiffuseColor
| Name | Description |
|---|---|
| setDiffuseColor(value) | Gets or sets the diffuse color The Example: var mat = new LambertMaterial(); mat.DiffuseColor = new Vector3(1, 0, 0); diffuse. |
Result:
getTransparentColor
| Name | Description |
|---|---|
| getTransparentColor() | Gets or sets the transparent color. The Example: var mat = new LambertMaterial(); mat.TransparentColor = new Vector3(0.3, 0.5, 0.2); color of the transparent. |
Result:
setTransparentColor
| Name | Description |
|---|---|
| setTransparentColor(value) | Gets or sets the transparent color. The Example: var mat = new LambertMaterial(); mat.TransparentColor = new Vector3(0.3, 0.5, 0.2); color of the transparent. |
Result:
getTransparency
| Name | Description |
|---|---|
| getTransparency() | Gets or sets the transparency factor. The factor should be ranged between 0(0%, fully opaque) and 1(100%, fully transparent) Any invalid factor value will be clamped. The Example: var mat = new LambertMaterial(); mat.Transparency = 0.3; transparency factor. |
Result:
setTransparency
| Name | Description |
|---|---|
| setTransparency(value) | Gets or sets the transparency factor. The factor should be ranged between 0(0%, fully opaque) and 1(100%, fully transparent) Any invalid factor value will be clamped. The Example: var mat = new LambertMaterial(); mat.Transparency = 0.3; transparency factor. |
Result:
getName
| Name | Description |
|---|---|
| getName() | Gets or sets the name. The name. |
Result:
setName
| Name | Description |
|---|---|
| setName(value) | Gets or sets the name. The name. |
Result:
getProperties
| Name | Description |
|---|---|
| getProperties() | Gets the collection of all properties. |
Result:
getTexture
| Name | Description |
|---|---|
| getTexture(slotName) | Gets the texture from the specified slot, it can be material’s property name or shader’s parameter name |
Parameters:
| Name | Type | Description |
|---|---|---|
| slotName | String | Slot name. |
Result: TextureBase
setTexture
| Name | Description |
|---|---|
| setTexture(slotName, texture) | Sets the texture to specified slot |
Parameters:
| Name | Type | Description |
|---|---|---|
| slotName | String | Slot name. |
| texture | TextureBase | Texture. |
Result: TextureBase
toString
| Name | Description |
|---|---|
| toString() | Formats object to string |
Result: String
removeProperty
| Name | Description |
|---|---|
| removeProperty(property) | Removes a dynamic property. |
Parameters:
| Name | Type | Description |
|---|---|---|
| property | Property | Which property to remove |
Result: boolean
removeProperty
| Name | Description |
|---|---|
| removeProperty(property) | Remove the specified property identified by name |
Parameters:
| Name | Type | Description |
|---|---|---|
| propert | String | null |
Result: boolean
getProperty
| Name | Description |
|---|---|
| getProperty(property) | Get the value of specified property |
Parameters:
| Name | Type | Description |
|---|---|---|
| property | String | Property name |
Result: Object
setProperty
| Name | Description |
|---|---|
| setProperty(property, value) | Sets the value of specified property |
Parameters:
| Name | Type | Description |
|---|---|---|
| property | String | Property name |
| value | Object | The value of the property |
Result: Object
findProperty
| Name | Description |
|---|---|
| findProperty(propertyName) | Finds the property. It can be a dynamic property (Created by CreateDynamicProperty/SetProperty) or native property(Identified by its name) |
Parameters:
| Name | Type | Description |
|---|---|---|
| propertyName | String | Property name. |
Result: Property
iterator
| Name | Description |
|---|---|
| iterator() | Reserved for internal use. |
Result: Property