| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581 | 
							- class Carrier {
 
-   constructor(t, e) {
 
-     (this.icube = t),
 
-       (this.row = -1),
 
-       (this.col = -1),
 
-       (this.height = -1),
 
-       (this.origins = [...e]),
 
-       (this.node = new BABYLON.TransformNode("root", scene)),
 
-       (this.pallets = []),
 
-       (this.id = BABYLON.Tools.RandomId()),
 
-       (this.distance = 0),
 
-       (this.time = 0),
 
-       (this.jobs = 0),
 
-       (this.status = CarrierState.Idle),
 
-       (this.tasks = []),
 
-       (this.drivingSpeed = 0.7),
 
-       (this.wheelsetChangeTime = 7.6),
 
-       this.init(),
 
-       this.reset();
 
-   }
 
-   init() {
 
-     const t = itemInfo[ITEMTYPE.Auto.Carrier],
 
-       e = t.originMesh.createInstance("carrier3DInstance");
 
-     (e.isPickable = !1),
 
-       (e.position = BABYLON.Vector3.Zero()),
 
-       (e.rotation = BABYLON.Vector3.Zero()),
 
-       e.setParent(this.node);
 
-     for (let t = 0; t < g_palletInfo.value.length; t++) {
 
-       const i = new Pallet(t, this.icube.palletHeight);
 
-       i.setEnabled(!1), i.node.setParent(this.node), this.pallets.push(i);
 
-     }
 
-   }
 
-   reset() {
 
-     var t;
 
-     this.updateProps(...this.origins),
 
-       this.pallets.forEach(t => t.setEnabled(!1)),
 
-       (this.task = Task.None),
 
-       this.port &&
 
-         (this.port.removePallet(),
 
-         -1 !== (t = this.port.reserved.indexOf(this)) &&
 
-           this.port.reserved.splice(t, 1)),
 
-       this.lift &&
 
-         (this.lift.pallets.forEach(t => t.setEnabled(!1)),
 
-         (this.lift.reserved = []),
 
-         (this.lift.wait = !0)),
 
-       this.charger && (this.charger.reserved = null),
 
-       this.store && this.store.forEach(t => (t.reserved = null)),
 
-       (this.port = null),
 
-       (this.lift = null),
 
-       (this.charger = null),
 
-       (this.slot = null),
 
-       (this.points = []),
 
-       (this.wait = !1),
 
-       (this.store = null),
 
-       (this.pathLength = CarrierPath.Full),
 
-       (this.paired = null),
 
-       (this.hasPallet = !1);
 
-   }
 
-   updateProps(t, e, i) {
 
-     if (
 
-       ((this.row = t),
 
-       (this.col = e),
 
-       (this.height = i),
 
-       0 !== this.icube.transform.length)
 
-     ) {
 
-       for (var [s, o] of this.icube.transform[5].data.entries())
 
-         if (o[0] === this.row && o[1] === this.col && o[2] === this.height) {
 
-           this.node.position = new BABYLON.Vector3(
 
-             this.icube.transform[5].position[s][0],
 
-             this.icube.transform[5].position[s][1],
 
-             this.icube.transform[5].position[s][2]
 
-           );
 
-           break;
 
-         }
 
-       0 === this.row &&
 
-         this.icube.isHorizontal &&
 
-         (this.node.position.z += g_palletInfo.racking / 2 + g_railOutside),
 
-         0 !== this.col ||
 
-           this.icube.isHorizontal ||
 
-           (this.node.position.x += g_palletInfo.racking / 2 + g_railOutside),
 
-         (this.node.rotation.y = this.icube.isHorizontal ? 0 : Math.PI / 2);
 
-     }
 
-   }
 
-   togglePallet(t, e) {
 
-     (this.hasPallet = e), this.pallets[t].setEnabled(e);
 
-   }
 
-   setPalletHeight(t, e) {
 
-     this.pallets[t].setHeight(e);
 
-   }
 
-   remove() {
 
-     this.node.dispose();
 
-     for (let t = this.pallets.length - 1; 0 <= t; t--) this.pallets[t].remove();
 
-   }
 
-   createAnimation(e, i) {
 
-     let s = [],
 
-       o = 0;
 
-     const t = new BABYLON.Animation(
 
-       "animPos",
 
-       "position",
 
-       1,
 
-       BABYLON.Animation.ANIMATIONTYPE_VECTOR3,
 
-       BABYLON.Animation.ANIMATIONLOOPMODE_CYCLE
 
-     );
 
-     for (let t = 0; t < e.length; t++) {
 
-       var n;
 
-       s.push({
 
-         frame: o,
 
-         value: e[t],
 
-       }),
 
-         (o += parseFloat(Number(this.wheelsetChangeTime / i).toFixed(3))),
 
-         s.push({
 
-           frame: o,
 
-           value: e[t],
 
-         }),
 
-         e[t + 1] &&
 
-           ((n = BABYLON.Vector3.Distance(e[t], e[t + 1])),
 
-           (n = parseFloat(Number(n).toFixed(3))),
 
-           (o += n / (this.drivingSpeed * i)),
 
-           (this.distance += 2 * n));
 
-     }
 
-     t.setKeys(s);
 
-     const r = new BABYLON.CubicEase();
 
-     return (
 
-       r.setEasingMode(BABYLON.EasingFunction.EASINGMODE_EASEINOUT),
 
-       t.setEasingFunction(r),
 
-       t
 
-     );
 
-   }
 
- }
 
