import { ThreeUtils } from "../../utils";
export class AlBoundingBoxDefinition {
    static get Object() {
        return {
            schema: {
                color: { type: "string", default: "#f50057" },
                scale: { type: "string" }
            },
            init(_data) {
                this.box = new THREE.Box3();
            },
            update() {
                const el = this.el;
                this.box.setFromCenterAndSize(new THREE.Vector3(0, 0, 0), ThreeUtils.stringToVector3(this.data.scale));
                this.boundingBox = new THREE.Box3Helper(this.box, this.data.color);
                el.setObject3D("mesh", this.boundingBox);
            },
            remove() {
                this.el.removeObject3D("mesh");
            }
        };
    }
    static get Tag() {
        return "al-bounding-box";
    }
}
