UNPKG

arcade-physics

Version:
27 lines 1.44 kB
import { Body } from '../Body'; import { StaticBody } from '../StaticBody'; import { World } from '../World'; /** * This method will search the given circular area and return an array of all physics bodies that * overlap with it. It can return either Dynamic, Static bodies or a mixture of both. * * A body only has to intersect with the search area to be considered, it doesn't have to be fully * contained within it. * * If Arcade Physics is set to use the RTree (which it is by default) then the search is rather fast, * otherwise the search is O(N) for Dynamic Bodies. * * @function Phaser.Physics.Arcade.Components.OverlapCirc * @since 3.21.0 * * @param {number} x - The x coordinate of the center of the area to search within. * @param {number} y - The y coordinate of the center of the area to search within. * @param {number} radius - The radius of the area to search within. * @param {boolean} [includeDynamic=true] - Should the search include Dynamic Bodies? * @param {boolean} [includeStatic=false] - Should the search include Static Bodies? * * @return {(Phaser.Physics.Arcade.Body[]|Phaser.Physics.Arcade.StaticBody[])} An array of bodies that overlap with the given area. */ declare const OverlapCirc: (world: World, x: number, y: number, radius: number, includeDynamic?: boolean, includeStatic?: boolean) => Array<Body | StaticBody>; export default OverlapCirc; //# sourceMappingURL=OverlapCirc.d.ts.map