Minimize memory usage and time of compute by using THREE.BufferGeometry