@woosh/meep-engine
Version:
Pure JavaScript game engine. Fully featured and production ready.
15 lines • 1.29 kB
TypeScript
/**
* Implementation of the string-pulling algorithm for funnel path refinement.
* Does not allocate memory.
*
*
* @param {Uint32Array|number[]|ArrayLike<number>} output Indices of vertices are written here
* @param {number} output_offset where to start writing into the output, typically you want to pass 0 here.
* @param {Uint32Array|Uint16Array|Uint8Array|number[]} portal_vertices Flat array of vertex index pairs [left0,right0, left1, right1 ... leftN, rightN]
* @param {Float32Array|number[]|ArrayLike<number>} portal_normals Normal vectors for each portal. Should be set to the triangle normal, which we exit through this portal. can be filled with [up, up, up... ] if your portals lay in the horizontal plane mostly.
* @param {number} portal_count how many portals do we have to work with
* @param {Float32Array|number[]} vertex_data actual vertex positions
* @returns number of vertices written to the output
*/
export function funnel_string_pull(output: Uint32Array | number[] | ArrayLike<number>, output_offset: number, portal_vertices: Uint32Array | Uint16Array | Uint8Array | number[], portal_normals: Float32Array | number[] | ArrayLike<number>, portal_count: number, vertex_data: Float32Array | number[]): number;
//# sourceMappingURL=funnel_string_pull.d.ts.map