UNPKG

blaze-2d

Version:

A fast and simple WebGL 2 2D game engine written in TypeScript

18 lines (17 loc) 539 B
import { vec2 } from "gl-matrix"; import Collider from "./collider/collider"; interface GJKResult { collision: boolean; simplex?: vec2[]; } /** * Performs GJK collision detection between two colliders. * * @see [GJK Explanation](https://www.youtube.com/watch?v=ajv46BSqcK4) * * @param a The first collider * @param c The collider to test for collisions against * @returns A {@link GJKResult} struct containing the results of the GJK algorithm */ export default function GJK(a: Collider, b: Collider): GJKResult; export {};