Please help! I would like to modify figure of mesh for expressing movement like cloth waving. and I found fromVectors method to realize it . but this method occores an error .
please see following source code
var plane:Mesh = new Mesh(new PlaneGeometry(200, 200), new ColorMaterial( 0xffffff ) );
scene.addChild( plane );
var vertexData : Vector.<Number> = plane.geometry.subGeometries[0].vertexData;
var UVData : Vector.<Number> = plane.geometry.subGeometries[0].UVData;
var vertexNormalData : Vector.<Number> = plane.geometry.subGeometries[0].vertexNormalData;
var vertexTangentData : Vector.<Number> = plane.geometry.subGeometries[0].vertexTangentData;
//adjust vx position here
plane.geometry.subGeometries[0].fromVectors( vertexData, UVData, vertexNormalData, vertexTangentData);
the last command occored an error .
question:
1. Is it right to use fromVectors method to express like cloth waving ?
2. Is there any mistake in my source code ?