- class Lift {
 
-   constructor(t, e, i, s) {
 
-     (this.icube = t),
 
-       (this.row = e.row),
 
-       (this.length = e.length),
 
-       (this.index = e.index),
 
-       (this.bottomOrTop = e.bottomOrTop),
 
-       (this.preloading = e.preloading || !1),
 
-       (this.posx = i),
 
-       (this.posz = s),
 
-       (this.node = new BABYLON.TransformNode("root", scene)),
 
-       (this.rackings = []),
 
-       (this.pallets = []),
 
-       (this.id = BABYLON.Tools.RandomId()),
 
-       (this.time = 0),
 
-       (this.height = 0),
 
-       (this.maxLevel = 0),
 
-       (this.movingSpeed = 1.3),
 
-       this.init(),
 
-       this.reset();
 
-   }
 
-   init() {
 
-     let t = 0;
 
-     const i = itemInfo[ITEMTYPE.Auto.LiftRacking],
 
-       s = itemInfo[ITEMTYPE.Auto.LiftRackingTop];
 
-     for (let e = 0; e < this.icube.rackingHighLevel; e++) {
 
-       if (
 
-         0 ==
 
-         this.icube.transform[6].data.filter(
 
-           t =>
 
-             t[3] === this.length &&
 
-             t[2] === e &&
 
-             t[this.icube.isHorizontal ? 1 : 0] === this.row
 
-         ).length
 
-       ) {
 
-         const a = this.icube.transform[6].data.filter(
 
-           t =>
 
-             t[3] === this.length &&
 
-             t[2] !== e &&
 
-             t[this.icube.isHorizontal ? 1 : 0] === this.row
 
-         );
 
-         if (0 < a.length) {
 
-           const h =
 
-               a[0][this.icube.isHorizontal ? 0 : 1] +
 
-               (this.bottomOrTop < 0 ? -1 : 2),
 
-             l = a.map(t => t[2]);
 
-           if (!l.includes(this.icube.rackingHighLevel - 1))
 
-             if (
 
-               0 ===
 
-               this.icube.transform[2].data.filter(
 
-                 t =>
 
-                   t[2] === e &&
 
-                   t[this.icube.isHorizontal ? 1 : 0] === this.row &&
 
-                   t[this.icube.isHorizontal ? 0 : 1] === h
 
-               ).length
 
-             )
 
-               continue;
 
-         }
 
-       }
 
-       var o = this.icube.palletAtLevel.filter(t => t.idx === e + 1),
 
-         o =
 
-           (0 < o.length ? parseFloat(o[0].height) : this.icube.palletHeight) +
 
-           g_bottomLength +
 
-           g_railHeight;
 
-       const r = i.originMesh.createInstance("liftInstance"),
 
-         n =
 
-           ((r.origin = i.originMesh),
 
-           (r.isPickable = !1),
 
-           (r.position = new BABYLON.Vector3(
 
-             0,
 
-             this.icube.getHeightAtLevel(t),
 
-             0
 
-           )),
 
-           (r.rotation = BABYLON.Vector3.Zero()),
 
-           (r.scaling.y = o),
 
-           r.setParent(this.node),
 
-           this.rackings.push(r),
 
-           s.originMesh.createInstance("liftTopInstance"));
 
-       (n.isPickable = !1),
 
-         (n.position = new BABYLON.Vector3(
 
-           0,
 
-           0.14 + this.icube.getHeightAtLevel(t),
 
-           0
 
-         )),
 
-         (n.rotation = BABYLON.Vector3.Zero()),
 
-         n.setParent(this.node),
 
-         t++;
 
-     }
 
-     const n = s.originMesh.createInstance("liftTopInstance"),
 
-       e =
 
-         ((n.origin = s.originMesh),
 
-         (n.isPickable = !1),
 
-         (n.position = new BABYLON.Vector3(
 
-           0,
 
-           0.14 + this.icube.getHeightAtLevel(t),
 
-           0
 
-         )),
 
-         (n.rotation = BABYLON.Vector3.Zero()),
 
-         n.setParent(this.node),
 
-         (this.maxLevel = t),
 
-         (this.height =
 
-           g_bottomLength + this.icube.getHeightAtLevel(this.maxLevel)),
 
-         itemInfo[ITEMTYPE.Auto.LiftCarrier]);
 
-     (this.platform = e.originMesh.createInstance("liftCarrierInstance")),
 
-       (this.platform.isPickable = !1),
 
-       (this.platform.position = BABYLON.Vector3.Zero()),
 
-       (this.platform.rotation = BABYLON.Vector3.Zero()),
 
-       this.platform.setParent(this.node);
 
-     for (let t = 0; t < g_palletInfo.value.length; t++) {
 
-       const c = new Pallet(t, this.icube.palletHeight);
 
-       c.setEnabled(!1), c.node.setParent(this.platform), this.pallets.push(c);
 
-     }
 
-     (this.node.position = new BABYLON.Vector3(this.posx, 0, this.posz)),
 
-       (this.node.rotation.y = this.icube.isHorizontal ? 0 : -Math.PI / 2),
 
-       this.preloading && this.addPreloading();
 
-   }
 
-   reset() {
 
-     this.pallets.forEach(t => t.setEnabled(!1)),
 
-       this.platform.setParent(this.node),
 
-       (this.platform.position = BABYLON.Vector3.Zero()),
 
-       (this.reserved = []),
 
-       (this.wait = !0),
 
-       (this.entry = null),
 
-       (this.inPosition = !1);
 
-   }
 
-   remove() {
 
-     this.node.dispose();
 
-     for (let t = this.pallets.length - 1; 0 <= t; t--) this.pallets[t].remove();
 
-   }
 
-   addPreloading() {
 
-     var e = this.bottomOrTop;
 
-     for (let t = 0; t < this.rackings.length; t++) {
 
-       const i = this.rackings[t].getChildren();
 
-       if (0 < i.length) i[0].isVisible = !0;
 
-       else {
 
-         const s = otherItemInfo[
 
-           ITEMTYPE.Other.LiftPreloading
 
-         ].originMesh.createInstance("liftPreloadingInstance");
 
-         (s.origin = otherItemInfo[ITEMTYPE.Other.LiftPreloading].originMesh),
 
-           (s.isPickable = !1),
 
-           (s.isVisible = !0),
 
-           s.setEnabled(!0),
 
-           (s.rotation.y = this.icube.isHorizontal ? 0 : Math.PI / 2),
 
-           s.setParent(this.rackings[t]),
 
-           (s.position = BABYLON.Vector3.Zero()),
 
-           (s.position.z -= (this.icube.isHorizontal ? 1 : -1) * e * g_width);
 
-       }
 
-     }
 
-     this.icube.isHorizontal
 
-       ? (this.node.position.z += e * g_width * 0.88)
 
-       : (this.node.position.x += e * g_width * 0.88);
 
-   }
 
-   removePreloading() {
 
-     for (let t = 0; t < this.rackings.length - 1; t++) {
 
-       const e = this.rackings[t].getChildren();
 
-       0 < e.length && (e[0].isVisible = !1);
 
-     }
 
-     this.node.position = new BABYLON.Vector3(this.posx, 0, this.posz);
 
-   }
 
-   togglePallet(t, e) {
 
-     this.pallets[t].setEnabled(e);
 
-   }
 
-   setPalletHeight(t, e) {
 
-     this.pallets[t].setHeight(e);
 
-   }
 
-   createAnimation(t, e) {
 
-     let i = [];
 
-     var s = 0;
 
-     const o = new BABYLON.Animation(
 
-       "animPos",
 
-       "position.y",
 
-       1,
 
-       BABYLON.Animation.ANIMATIONTYPE_FLOAT,
 
-       BABYLON.Animation.ANIMATIONLOOPMODE_CYCLE
 
-     );
 
-     i.push({
 
-       frame: 0,
 
-       value: t[0],
 
-     });
 
-     var n = Math.abs(t[0] - t[1]);
 
-     (s += parseFloat(Number(n).toFixed(3)) / (this.movingSpeed * e)),
 
-       i.push({
 
-         frame: s,
 
-         value: t[1],
 
-       }),
 
-       o.setKeys(i);
 
-     const r = new BABYLON.CubicEase();
 
-     return (
 
-       r.setEasingMode(BABYLON.EasingFunction.EASINGMODE_EASEINOUT),
 
-       o.setEasingFunction(r),
 
-       o
 
-     );
 
-   }
 
- }
 
