2023-02-17 11:06:01 +01:00

36 lines
1.1 KiB
JavaScript

(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports", "./DestroyBounds", "./Split"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Destroy = void 0;
const DestroyBounds_1 = require("./DestroyBounds");
const Split_1 = require("./Split");
class Destroy {
constructor() {
this.bounds = new DestroyBounds_1.DestroyBounds();
this.mode = "none";
this.split = new Split_1.Split();
}
load(data) {
if (!data) {
return;
}
if (data.mode) {
this.mode = data.mode;
}
if (data.bounds) {
this.bounds.load(data.bounds);
}
this.split.load(data.split);
}
}
exports.Destroy = Destroy;
});