mrdoob/three.js — Issue #667: Updating UVs
Author: florianf
Created: 2011-10-20 17:40:30+00:00
State: open

Hello,

I wanted to update UV coordinates on runtime on a plane. So I tried the following:

(Simple 2x2 PlaneGeometry with a texture on it and using MeshFaceMaterial)

mesh.geometry.faceVertexUvs[0][0] = [
new THREE.UV( 0,0 ),
new THREE.UV( 0,0.1 ),
new THREE.UV( 0.1, 0.1 ),
new THREE.UV( 0.1, 0 )
]

mesh.geometry.__dirtyUvs = true

Now I thought it would change the texture mapping, blurring the texture because one face only uses a tenth of the texture, but nothing happens.

When I change the UVs before adding the mesh it works perfectly.

Am I missing something?

Thx!