UNPKG

@spearwolf/twopoint5d

Version:

Create 2.5D realtime graphics and pixelart with WebGL and three.js

25 lines 581 B
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