THREE.js uses flat arrat (not an array of arrays), so created getNeighborIndex()