Is there any way to convert directly float32array to array of vector3?
No. You have to iterate over your instance of Float32Array
and create an instance of Vector3
for three subsequent float entries.
1 Like
function ToVertices(geometry) {
const positions = geometry.attributes.position;
const vertices = [];
for (let index = 0; index < positions.count; index++) {
vertices.push(
new THREE.Vector3(
positions.getX(index),
positions.getY(index),
positions.getZ(index)
)
);
}
return vertices;
}