@spearwolf/twopoint5d
Version:
a library to create 2.5d realtime graphics and pixelart with three.js
33 lines • 1.14 kB
TypeScript
export declare class AABB2 {
left: number;
top: number;
width: number;
height: number;
constructor(left?: number, top?: number, width?: number, height?: number);
set(left: number, top: number, width: number, height: number): AABB2;
clone(): AABB2;
copy(aabb: AABB2): AABB2;
static from({ top, left, width, height, }: {
top: number;
left: number;
width: number;
height: number;
}, target?: AABB2): AABB2;
extend(other: AABB2): AABB2;
get right(): number;
get bottom(): number;
get centerX(): number;
set centerX(x: number);
get centerY(): number;
set centerY(y: number);
is(left: number, top: number, width: number, height: number): boolean;
isEqual(aabb: AABB2): boolean;
isInside(x: number, y: number): boolean;
isInsideAABB(aabb: AABB2): boolean;
isIntersecting(aabb: AABB2): boolean;
isNorthWest(x: number, y: number): boolean;
isNorthEast(x: number, y: number): boolean;
isSouthEast(x: number, y: number): boolean;
isSouthWest(x: number, y: number): boolean;
}
//# sourceMappingURL=AABB2.d.ts.map