function validateMetadata(metadata, traversal) {
  const length = traversal._primitive.provider.types.length;
  if (!Array.isArray(metadata) || metadata.length !== length) {
    return false;
  }
  const { megatextures } = traversal;
  for (let i = 0; i < length; i++) {
    const { voxelCountPerTile, channelCount } = megatextures[i];
    const { x, y, z } = voxelCountPerTile;
    const tileVoxelCount = x * y * z;

    const data = metadata[i];
    const expectedLength = tileVoxelCount * channelCount;
    if (data.length !== expectedLength) {
      return false;
    }
  }
  return true;
}
Check if an array of metadata is of the expected type and size

@param {TypedArray[]} metadata The metadata to validate
@param {VoxelTraversal} traversal The traversal to validate against
@returns {boolean} <code>true</code> if the metadata is valid, <code>false</code> otherwise

@private