UNPKG

excalibur

Version:

Excalibur.js is a simple JavaScript game engine with TypeScript bindings for making 2D games in HTML5 Canvas. Our mission is to make web game development as simple as possible.

26 lines (25 loc) 613 B
import { CollisionContact } from '../Detection/CollisionContact'; /** * A collision solver figures out how to position colliders such that they are no longer overlapping * * Solvers are executed in the order * * 1. preSolve * 2. solveVelocity * 3. solvePosition * 4. postSolve * @inheritdoc */ export interface CollisionSolver { /** * Solves overlapping contact in * * Solvers are executed in the order * 1. preSolve * 2. solveVelocity * 3. solvePosition * 4. postSolve * @param contacts */ solve(contacts: CollisionContact[]): CollisionContact[]; }