I have been using this style of code to generate UV coordinates for an ExtrudeGeometry
generateTopUV: function ( geometry, indexA, indexB, indexC ) {
var vertices = geometry.vertices;
var a = vertices[ indexA ];
var b = vertices[ indexB ];
var c = vertices[ indexC ];
return [
new THREE.Vector2( a.x * DESIGNER.scale, a.y * DESIGNER.scale),
new THREE.Vector2( b.x * DESIGNER.scale, b.y * DESIGNER.scale),
new THREE.Vector2( c.x * DESIGNER.scale, c.y * DESIGNER.scale)
];
},
The geometry has now switched to using Buffers and so this no longer works. When called the attributes list is empty so how do I get at a vertex list or is there a different technique?