- class Pallet {
 
-   constructor(t, e) {
 
-     (this.width =
 
-       custom_values[1] && -1 !== custom_values[1]
 
-         ? useP(custom_values[1], !1)
 
-         : 1.2),
 
-       (this.length =
 
-         custom_values[0] && -1 !== custom_values[0]
 
-           ? useP(custom_values[0], !1)
 
-           : 0.8 + 0.2 * t),
 
-       (this.height = e),
 
-       (this.type = t),
 
-       (this.props = []),
 
-       (this.baseHeight = 0.416),
 
-       (this.palletMHeight = 0.154),
 
-       (this.node = new BABYLON.TransformNode("root", scene)),
 
-       (this.id = BABYLON.Tools.RandomId()),
 
-       this.init();
 
-   }
 
-   init() {
 
-     const t = itemInfo[ITEMTYPE.Auto.Pallet],
 
-       e = t.originMesh.createInstance("palletInstance"),
 
-       i =
 
-         ((e.origin = t.originMesh),
 
-         (e.isPickable = !1),
 
-         (e.position = BABYLON.Vector3.Zero()),
 
-         (e.rotation = BABYLON.Vector3.Zero()),
 
-         (e.scaling.z = this.length),
 
-         e.setParent(this.node),
 
-         pallets[this.type].createInstance("baggageInstance"));
 
-     (i.origin = pallets[this.type]),
 
-       (i.position = BABYLON.Vector3.Zero()),
 
-       (i.position.y =
 
-         this.baseHeight +
 
-         this.palletMHeight +
 
-         (this.height - this.palletMHeight) / 2),
 
-       (i.isPickable = !1),
 
-       (i.scaling = new BABYLON.Vector3(
 
-         this.width + 2 * g_loadPalletOverhang,
 
-         this.height - this.palletMHeight,
 
-         this.length + 2 * g_loadPalletOverhang
 
-       )),
 
-       (i.cullingStrategy =
 
-         BABYLON.AbstractMesh.CULLINGSTRATEGY_OPTIMISTIC_INCLUSION),
 
-       i.setParent(this.node);
 
-   }
 
-   setPosition(t) {
 
-     this.node.position = t;
 
-   }
 
-   setRotation(t) {
 
-     this.node.rotation = t;
 
-   }
 
-   remove() {
 
-     this.node.dispose();
 
-   }
 
-   setEnabled(t) {
 
-     this.node.setEnabled(t);
 
-   }
 
-   setHeight(t) {
 
-     this.height = t;
 
-     const e = this.node.getChildMeshes()[1];
 
-     (e.position.y =
 
-       this.baseHeight +
 
-       this.palletMHeight +
 
-       (this.height - this.palletMHeight) / 2),
 
-       (e.scaling.y = this.height - this.palletMHeight);
 
-   }
 
- }
 
