| 322 | function buildLinkedAdj(faces, faceCount, vertCount) { |
| 323 | const S = faceCount * 3; |
| 324 | const vfHead = new Int32Array(vertCount).fill(-1); |
| 325 | const slotFace = new Int32Array(S); |
| 326 | const slotVert = new Int32Array(S); |
| 327 | const slotNext = new Int32Array(S).fill(-1); |
| 328 | const slotPrev = new Int32Array(S).fill(-1); |
| 329 | const faceSlot = new Int32Array(S).fill(-1); |
| 330 | for (let f = 0; f < faceCount; f++) { |
| 331 | if (faces[f * 3] < 0) continue; |
| 332 | for (let k = 0; k < 3; k++) { |
| 333 | const v = faces[f * 3 + k]; |
| 334 | const s = f * 3 + k; |
| 335 | slotFace[s] = f; |
| 336 | slotVert[s] = v; |