obj2gltf/lib/Material.js

28 lines
1013 B
JavaScript
Raw Normal View History

2017-04-10 17:57:56 -04:00
'use strict';
module.exports = Material;
2017-05-04 17:58:13 -04:00
/**
* A material definition which maps to the .mtl format.
*
* The default value for specularShininess varies depending on the material type, @see loadMtl.
*
* @private
*/
2017-04-10 17:57:56 -04:00
function Material() {
this.name = '';
2017-04-10 17:57:56 -04:00
this.ambientColor = [0.0, 0.0, 0.0, 1.0]; // Ka
2017-04-18 11:56:08 -04:00
this.emissiveColor = [0.0, 0.0, 0.0, 1.0]; // Ke
2017-04-10 17:57:56 -04:00
this.diffuseColor = [0.5, 0.5, 0.5, 1.0]; // Kd
this.specularColor = [0.0, 0.0, 0.0, 1.0]; // Ks
this.specularShininess = 0.0; // Ns
this.alpha = 1.0; // d / Tr
this.ambientTexture = undefined; // map_Ka
2017-04-18 11:56:08 -04:00
this.emissiveTexture = undefined; // map_Ke
2017-04-10 17:57:56 -04:00
this.diffuseTexture = undefined; // map_Kd
this.specularTexture = undefined; // map_Ks
2017-04-18 11:56:08 -04:00
this.specularShininessTexture = undefined; // map_Ns
this.normalTexture = undefined; // map_Bump
this.alphaTexture = undefined; // map_d
2017-04-10 17:57:56 -04:00
}