UNPKG

@xeokit/xeokit-convert

Version:

JavaScript utilities to create .XKT files

13 lines (12 loc) 456 B
/** * Converts surface-perpendicular face normals to vertex normals. Assumes that the mesh contains disjoint triangles * that don't share vertex array elements. Works by finding groups of vertices that have the same location and * averaging their normal vectors. * * @returns {{positions: Array, normals: *}} * @private */ export function faceToVertexNormals(positions: any, normals: any, options?: {}): { positions: any[]; normals: any; };