Created
May 19, 2013 17:08
-
-
Save kishalmi/5608286 to your computer and use it in GitHub Desktop.
invert UV.x of three.js geometry
(if for example watching a textured sphere from the inside)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// invert U coordinate | |
for( var li in geometry.faceVertexUvs ) | |
for( var fi in geometry.faceVertexUvs[li] ) | |
for( var vi in geometry.faceVertexUvs[li][fi] ) | |
geometry.faceVertexUvs[li][fi][vi].x = 1.0 - geometry.faceVertexUvs[li][fi][vi].x; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment