function convertColorFactor(factor) {
  const convertedFactor = [];
  const length = factor.length;
  for (let i = 0; i < length; i++) {
    if (i < 3) {
      convertedFactor.push(srgbToLinear(factor[i]));
    } else {
      convertedFactor.push(factor[i]);
    }
  }
  return convertedFactor;
}
Find a triangle touching the point [px, py, pz], then return the vertex closest to the search point
@param {number} px The x component of the point to query
@param {number} py The y component of the point to query
@param {number} pz The z component of the point to query
@returns {object} A structure containing the index of the closest point,
the squared distance from the queried point to the point that is found,
the distance from the queried point to the point that is found,
the queried position in local space,
the closest position in local space