mrdoob / three.js

JavaScript 3D Library.
https://threejs.org/
MIT License
99.63k stars 35.16k forks source link

Rotating a texture #829

Closed Tobiasartz closed 12 years ago

Tobiasartz commented 12 years ago

I'm creating a cube with different materials on each side. Lets say the front and the back of the cube (from the viewers side) have a texture. Now when I flip the cube the back's texture is upside down. Is there any way I can rotate the back texture? Or maybe even rotate the material (which I doubt is possible). Thanks :)

mrdoob commented 12 years ago

You could either modify the UVs, or rotate the texture using HTML5's Canvas.

Tobiasartz commented 12 years ago

Thanks! Forgot all about this question... Thanks for your answer though :) Sorry i didn't close this...