UNPKG

@polygonjs/polygonjs

Version:

node-based WebGL 3D engine https://polygonjs.com

8 lines (7 loc) 278 B
"use strict"; export const CCW_HALF_EDGE_SIDES = ["s", "e", "n", "w"]; export const NEIGHBOUR_INDICES = [0, 1, 2, 3]; export function quadHalfEdgeIndices(quad, edgeIndex, target) { target.index0 = quad[edgeIndex]; target.index1 = quad[edgeIndex == 3 ? 0 : edgeIndex + 1]; }