import { Rect } from './Rect';
export default class Space {
    layer;
    rect;
    distanceToCenter;
    constructor(params, layer) {
        this.layer = layer;
        this.rect = new Rect();
        this.rect.width = params?.width ?? 0;
        this.rect.height = params?.depth ?? 0;
    }
    x = () => {
        return (this.rect.x - this.layer.packer.width * 0.5 + 0.5) * -1;
    };
    z = () => {
        return (this.rect.y - this.layer.packer.height * 0.5 + 0.5) * -1;
    };
    y = () => {
        return this.z();
    };
    width = (k = 1) => {
        return this.rect.width * 0.5 * k;
    };
    depth = (k = 1) => {
        return this.rect.height * 0.5 * k;
    };
    height = (k) => {
        return this.depth(k);
    };
}
//# sourceMappingURL=Space.js.map