export default Detector; /** * the Detector class contains methods for detecting collisions between bodies using a broadphase algorithm. */ declare class Detector { /** * @param {Container} world - the physic world this detector is bind to */ constructor(world: Container); world: Container; /** * the default response object used for collisions * (will be automatically populated by the collides functions) * @type {ResponseObject} */ response: ResponseObject; /** * determine if two objects should collide (based on both respective objects body collision mask and type).
* you can redefine this function if you need any specific rules over what should collide with what. * @param {Renderable|Container|Entity|Sprite|NineSliceSprite} a - a reference to the object A. * @param {Renderable|Container|Entity|Sprite|NineSliceSprite} b - a reference to the object B. * @returns {boolean} true if they should collide, false otherwise */ shouldCollide(a: Renderable | Container | Entity | Sprite | NineSliceSprite, b: Renderable | Container | Entity | Sprite | NineSliceSprite): boolean; /** * detect collision between two bodies. * @param {Body} bodyA - a reference to body A. * @param {Body} bodyB - a reference to body B. * @returns {boolean} true if colliding */ collides(bodyA: Body, bodyB: Body, response?: ResponseObject, onContact?: undefined): boolean; } import type Container from "../../renderable/container.js"; import ResponseObject from "../response.js"; import type Renderable from "../../renderable/renderable.js"; import type Entity from "../../renderable/entity/entity.js"; import type Sprite from "../../renderable/sprite.js"; import type NineSliceSprite from "../../renderable/nineslicesprite.js"; import type { Line } from "../../geometries/line.ts"; //# sourceMappingURL=detector.d.ts.map