PbrSpecularMaterial
Contents
[
Hide
]PbrSpecularMaterial class
Material for physically based rendering based on diffuse color/specular/glossiness
Properties
| Name | Description |
|---|---|
| MAP_SPECULAR_GLOSSINESS | The texture map for specular glossiness |
Methods
constructor
| Name | Description |
|---|---|
| constructor() | Constructor of the PbrSpecularMaterial |
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 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 transparency factor. |
Result:
getNormalTexture
| Name | Description |
|---|---|
| getNormalTexture() | Gets or sets the texture of normal mapping |
Result:
setNormalTexture
| Name | Description |
|---|---|
| setNormalTexture(value) | Gets or sets the texture of normal mapping |
Result:
getSpecularGlossinessTexture
| Name | Description |
|---|---|
| getSpecularGlossinessTexture() | Gets or sets the texture for specular color, channel RGB stores the specular color and channel A stores the glossiness. |
Result:
setSpecularGlossinessTexture
| Name | Description |
|---|---|
| setSpecularGlossinessTexture(value) | Gets or sets the texture for specular color, channel RGB stores the specular color and channel A stores the glossiness. |
Result:
getGlossinessFactor
| Name | Description |
|---|---|
| getGlossinessFactor() | Gets or sets the glossiness(smoothness) of the material, 1 means perfectly smooth and 0 means perfectly rough, default value is 1, range is [0, 1] |
Result:
setGlossinessFactor
| Name | Description |
|---|---|
| setGlossinessFactor(value) | Gets or sets the glossiness(smoothness) of the material, 1 means perfectly smooth and 0 means perfectly rough, default value is 1, range is [0, 1] |
Result:
getSpecular
| Name | Description |
|---|---|
| getSpecular() | Gets or sets the specular color of the material, default value is (1, 1, 1). |
Result:
setSpecular
| Name | Description |
|---|---|
| setSpecular(value) | Gets or sets the specular color of the material, default value is (1, 1, 1). |
Result:
getDiffuseTexture
| Name | Description |
|---|---|
| getDiffuseTexture() | Gets or sets the texture for diffuse |
Result:
setDiffuseTexture
| Name | Description |
|---|---|
| setDiffuseTexture(value) | Gets or sets the texture for diffuse |
Result:
getDiffuse
| Name | Description |
|---|---|
| getDiffuse() | Gets or sets the diffuse color of the material, default value is (1, 1, 1) |
Result:
setDiffuse
| Name | Description |
|---|---|
| setDiffuse(value) | Gets or sets the diffuse color of the material, default value is (1, 1, 1) |
Result:
getEmissiveTexture
| Name | Description |
|---|---|
| getEmissiveTexture() | Gets or sets the texture for emissive |
Result:
setEmissiveTexture
| Name | Description |
|---|---|
| setEmissiveTexture(value) | Gets or sets the texture for emissive |
Result:
getEmissiveColor
| Name | Description |
|---|---|
| getEmissiveColor() | Gets or sets the emissive color, default value is (0, 0, 0) |
Result:
setEmissiveColor
| Name | Description |
|---|---|
| setEmissiveColor(value) | Gets or sets the emissive color, default value is (0, 0, 0) |
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