From fede58fcaf8b1cdb221b33a5ea9268243e599779 Mon Sep 17 00:00:00 2001 From: Felix Herbst Date: Sat, 2 Apr 2022 20:00:25 +0200 Subject: [PATCH] fix: UV Translation was ignored in FBXLoader.js --- examples/js/loaders/FBXLoader.js | 9 +++++++++ examples/jsm/loaders/FBXLoader.js | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/examples/js/loaders/FBXLoader.js b/examples/js/loaders/FBXLoader.js index 14dd5e29129f90..e80a0eab401784 100644 --- a/examples/js/loaders/FBXLoader.js +++ b/examples/js/loaders/FBXLoader.js @@ -325,6 +325,15 @@ 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; diff --git a/examples/jsm/loaders/FBXLoader.js b/examples/jsm/loaders/FBXLoader.js index 703698fcae0657..d6a3d5eb4dd664 100644 --- a/examples/jsm/loaders/FBXLoader.js +++ b/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; }