@spearwolf/twopoint5d
Version:
a library to create 2.5d realtime graphics and pixelart with three.js
25 lines • 581 B
JavaScript
import { AABB2 } from '../AABB2.js';
export class DataChunk2D {
constructor(data) {
this.aabb = new AABB2(data.x, data.y, data.width, data.height);
}
get left() {
return this.aabb.left;
}
get top() {
return this.aabb.top;
}
get right() {
return this.aabb.right;
}
get bottom() {
return this.aabb.bottom;
}
containsDataAt(x, y) {
return this.aabb.isInside(x, y);
}
isIntersecting(aabb) {
return this.aabb.isIntersecting(aabb);
}
}
//# sourceMappingURL=DataChunk2D.js.map