@@ -84,6 +84,46 @@ THREE.MeshPhongMaterial.prototype = Object.create( THREE.Material.prototype );
8484
8585THREE . MeshPhongMaterial . prototype . clone = function ( ) {
8686
87- return new THREE . MeshPhongMaterial ( this ) ;
87+ var material = new THREE . MeshPhongMaterial ( ) ;
88+
89+ THREE . Material . prototype . clone . call ( this , material ) ;
90+
91+ material . color . copy ( this . color ) ;
92+ material . ambient . copy ( this . ambient ) ;
93+ material . emissive . copy ( this . emissive ) ;
94+ material . specular . copy ( this . specular ) ;
95+ material . shininess = this . shininess ;
96+
97+ material . metal = this . metal ;
98+ material . perPixel = this . perPixel ;
99+
100+ material . wrapAround = this . wrapAround ;
101+ material . wrapRGB . copy ( this . wrapRGB ) ;
102+
103+ material . map = this . map ;
104+
105+ material . lightMap = this . lightMap ;
106+
107+ material . envMap = this . envMap ;
108+ material . combine = this . combine ;
109+ material . reflectivity = this . reflectivity ;
110+ material . refractionRatio = this . refractionRatio ;
111+
112+ material . fog = this . fog ;
113+
114+ material . shading = this . shading ;
115+
116+ material . wireframe = this . wireframe ;
117+ material . wireframeLinewidth = this . wireframeLinewidth ;
118+ material . wireframeLinecap = this . wireframeLinecap ;
119+ material . wireframeLinejoin = this . wireframeLinejoin ;
120+
121+ material . vertexColors = this . vertexColors ;
122+
123+ material . skinning = this . skinning ;
124+ material . morphTargets = this . morphTargets ;
125+ material . morphNormals = this . morphNormals ;
126+
127+ return material ;
88128
89129} ;
0 commit comments