فهرست منبع

fix clonedMaterial: specular color & emissive color

but0n 6 سال پیش
والد
کامیت
7df1c468e0
1فایلهای تغییر یافته به همراه13 افزوده شده و 1 حذف شده
  1. 13 1
      examples/js/loaders/GLTFLoader.js

+ 13 - 1
examples/js/loaders/GLTFLoader.js

@@ -845,12 +845,24 @@ THREE.GLTFLoader = ( function () {
 
 				}
 
-				if ( source.color != undefined ) {
+				if ( source.color ) {
 
 					target.color = source.color.clone();
 
 				}
 
+				if ( source.specular ) {
+
+					target.specular = source.specular.clone();
+
+				}
+
+				if ( source.emissive ) {
+
+					target.emissive = source.emissive.clone();
+
+				}
+
 				return target;
 
 			},