فهرست منبع

fix: UV Translation was ignored in FBXLoader.js (#23834)

hybridherbst 3 سال پیش
والد
کامیت
dded976092
2فایلهای تغییر یافته به همراه18 افزوده شده و 0 حذف شده
  1. 9 0
      examples/js/loaders/FBXLoader.js
  2. 9 0
      examples/jsm/loaders/FBXLoader.js

+ 9 - 0
examples/js/loaders/FBXLoader.js

@@ -325,6 +325,15 @@
 				texture.repeat.y = values[ 1 ];
 				texture.repeat.y = values[ 1 ];
 
 
 			}
 			}
+			
+			if ( 'Translation' in textureNode ) {
+
+				const values = textureNode.Translation.value;
+
+				texture.offset.x = values[ 0 ];
+				texture.offset.y = values[ 1 ];
+
+			}
 
 
 			return texture;
 			return texture;
 
 

+ 9 - 0
examples/jsm/loaders/FBXLoader.js

@@ -389,6 +389,15 @@ class FBXTreeParser {
 
 
 		}
 		}
 
 
+		if ( 'Translation' in textureNode ) {
+
+			const values = textureNode.Translation.value;
+
+			texture.offset.x = values[ 0 ];
+			texture.offset.y = values[ 1 ];
+
+		}
+
 		return texture;
 		return texture;
 
 
 	}
 	}