@vue-dnd-kit/core
Version:
Core functionality for Vue DnD Kit - a lightweight Vue 3 library for building performant and accessible drag and drop interfaces
24 lines (23 loc) • 791 B
TypeScript
/**
* AABB geometry utilities for collision detection
*/
export interface IBoundingBox {
x: number;
y: number;
width: number;
height: number;
top: number;
left: number;
right: number;
bottom: number;
}
export interface IPoint {
x: number;
y: number;
}
export declare const checkCollision: (boxA: IBoundingBox, boxB: IBoundingBox) => boolean;
export declare const getBoundingBox: (element: HTMLElement | null) => IBoundingBox;
export declare const getCenter: (box: IBoundingBox) => IPoint;
export declare const getDistance: (pointA: IPoint, pointB: IPoint) => number;
export declare const getOverlapPercent: (boxA: IBoundingBox, boxB: IBoundingBox) => number;
export declare const containsPoint: (box: IBoundingBox, x: number, y: number) => boolean;