Class Index | File Index

Classes


Class HomeMaterial


Defined in: SweetHome3D.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
HomeMaterial(name, key, color, texture, shininess)
Creates a material instance from parameters.
Method Summary
Method Attributes Method Name and Description
 
Returns the color of this material.
 
Returns the key of this material.
 
Returns the name of this material.
 
Returns the shininess of this material.
 
Returns the texture of this material.
Class Detail
HomeMaterial(name, key, color, texture, shininess)
Creates a material instance from parameters.
Author: Emmanuel Puybaret.
Parameters:
{string} name
{string} key
{number} color
{HomeTexture} texture
{number} shininess
Method Detail
{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.

© Copyrights 2017 Emmanuel PUYBARET / eTeks
Distributed under GNU General Public License
Documentation generated by JsDoc Toolkit 2.4.0 on Wed Oct 25 2017 16:36:09 GMT+0200 (CEST)