- class Grid {
 
-   constructor(t, e, i, s, o, n, r) {
 
-     var a = new BABYLON.Mesh("Grid", r);
 
-     return (
 
-       this._addGrid(e, t, i.length, s.length, a, r),
 
-       this._generateLabels(
 
-         this._addLabel(
 
-           t,
 
-           i,
 
-           "x",
 
-           new BABYLON.Vector3(t + 5 * (1 - n), 0, -e - 5),
 
-           n
 
-         ),
 
-         a,
 
-         o,
 
-         r
 
-       ),
 
-       this._generateLabels(
 
-         this._addLabel(
 
-           t,
 
-           i,
 
-           "x",
 
-           new BABYLON.Vector3(t + 5 * (1 - n), 0, e + 5),
 
-           n
 
-         ),
 
-         a,
 
-         o,
 
-         r
 
-       ),
 
-       this._generateLabels(
 
-         this._addLabel(
 
-           e,
 
-           s,
 
-           "y",
 
-           new BABYLON.Vector3(t + 5, 0, -e - 5 * (1 - n)),
 
-           n
 
-         ),
 
-         a,
 
-         o,
 
-         r
 
-       ),
 
-       this._generateLabels(
 
-         this._addLabel(
 
-           e,
 
-           s,
 
-           "y",
 
-           new BABYLON.Vector3(-t - 5, 0, -e - 5 * (1 - n)),
 
-           n
 
-         ),
 
-         a,
 
-         o,
 
-         r
 
-       ),
 
-       this
 
-     );
 
-   }
 
-   _addGrid(e, i, t, s, o, n) {
 
-     var r = (2 * e) / s,
 
-       a = (2 * i) / t;
 
-     let h = [];
 
-     for (let t = -e; t <= e; t += r)
 
-       h.push([new BABYLON.Vector3(-i, t, 0), new BABYLON.Vector3(i, t, 0)]);
 
-     for (let t = -i; t <= i; t += a)
 
-       h.push([new BABYLON.Vector3(t, -e, 0), new BABYLON.Vector3(t, e, 0)]);
 
-     const l = BABYLON.MeshBuilder.CreateLineSystem(
 
-       "linesystem",
 
-       {
 
-         lines: h,
 
-         updatable: !1,
 
-       },
 
-       n
 
-     );
 
-     (l.color = new BABYLON.Color3(0.6, 0.6, 0.6)),
 
-       (l.visibility = 0.5),
 
-       (l.rotation.x = Math.PI / 2),
 
-       l.freezeWorldMatrix(),
 
-       l.setParent(o);
 
-   }
 
-   _addLabel(t, e, i, s, o) {
 
-     var n = (2 * t) / e.length;
 
-     const r = BABYLON.Vector3.Zero();
 
-     let a = [];
 
-     for (let t = o; t < e.length; t++)
 
-       "x" === i
 
-         ? r.addInPlace(new BABYLON.Vector3(n, 0, 0))
 
-         : r.subtractInPlace(new BABYLON.Vector3(0, 0, n)),
 
-         a.push(r.clone().subtractInPlace(s).asArray());
 
-     return a;
 
-   }
 
-   _generateLabels(n, t, e, i) {
 
-     var s = n.length;
 
-     const r = Math.floor(Math.sqrt(s) + 1),
 
-       o = new BABYLON.DynamicTexture(
 
-         "DynamicTexture",
 
-         {
 
-           width: 64 * r,
 
-           height: 32 * r,
 
-         },
 
-         i,
 
-         !0
 
-       );
 
-     var a = [25, 15, 5];
 
-     for (let e = 0; e < r; e++)
 
-       for (let t = 0; t < r; t++) {
 
-         var h = (e * r + t + 1).toString();
 
-         o.drawText(
 
-           h,
 
-           a[h.length - 1] + 64 * t,
 
-           25 + 32 * (r - e - 1),
 
-           "bold 32px calibri",
 
-           "black",
 
-           ""
 
-         );
 
-       }
 
-     const l = BABYLON.MeshBuilder.CreatePlane(
 
-         "TextPlane",
 
-         {
 
-           width: 8,
 
-           height: 8,
 
-           sideOrientation: 2,
 
-         },
 
-         i
 
-       ),
 
-       c = new BABYLON.StandardMaterial("TextPlaneMaterial", i),
 
-       g =
 
-         ((c.specularColor = BABYLON.Color3.Black()),
 
-         (c.emissiveTexture = o),
 
-         (c.opacityTexture = o),
 
-         c.freeze(),
 
-         new BABYLON.SolidParticleSystem("SPS", i)),
 
-       d = (g.addShape(l, s), g.buildMesh());
 
-     (d.material = c),
 
-       l.dispose(),
 
-       (g.initParticles = () => {
 
-         for (let t = 0; t < g.nbParticles; t++) {
 
-           const o = g.particles[t];
 
-           var e = o.idx % r,
 
-             i = Math.floor(o.idx / r),
 
-             s = n[o.idx];
 
-           (o.position.x = s[0]),
 
-             (o.position.y = s[1]),
 
-             (o.position.z = s[2]),
 
-             (o.rotation.x = Math.PI / 2),
 
-             (o.rotation.z = 0),
 
-             (o.rotation.y = 0),
 
-             (o.uvs.x = (64 * e) / (64 * r)),
 
-             (o.uvs.y = (32 * i) / (32 * r)),
 
-             (o.uvs.z = (64 * (1 + e)) / (64 * r)),
 
-             (o.uvs.w = (32 * (i + 1)) / (32 * r));
 
-         }
 
-       }),
 
-       g.initParticles(),
 
-       g.setParticles(),
 
-       g.refreshVisibleSize(),
 
-       (g.computeParticleRotation = !1),
 
-       (g.computeParticleTexture = !1),
 
-       (g.computeParticleColor = !1),
 
-       (g.computeParticleVertex = !1),
 
-       g.mesh.freezeWorldMatrix(),
 
-       g.mesh.freezeNormals(),
 
-       g.mesh.setParent(t);
 
-   }
 
- }
 
 
  |