I\'ve been using the fromGeometry method to make BufferGeometry objects from regular Geometry objects, and I\'ve found that it seems the number of vertices increases during the
The best way to find out the answer to these questions is just to look at the three.js code. It is very accessible and generally easy to follow.
First we can look up the BufferGeometry.fromGeometry method:
fromGeometry: function ( geometry ) {
geometry.__directGeometry = new THREE.DirectGeometry().fromGeometry( geometry );
return this.fromDirectGeometry( geometry.__directGeometry );
}
Which you can see is calling DirectGeometry.fromGeometry
fromGeometry: function ( geometry ) {
// ...
var vertices = geometry.vertices;
// ...
for ( var i = 0; i < faces.length; i ++ ) {
// ...
this.vertices.push( vertices[ face.a ], vertices[ face.b ], vertices[ face.c ] );
// ...
}
// ...
}
And here you can clearly see that it is adding additional vertices that come from the geometry faces property. The answer by gaitat gives a great example as to why that is!