Question

I'm writing a deformer which modifies the position of a plane's vertices, using UVs as a completion ratio – so if the UV of a vertex is (.5,.5), it's in the center of the plane.

An image linked from (Three.js) Custom Mesh UV Display Texture Properly shows UVs starting in the top left:

enter image description here

But my deformer seems to be flipped vertically unless I treat the UVs as starting in the bottom left corner instead.

OpenGL ES has different UV coordinates? says OpenGL UVs start in the bottom-left corner, and http://answers.unity3d.com/questions/154324/how-do-uvs-work.html suggests it's this way in Unity too. Which does three.js use?

Extra Credit: I understand from Correct UV mapping Three.js that the answer is in planeGeometry.js somewhere – can anyone show where?

Was it helpful?

Solution

For THREE.PlaneGeometry, UV ( 0, 0 ) is located at the bottom left, and ( 1, 1 ) the top right.

three.js r.64

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top