If I have a BufferGeometry, I can easily assign its vertices using an array of type Float32Array
with the following code snippet:
geometry.setAttribute( 'position', new THREE.BufferAttribute( vertices, 3 ) );
However, is there a way to set the faces of the BufferGeometry in a similar manner but using an array of type Int32Array
? I'm looking for a method that doesn't involve manually pushing individual face instances like this:
geometry.faces.push(
new THREE.Face3(0, 3, 2),
new THREE.Face3(0, 1, 3),
new THREE.Face3(1, 7, 3),
new THREE.Face3(1, 5, 7),
...
);