* parse a face vertex component (e.g. "1/2/3" or "1//3" or "1") * and return the UV index, or NO_UV if not present * @param {string} part - face vertex string * @returns {number} UV index (0-based) or NO_UV * @ignore
(part, slashIdx)
| 104 | * @ignore |
| 105 | */ |
| 106 | function parseUVIndex(part, slashIdx) { |
| 107 | if (slashIdx !== -1 && part[slashIdx + 1] !== SLASH_CHAR) { |
| 108 | return parseInt(part.substring(slashIdx + 1), 10) - OBJ_INDEX_OFFSET; |
| 109 | } |
| 110 | return NO_UV; |
| 111 | } |
| 112 | |
| 113 | // mtllib reference (if present) |
| 114 | let mtllib = null; |