code: function lngLatZToWorldPosition(lngLatZ, viewport, offsetMode = false) {
    const [longitude, latitude, z = 0] = lngLatZ;
    const [X, Y] = viewport.projectFlat(lngLatZ);
    const distanceScales = offsetMode
      ? getDistanceScales({longitude, latitude, scale: viewport.scale})
      : viewport.getDistanceScales();
    const Z = z * distanceScales.pixelsPerMeter[2];
    return [X, Y, Z];
  }
docs: In project.glsl, offset modes calculate z differently from LNG_LAT mode. offset modes apply the y adjustment (pixelsPerMeter2) when projecting z LNG_LAT mode only use the linear scale.