1

I am beginner in 3d manipulation and in Three.js. I need to understand how to get vertices coordinates updated after I move a geometry. I tried to write this code below but it returns me the original coordinates and not those updated to the new position.

for(var j=0 ; j<geometryContainer.length ; j++) {               
    for (var i=0 ; i<geometryContainer[j].geometry.vertices.length ; i++){
        console.log(geometryContainer[j].geometry.vertices[i].x,// vertices coordinates do not update to new position
        geometryContainer[j].geometry.vertices[i].y,
        geometryContainer[j].geometry.vertices[i].z);
        console.log(geometryContainer[0].geometry.vertices[0].x);
    }
}
Mouloud85
  • 3,826
  • 5
  • 22
  • 42
stefano
  • 123
  • 1
  • 14

1 Answers1

1

you might take a look at the verticesNeedUpdate methode on the Geometry Object. You might also need to update normals / face normals

Threejs geometry

Daniel E.
  • 206
  • 1
  • 2
  • 7