UNPKG

@woosh/meep-engine

Version:

Pure JavaScript game engine. Fully featured and production ready.

17 lines (14 loc) 547 B
import { array_copy } from "../../../../core/collection/array/array_copy.js"; /** * * @param {SMikkTSpaceContext} pContext * @param {number[]|{0:number,1:number,2:number}} fvNormOut * @param {number} iFace * @param {number} iVert * @returns {void} */ export function m_getNormal(pContext, fvNormOut, iFace, iVert) { // figure out which vertex it is const vertex_index = pContext.geometry_buffer_index[iFace * 3 + iVert]; array_copy(pContext.geometry_buffer_vertex_normal, vertex_index * 3, fvNormOut, 0, 3); }