LambertMaterial

LambertMaterial class

Material for lambert shading model

Methods

constructor

NameDescription
constructor()Initializes a new instance of the LambertMaterial class.

Result:


constructor_overload

NameDescription
constructor_overload(name)Initializes a new instance of the LambertMaterial class.

Parameters:

NameTypeDescription
nameStringName

Result:


getEmissiveColor

NameDescription
getEmissiveColor()Gets or sets the emissive color

Result:


setEmissiveColor

NameDescription
setEmissiveColor(value)Gets or sets the emissive color

Result:


getAmbientColor

NameDescription
getAmbientColor()Gets or sets the ambient color The Example: var mat = new LambertMaterial(); mat.AmbientColor = new Vector3(1, 1, 1); ambient.

Result:


setAmbientColor

NameDescription
setAmbientColor(value)Gets or sets the ambient color The Example: var mat = new LambertMaterial(); mat.AmbientColor = new Vector3(1, 1, 1); ambient.

Result:


getDiffuseColor

NameDescription
getDiffuseColor()Gets or sets the diffuse color The Example: var mat = new LambertMaterial(); mat.DiffuseColor = new Vector3(1, 0, 0); diffuse.

Result:


setDiffuseColor

NameDescription
setDiffuseColor(value)Gets or sets the diffuse color The Example: var mat = new LambertMaterial(); mat.DiffuseColor = new Vector3(1, 0, 0); diffuse.

Result:


getTransparentColor

NameDescription
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

NameDescription
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

NameDescription
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

NameDescription
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

NameDescription
getName()Gets or sets the name. The name.

Result:


setName

NameDescription
setName(value)Gets or sets the name. The name.

Result:


getProperties

NameDescription
getProperties()Gets the collection of all properties.

Result:


getTexture

NameDescription
getTexture(slotName)Gets the texture from the specified slot, it can be material’s property name or shader’s parameter name

Parameters:

NameTypeDescription
slotNameStringSlot name.

Result: TextureBase


setTexture

NameDescription
setTexture(slotName, texture)Sets the texture to specified slot

Parameters:

NameTypeDescription
slotNameStringSlot name.
textureTextureBaseTexture.

Result: TextureBase


toString

NameDescription
toString()Formats object to string

Result: String


removeProperty

NameDescription
removeProperty(property)Removes a dynamic property.

Parameters:

NameTypeDescription
propertyPropertyWhich property to remove

Result: boolean


removeProperty

NameDescription
removeProperty(property)Remove the specified property identified by name

Parameters:

NameTypeDescription
propertStringnull

Result: boolean


getProperty

NameDescription
getProperty(property)Get the value of specified property

Parameters:

NameTypeDescription
propertyStringProperty name

Result: Object


setProperty

NameDescription
setProperty(property, value)Sets the value of specified property

Parameters:

NameTypeDescription
propertyStringProperty name
valueObjectThe value of the property

Result: Object


findProperty

NameDescription
findProperty(propertyName)Finds the property. It can be a dynamic property (Created by CreateDynamicProperty/SetProperty) or native property(Identified by its name)

Parameters:

NameTypeDescription
propertyNameStringProperty name.

Result: Property


iterator

NameDescription
iterator()Reserved for internal use.

Result: Property