mrdoob/three.js — Issue #957: Dynamically changed shape's vertex not working?
Author: georgeou2003
Created: 2011-12-23 02:16:05+00:00
State: open

I have a model loaded with jsonloader, and add the mesh to scene using the callback function

function addCube( p, g) {

var materials = [
new THREE.MeshLambertMaterial( { color: 0xffffff, shading: THREE.FlatShading, vertexColors: THREE.VertexColors } ),
new THREE.MeshBasicMaterial( { color: 0x000000, shading: THREE.FlatShading, wireframe: true, transparent: true } )];

mesh = new THREE.Mesh( g, materials );

mesh.position = p;
scene.addObject( mesh );
};

However, when I try to dynamically changed the mesh 's vertex position, it seems to fail to reach the geometry of the mesh, the shape of the mesh is not affected at all even if I set the .__dirtyVertices to be true;

for(i=0;i