提交 c090602a 编写于 作者: M Mr.doob

Merge branch 'dev' of https://github.com/sunag/three.js into dev

Conflicts:
	src/materials/MeshPhongMaterial.js
......@@ -13,7 +13,6 @@ THREE.DirectGeometry = function () {
this.indices = [];
this.vertices = [];
this.colors = [];
this.normals = [];
this.colors = [];
this.uvs = [];
......
......@@ -112,59 +112,64 @@ THREE.MeshPhongMaterial = function ( parameters ) {
THREE.MeshPhongMaterial.prototype = Object.create( THREE.Material.prototype );
THREE.MeshPhongMaterial.prototype.constructor = THREE.MeshPhongMaterial;
THREE.MeshPhongMaterial.prototype.clone = function () {
THREE.MeshPhongMaterial.prototype.copy = function ( source ) {
var material = new THREE.MeshPhongMaterial();
THREE.Material.prototype.copy.call( this, source );
material.copy( this );
this.color.copy( source.color );
this.emissive.copy( source.emissive );
this.specular.copy( source.specular );
this.shininess = source.shininess;
material.color.copy( this.color );
material.emissive.copy( this.emissive );
material.specular.copy( this.specular );
material.shininess = this.shininess;
this.metal = source.metal;
material.metal = this.metal;
this.map = source.map;
material.map = this.map;
this.lightMap = source.lightMap;
this.lightMapIntensity = source.lightMapIntensity;
material.lightMap = this.lightMap;
material.lightMapIntensity = this.lightMapIntensity;
this.aoMap = source.aoMap;
this.aoMapIntensity = source.aoMapIntensity;
material.aoMap = this.aoMap;
material.aoMapIntensity = this.aoMapIntensity;
this.emissiveMap = source.emissiveMap;
material.emissiveMap = this.emissiveMap;
this.bumpMap = source.bumpMap;
this.bumpScale = source.bumpScale;
material.bumpMap = this.bumpMap;
material.bumpScale = this.bumpScale;
this.normalMap = source.normalMap;
this.normalScale.copy( source.normalScale );
material.normalMap = this.normalMap;
material.normalScale.copy( this.normalScale );
this.specularMap = source.specularMap;
material.specularMap = this.specularMap;
this.alphaMap = source.alphaMap;
material.alphaMap = this.alphaMap;
this.envMap = source.envMap;
this.combine = source.combine;
this.reflectivity = source.reflectivity;
this.refractionRatio = source.refractionRatio;
material.envMap = this.envMap;
material.combine = this.combine;
material.reflectivity = this.reflectivity;
material.refractionRatio = this.refractionRatio;
this.fog = source.fog;
material.fog = this.fog;
this.shading = source.shading;
material.shading = this.shading;
this.wireframe = source.wireframe;
this.wireframeLinewidth = source.wireframeLinewidth;
this.wireframeLinecap = source.wireframeLinecap;
this.wireframeLinejoin = source.wireframeLinejoin;
material.wireframe = this.wireframe;
material.wireframeLinewidth = this.wireframeLinewidth;
material.wireframeLinecap = this.wireframeLinecap;
material.wireframeLinejoin = this.wireframeLinejoin;
this.vertexColors = source.vertexColors;
material.vertexColors = this.vertexColors;
this.skinning = source.skinning;
this.morphTargets = source.morphTargets;
this.morphNormals = source.morphNormals;
material.skinning = this.skinning;
material.morphTargets = this.morphTargets;
material.morphNormals = this.morphNormals;
return this;
};
return material;
THREE.MeshPhongMaterial.prototype.clone = function () {
var material = new THREE.MeshPhongMaterial();
return material.copy( this );
};
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册