Skip to content

Commit

Permalink
fix: UV Translation was ignored in FBXLoader.js (#23834)
Browse files Browse the repository at this point in the history
  • Loading branch information
hybridherbst authored Apr 4, 2022
1 parent a5b5cb8 commit dded976
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions examples/js/loaders/FBXLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
9 changes: 9 additions & 0 deletions examples/jsm/loaders/FBXLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

}
Expand Down

0 comments on commit dded976

Please sign in to comment.