docs: function copyFlatRing(target, targetStartIndex, positions, size, srcStartIndex = 0, srcEndIndex) {
    srcEndIndex = srcEndIndex || positions.length;
    const srcLength = srcEndIndex - srcStartIndex;
    if (srcLength <= 0) {
      return targetStartIndex;
    }
    let targetIndex = targetStartIndex;
  
    for (let i = 0; i < srcLength; i++) {
      target[targetIndex++] = positions[srcStartIndex + i];
    }
  
    if (!isFlatRingClosed(positions, size, srcStartIndex, srcEndIndex)) {
      for (let i = 0; i < size; i++) {
        target[targetIndex++] = positions[srcStartIndex + i];
      }
    }
    return targetIndex;
  }