Class HomeMaterial
Defined in: SweetHome3D.js.
Constructor Attributes | Constructor Name and Description |
---|---|
HomeMaterial(name, key, color, texture, shininess)
Creates a material instance from parameters.
|
Method Attributes | Method Name and Description |
---|---|
equals(object)
Returns
true if this material is equal to object . |
|
getColor()
Returns the color of this material.
|
|
getKey()
Returns the key of this material.
|
|
getName()
Returns the name of this material.
|
|
Returns the shininess of this material.
|
|
Returns the texture of this material.
|
|
hashCode()
Returns a hash code for this material.
|
Class Detail
HomeMaterial(name, key, color, texture, shininess)
Creates a material instance from parameters.
Author: Emmanuel Puybaret.
Author: Emmanuel Puybaret.
- Parameters:
- {string} name
- {string} key
- {number} color
- {HomeTexture} texture
- {number} shininess
Method Detail
{boolean}
equals(object)
Returns
true
if this material is equal to object
.
- Parameters:
- {Object} object
- Returns:
- {boolean}
{number}
getColor()
Returns the color of this material.
- Returns:
- {number} the color of the material as RGB code or
null
if material color is unchanged.
{string}
getKey()
Returns the key of this material. If not
null
, this key should be used
as the unique identifier to find this material among the ones available on a model,
rather than the name of this material.
- Returns:
- {string} the key of the material or
null
if material has no key.
{string}
getName()
Returns the name of this material.
- Returns:
- {string} the name of the material or
null
if material has no name.
{number}
getShininess()
Returns the shininess of this material.
- Returns:
- {number} a value between 0 (matt) and 1 (very shiny) or
null
if material shininess is unchanged.
{HomeTexture}
getTexture()
Returns the texture of this material.
- Returns:
- {HomeTexture} the texture of the material or
null
if material texture is unchanged.
{number}
hashCode()
Returns a hash code for this material.
- Returns:
- {number}