UNPKG

@woosh/meep-engine

Version:

Pure JavaScript game engine. Fully featured and production ready.

16 lines 705 B
/** * GJK intersection test for two convex shapes. * * Determines whether two convex shapes overlap by iteratively building a simplex * in the Minkowski difference space. If the origin is enclosed by the simplex, * the shapes intersect. * * Adapted from https://github.com/kevinmoran/GJK/blob/master/GJK.h * * @param {number[]|Float32Array} simplex Working buffer for simplex vertices (4 vec3s). Must have length >= 12. * @param {AbstractShape3D} shape_a * @param {AbstractShape3D} shape_b * @returns {boolean} true if the shapes intersect */ export function gjk(simplex: number[] | Float32Array, shape_a: AbstractShape3D, shape_b: AbstractShape3D): boolean; //# sourceMappingURL=gjk.d.ts.map