/** * @author mrdoob / http://mrdoob.com/ * @author alteredq / http://alteredqualia.com/ * * parameters = { * color: , * emissive: , * opacity: , * * map: new THREE.Texture( ), * * specularMap: new THREE.Texture( ), * * alphaMap: new THREE.Texture( ), * * envMap: new THREE.TextureCube( [posx, negx, posy, negy, posz, negz] ), * combine: THREE.Multiply, * reflectivity: , * refractionRatio: , * * shading: THREE.SmoothShading, * blending: THREE.NormalBlending, * depthTest: , * depthWrite: , * * wireframe: , * wireframeLinewidth: , * * vertexColors: THREE.NoColors / THREE.VertexColors / THREE.FaceColors, * * skinning: , * morphTargets: , * morphNormals: , * * fog: * } */ THREE.MeshLambertMaterial = function ( parameters ) { THREE.Material.call( this ); this.type = 'MeshLambertMaterial'; this.color = new THREE.Color( 0xffffff ); // diffuse this.emissive = new THREE.Color( 0x000000 ); this.map = null; this.specularMap = null; this.alphaMap = null; this.envMap = null; this.combine = THREE.MultiplyOperation; this.reflectivity = 1; this.refractionRatio = 0.98; this.fog = true; this.shading = THREE.SmoothShading; this.wireframe = false; this.wireframeLinewidth = 1; this.wireframeLinecap = 'round'; this.wireframeLinejoin = 'round'; this.vertexColors = THREE.NoColors; this.skinning = false; this.morphTargets = false; this.morphNormals = false; this.setValues( parameters ); }; THREE.MeshLambertMaterial.prototype = Object.create( THREE.Material.prototype ); THREE.MeshLambertMaterial.prototype.constructor = THREE.MeshLambertMaterial; THREE.MeshLambertMaterial.prototype.clone = function () { var material = new THREE.MeshLambertMaterial(); THREE.Material.prototype._copyFrom.call( material, this ); material.color.copy( this.color ); material.emissive.copy( this.emissive ); material.map = this.map; material.specularMap = this.specularMap; material.alphaMap = this.alphaMap; material.envMap = this.envMap; material.combine = this.combine; material.reflectivity = this.reflectivity; material.refractionRatio = this.refractionRatio; material.fog = this.fog; material.shading = this.shading; material.wireframe = this.wireframe; material.wireframeLinewidth = this.wireframeLinewidth; material.wireframeLinecap = this.wireframeLinecap; material.wireframeLinejoin = this.wireframeLinejoin; material.vertexColors = this.vertexColors; material.skinning = this.skinning; material.morphTargets = this.morphTargets; material.morphNormals = this.morphNormals; return material; };