view3d-core 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -194,10 +194,10 @@ class L extends k {
194
194
  this._controls.reset();
195
195
  }
196
196
  }
197
- const O = { mode: "translate", space: "world", showX: true, showY: true, showZ: true, translationSnap: null, rotationSnap: null, scaleSnap: null };
198
- class H extends k {
197
+ const H = { mode: "translate", space: "world", showX: true, showY: true, showZ: true, translationSnap: null, rotationSnap: null, scaleSnap: null };
198
+ class O extends k {
199
199
  constructor(e4) {
200
- super({ ...O, ...e4 }), this.name = "transform-controller", this.dependencies = ["orbit-controller"], this.box3Helper = null;
200
+ super({ ...H, ...e4 }), this.name = "transform-controller", this.dependencies = ["orbit-controller"], this.box3Helper = null;
201
201
  }
202
202
  get controls() {
203
203
  return this._controls;
@@ -495,20 +495,27 @@ function U(e4, n2) {
495
495
  const s2 = n2.getBoundingClientRect();
496
496
  return new t.Vector2((e4.clientX - s2.left) / s2.width * 2 - 1, -(e4.clientY - s2.top) / s2.height * 2 + 1);
497
497
  }
498
- function I(e4, n2, s2) {
499
- const i2 = new t.Raycaster();
500
- i2.setFromCamera(e4, n2);
501
- return i2.intersectObjects(s2, true).filter((e5) => {
502
- const t2 = e5.object;
503
- return !(t2.isTransformControls || "TransformControls" === t2.text) && t2.isMesh && t2.visible;
498
+ const I = new t.Raycaster(), V = new t.Box3();
499
+ function N(e4, t2, n2) {
500
+ I.setFromCamera(e4, t2);
501
+ const s2 = [];
502
+ for (const e5 of n2) {
503
+ if (!e5.visible) continue;
504
+ const t3 = e5;
505
+ t3.isTransformControls || (t3.isHelper || "GridHelper" !== e5.type && "AxesHelper" !== e5.type && "AmbientLight" !== e5.type && "DirectionalLight" !== e5.type && "PointLight" !== e5.type && "SpotLight" !== e5.type && "HemisphereLight" !== e5.type && "TransformControls" !== e5.name && (V.setFromObject(e5), !V.isEmpty() && I.ray.intersectsBox(V) && s2.push(e5)));
506
+ }
507
+ if (0 === s2.length) return [];
508
+ return I.intersectObjects(s2, true).filter((e5) => {
509
+ const t3 = e5.object;
510
+ return !(t3.isTransformControls || "TransformControls" === t3.text) && t3.isMesh && t3.visible;
504
511
  });
505
512
  }
506
- function V(e4) {
513
+ function X(e4) {
507
514
  let t2 = e4;
508
515
  for (; t2.parent && "Scene" !== t2.parent.type; ) t2 = t2.parent;
509
516
  return t2;
510
517
  }
511
- function N(e4) {
518
+ function W(e4) {
512
519
  const n2 = new t.Raycaster();
513
520
  return { raycaster: n2, getIntersects(t2, s2) {
514
521
  const i2 = G(t2);
@@ -517,10 +524,10 @@ function N(e4) {
517
524
  n2.near = e5, n2.far = t2;
518
525
  } };
519
526
  }
520
- const X = { modes: ["选择", "根选择", "变换", "场景绘制", "点击信息"], defaultMode: "变换", isTransformChildren: false, enableKeyboard: false };
521
- class W extends k {
527
+ const J = { modes: ["选择", "根选择", "变换", "场景绘制", "点击信息"], defaultMode: "变换", isTransformChildren: false, enableKeyboard: false };
528
+ class Y extends k {
522
529
  constructor(e4) {
523
- super({ ...X, ...e4 }), this.name = "editor", this.dependencies = ["transform-controller", "composer"], this._currentInfo = null, this.keydownHandler = null, this._mode = this.config.defaultMode || "变换";
530
+ super({ ...J, ...e4 }), this.name = "editor", this.dependencies = ["transform-controller", "composer"], this._currentInfo = null, this.keydownHandler = null, this._mode = this.config.defaultMode || "变换";
524
531
  }
525
532
  get mode() {
526
533
  return this._mode;
@@ -549,13 +556,13 @@ class W extends k {
549
556
  const n2 = this.getPlugin("transform-controller"), s2 = this.getPlugin("composer");
550
557
  if (!n2 || !s2) return null;
551
558
  n2.detach();
552
- const i2 = this.renderer.domElement.getBoundingClientRect(), o2 = I(new t.Vector2((e4.clientX - i2.left) / i2.width * 2 - 1, -(e4.clientY - i2.top) / i2.height * 2 + 1), this.camera, this.scene.children).find((e5) => {
559
+ const i2 = this.renderer.domElement.getBoundingClientRect(), o2 = N(new t.Vector2((e4.clientX - i2.left) / i2.width * 2 - 1, -(e4.clientY - i2.top) / i2.height * 2 + 1), this.camera, this.scene.children).find((e5) => {
553
560
  e5.object;
554
- const t2 = V(e5.object);
561
+ const t2 = X(e5.object);
555
562
  return e5.object.visible && t2.visible;
556
563
  });
557
564
  if (!o2) return this._currentInfo = null, this.events.emit("click", { event: e4, info: null }), null;
558
- const { object: r2, point: a2 } = o2, l2 = V(r2);
565
+ const { object: r2, point: a2 } = o2, l2 = X(r2);
559
566
  switch (this._mode) {
560
567
  case "变换":
561
568
  s2.clearOutlineObjects(), this.config.isTransformChildren ? n2.attach(r2) : n2.attach(l2);
@@ -617,7 +624,7 @@ class W extends k {
617
624
  return (_a = this.pluginManager) == null ? void 0 : _a.get(e4);
618
625
  }
619
626
  }
620
- function J(e4, t2) {
627
+ function K(e4, t2) {
621
628
  var n2 = e4.__state.conversionName.toString(), s2 = Math.round(e4.r), i2 = Math.round(e4.g), o2 = Math.round(e4.b), r2 = e4.a, a2 = Math.round(e4.h), l2 = e4.s.toFixed(1), d2 = e4.v.toFixed(1);
622
629
  if (t2 || "THREE_CHAR_HEX" === n2 || "SIX_CHAR_HEX" === n2) {
623
630
  for (var c2 = e4.hex.toString(16); c2.length < 6; ) c2 = "0" + c2;
@@ -625,27 +632,27 @@ function J(e4, t2) {
625
632
  }
626
633
  return "CSS_RGB" === n2 ? "rgb(" + s2 + "," + i2 + "," + o2 + ")" : "CSS_RGBA" === n2 ? "rgba(" + s2 + "," + i2 + "," + o2 + "," + r2 + ")" : "HEX" === n2 ? "0x" + e4.hex.toString(16) : "RGB_ARRAY" === n2 ? "[" + s2 + "," + i2 + "," + o2 + "]" : "RGBA_ARRAY" === n2 ? "[" + s2 + "," + i2 + "," + o2 + "," + r2 + "]" : "RGB_OBJ" === n2 ? "{r:" + s2 + ",g:" + i2 + ",b:" + o2 + "}" : "RGBA_OBJ" === n2 ? "{r:" + s2 + ",g:" + i2 + ",b:" + o2 + ",a:" + r2 + "}" : "HSV_OBJ" === n2 ? "{h:" + a2 + ",s:" + l2 + ",v:" + d2 + "}" : "HSVA_OBJ" === n2 ? "{h:" + a2 + ",s:" + l2 + ",v:" + d2 + ",a:" + r2 + "}" : "unknown format";
627
634
  }
628
- var Y = Array.prototype.forEach, K = Array.prototype.slice, Z = { BREAK: {}, extend: function(e4) {
629
- return this.each(K.call(arguments, 1), function(t2) {
635
+ var Z = Array.prototype.forEach, q = Array.prototype.slice, Q = { BREAK: {}, extend: function(e4) {
636
+ return this.each(q.call(arguments, 1), function(t2) {
630
637
  (this.isObject(t2) ? Object.keys(t2) : []).forEach((function(n2) {
631
638
  this.isUndefined(t2[n2]) || (e4[n2] = t2[n2]);
632
639
  }).bind(this));
633
640
  }, this), e4;
634
641
  }, defaults: function(e4) {
635
- return this.each(K.call(arguments, 1), function(t2) {
642
+ return this.each(q.call(arguments, 1), function(t2) {
636
643
  (this.isObject(t2) ? Object.keys(t2) : []).forEach((function(n2) {
637
644
  this.isUndefined(e4[n2]) && (e4[n2] = t2[n2]);
638
645
  }).bind(this));
639
646
  }, this), e4;
640
647
  }, compose: function() {
641
- var e4 = K.call(arguments);
648
+ var e4 = q.call(arguments);
642
649
  return function() {
643
- for (var t2 = K.call(arguments), n2 = e4.length - 1; n2 >= 0; n2--) t2 = [e4[n2].apply(this, t2)];
650
+ for (var t2 = q.call(arguments), n2 = e4.length - 1; n2 >= 0; n2--) t2 = [e4[n2].apply(this, t2)];
644
651
  return t2[0];
645
652
  };
646
653
  }, each: function(e4, t2, n2) {
647
654
  if (e4) {
648
- if (Y && e4.forEach && e4.forEach === Y) e4.forEach(t2, n2);
655
+ if (Z && e4.forEach && e4.forEach === Z) e4.forEach(t2, n2);
649
656
  else if (e4.length === e4.length + 0) {
650
657
  var s2, i2 = void 0;
651
658
  for (i2 = 0, s2 = e4.length; i2 < s2; i2++) if (i2 in e4 && t2.call(n2, e4[i2], i2) === this.BREAK) return;
@@ -663,7 +670,7 @@ var Y = Array.prototype.forEach, K = Array.prototype.slice, Z = { BREAK: {}, ext
663
670
  }, t2), r2 && e4.apply(i2, o2);
664
671
  };
665
672
  }, toArray: function(e4) {
666
- return e4.toArray ? e4.toArray() : K.call(e4);
673
+ return e4.toArray ? e4.toArray() : q.call(e4);
667
674
  }, isUndefined: function(e4) {
668
675
  return void 0 === e4;
669
676
  }, isNull: function(e4) {
@@ -689,23 +696,23 @@ var Y = Array.prototype.forEach, K = Array.prototype.slice, Z = { BREAK: {}, ext
689
696
  return false === e4 || true === e4;
690
697
  }, isFunction: function(e4) {
691
698
  return e4 instanceof Function;
692
- } }, q = [{ litmus: Z.isString, conversions: { THREE_CHAR_HEX: { read: function(e4) {
699
+ } }, $ = [{ litmus: Q.isString, conversions: { THREE_CHAR_HEX: { read: function(e4) {
693
700
  var t2 = e4.match(/^#([A-F0-9])([A-F0-9])([A-F0-9])$/i);
694
701
  return null !== t2 && { space: "HEX", hex: parseInt("0x" + t2[1].toString() + t2[1].toString() + t2[2].toString() + t2[2].toString() + t2[3].toString() + t2[3].toString(), 0) };
695
- }, write: J }, SIX_CHAR_HEX: { read: function(e4) {
702
+ }, write: K }, SIX_CHAR_HEX: { read: function(e4) {
696
703
  var t2 = e4.match(/^#([A-F0-9]{6})$/i);
697
704
  return null !== t2 && { space: "HEX", hex: parseInt("0x" + t2[1].toString(), 0) };
698
- }, write: J }, CSS_RGB: { read: function(e4) {
705
+ }, write: K }, CSS_RGB: { read: function(e4) {
699
706
  var t2 = e4.match(/^rgb\(\s*(\S+)\s*,\s*(\S+)\s*,\s*(\S+)\s*\)/);
700
707
  return null !== t2 && { space: "RGB", r: parseFloat(t2[1]), g: parseFloat(t2[2]), b: parseFloat(t2[3]) };
701
- }, write: J }, CSS_RGBA: { read: function(e4) {
708
+ }, write: K }, CSS_RGBA: { read: function(e4) {
702
709
  var t2 = e4.match(/^rgba\(\s*(\S+)\s*,\s*(\S+)\s*,\s*(\S+)\s*,\s*(\S+)\s*\)/);
703
710
  return null !== t2 && { space: "RGB", r: parseFloat(t2[1]), g: parseFloat(t2[2]), b: parseFloat(t2[3]), a: parseFloat(t2[4]) };
704
- }, write: J } } }, { litmus: Z.isNumber, conversions: { HEX: { read: function(e4) {
711
+ }, write: K } } }, { litmus: Q.isNumber, conversions: { HEX: { read: function(e4) {
705
712
  return { space: "HEX", hex: e4, conversionName: "HEX" };
706
713
  }, write: function(e4) {
707
714
  return e4.hex;
708
- } } } }, { litmus: Z.isArray, conversions: { RGB_ARRAY: { read: function(e4) {
715
+ } } } }, { litmus: Q.isArray, conversions: { RGB_ARRAY: { read: function(e4) {
709
716
  return 3 === e4.length && { space: "RGB", r: e4[0], g: e4[1], b: e4[2] };
710
717
  }, write: function(e4) {
711
718
  return [e4.r, e4.g, e4.b];
@@ -713,31 +720,31 @@ var Y = Array.prototype.forEach, K = Array.prototype.slice, Z = { BREAK: {}, ext
713
720
  return 4 === e4.length && { space: "RGB", r: e4[0], g: e4[1], b: e4[2], a: e4[3] };
714
721
  }, write: function(e4) {
715
722
  return [e4.r, e4.g, e4.b, e4.a];
716
- } } } }, { litmus: Z.isObject, conversions: { RGBA_OBJ: { read: function(e4) {
717
- return !!(Z.isNumber(e4.r) && Z.isNumber(e4.g) && Z.isNumber(e4.b) && Z.isNumber(e4.a)) && { space: "RGB", r: e4.r, g: e4.g, b: e4.b, a: e4.a };
723
+ } } } }, { litmus: Q.isObject, conversions: { RGBA_OBJ: { read: function(e4) {
724
+ return !!(Q.isNumber(e4.r) && Q.isNumber(e4.g) && Q.isNumber(e4.b) && Q.isNumber(e4.a)) && { space: "RGB", r: e4.r, g: e4.g, b: e4.b, a: e4.a };
718
725
  }, write: function(e4) {
719
726
  return { r: e4.r, g: e4.g, b: e4.b, a: e4.a };
720
727
  } }, RGB_OBJ: { read: function(e4) {
721
- return !!(Z.isNumber(e4.r) && Z.isNumber(e4.g) && Z.isNumber(e4.b)) && { space: "RGB", r: e4.r, g: e4.g, b: e4.b };
728
+ return !!(Q.isNumber(e4.r) && Q.isNumber(e4.g) && Q.isNumber(e4.b)) && { space: "RGB", r: e4.r, g: e4.g, b: e4.b };
722
729
  }, write: function(e4) {
723
730
  return { r: e4.r, g: e4.g, b: e4.b };
724
731
  } }, HSVA_OBJ: { read: function(e4) {
725
- return !!(Z.isNumber(e4.h) && Z.isNumber(e4.s) && Z.isNumber(e4.v) && Z.isNumber(e4.a)) && { space: "HSV", h: e4.h, s: e4.s, v: e4.v, a: e4.a };
732
+ return !!(Q.isNumber(e4.h) && Q.isNumber(e4.s) && Q.isNumber(e4.v) && Q.isNumber(e4.a)) && { space: "HSV", h: e4.h, s: e4.s, v: e4.v, a: e4.a };
726
733
  }, write: function(e4) {
727
734
  return { h: e4.h, s: e4.s, v: e4.v, a: e4.a };
728
735
  } }, HSV_OBJ: { read: function(e4) {
729
- return !!(Z.isNumber(e4.h) && Z.isNumber(e4.s) && Z.isNumber(e4.v)) && { space: "HSV", h: e4.h, s: e4.s, v: e4.v };
736
+ return !!(Q.isNumber(e4.h) && Q.isNumber(e4.s) && Q.isNumber(e4.v)) && { space: "HSV", h: e4.h, s: e4.s, v: e4.v };
730
737
  }, write: function(e4) {
731
738
  return { h: e4.h, s: e4.s, v: e4.v };
732
- } } } }], Q = void 0, $ = void 0, ee = function() {
733
- $ = false;
734
- var e4 = arguments.length > 1 ? Z.toArray(arguments) : arguments[0];
735
- return Z.each(q, function(t2) {
736
- if (t2.litmus(e4)) return Z.each(t2.conversions, function(t3, n2) {
737
- if (Q = t3.read(e4), false === $ && false !== Q) return $ = Q, Q.conversionName = n2, Q.conversion = t3, Z.BREAK;
738
- }), Z.BREAK;
739
- }), $;
740
- }, te = void 0, ne = { hsv_to_rgb: function(e4, t2, n2) {
739
+ } } } }], ee = void 0, te = void 0, ne = function() {
740
+ te = false;
741
+ var e4 = arguments.length > 1 ? Q.toArray(arguments) : arguments[0];
742
+ return Q.each($, function(t2) {
743
+ if (t2.litmus(e4)) return Q.each(t2.conversions, function(t3, n2) {
744
+ if (ee = t3.read(e4), false === te && false !== ee) return te = ee, ee.conversionName = n2, ee.conversion = t3, Q.BREAK;
745
+ }), Q.BREAK;
746
+ }), te;
747
+ }, se = void 0, ie = { hsv_to_rgb: function(e4, t2, n2) {
741
748
  var s2 = Math.floor(e4 / 60) % 6, i2 = e4 / 60 - Math.floor(e4 / 60), o2 = n2 * (1 - t2), r2 = n2 * (1 - i2 * t2), a2 = n2 * (1 - (1 - i2) * t2), l2 = [[n2, a2, o2], [r2, n2, o2], [o2, n2, a2], [o2, r2, n2], [a2, o2, n2], [n2, o2, r2]][s2];
742
749
  return { r: 255 * l2[0], g: 255 * l2[1], b: 255 * l2[2] };
743
750
  }, rgb_to_hsv: function(e4, t2, n2) {
@@ -749,14 +756,14 @@ var Y = Array.prototype.forEach, K = Array.prototype.slice, Z = { BREAK: {}, ext
749
756
  }, component_from_hex: function(e4, t2) {
750
757
  return e4 >> 8 * t2 & 255;
751
758
  }, hex_with_component: function(e4, t2, n2) {
752
- return n2 << (te = 8 * t2) | e4 & ~(255 << te);
753
- } }, se = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e4) {
759
+ return n2 << (se = 8 * t2) | e4 & ~(255 << se);
760
+ } }, oe = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e4) {
754
761
  return typeof e4;
755
762
  } : function(e4) {
756
763
  return e4 && "function" == typeof Symbol && e4.constructor === Symbol && e4 !== Symbol.prototype ? "symbol" : typeof e4;
757
- }, ie = function(e4, t2) {
764
+ }, re = function(e4, t2) {
758
765
  if (!(e4 instanceof t2)) throw new TypeError("Cannot call a class as a function");
759
- }, oe = /* @__PURE__ */ function() {
766
+ }, ae = /* @__PURE__ */ function() {
760
767
  function e4(e5, t2) {
761
768
  for (var n2 = 0; n2 < t2.length; n2++) {
762
769
  var s2 = t2[n2];
@@ -766,7 +773,7 @@ var Y = Array.prototype.forEach, K = Array.prototype.slice, Z = { BREAK: {}, ext
766
773
  return function(t2, n2, s2) {
767
774
  return n2 && e4(t2.prototype, n2), s2 && e4(t2, s2), t2;
768
775
  };
769
- }(), re = function e2(t2, n2, s2) {
776
+ }(), le = function e2(t2, n2, s2) {
770
777
  null === t2 && (t2 = Function.prototype);
771
778
  var i2 = Object.getOwnPropertyDescriptor(t2, n2);
772
779
  if (void 0 === i2) {
@@ -776,62 +783,62 @@ var Y = Array.prototype.forEach, K = Array.prototype.slice, Z = { BREAK: {}, ext
776
783
  if ("value" in i2) return i2.value;
777
784
  var r2 = i2.get;
778
785
  return void 0 !== r2 ? r2.call(s2) : void 0;
779
- }, ae = function(e4, t2) {
786
+ }, de = function(e4, t2) {
780
787
  if ("function" != typeof t2 && null !== t2) throw new TypeError("Super expression must either be null or a function, not " + typeof t2);
781
788
  e4.prototype = Object.create(t2 && t2.prototype, { constructor: { value: e4, enumerable: false, writable: true, configurable: true } }), t2 && (Object.setPrototypeOf ? Object.setPrototypeOf(e4, t2) : e4.__proto__ = t2);
782
- }, le = function(e4, t2) {
789
+ }, ce = function(e4, t2) {
783
790
  if (!e4) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
784
791
  return !t2 || "object" != typeof t2 && "function" != typeof t2 ? e4 : t2;
785
- }, de = function() {
792
+ }, he = function() {
786
793
  function e4() {
787
- if (ie(this, e4), this.__state = ee.apply(this, arguments), false === this.__state) throw new Error("Failed to interpret color arguments");
794
+ if (re(this, e4), this.__state = ne.apply(this, arguments), false === this.__state) throw new Error("Failed to interpret color arguments");
788
795
  this.__state.a = this.__state.a || 1;
789
796
  }
790
- return oe(e4, [{ key: "toString", value: function() {
791
- return J(this);
797
+ return ae(e4, [{ key: "toString", value: function() {
798
+ return K(this);
792
799
  } }, { key: "toHexString", value: function() {
793
- return J(this, true);
800
+ return K(this, true);
794
801
  } }, { key: "toOriginal", value: function() {
795
802
  return this.__state.conversion.write(this);
796
803
  } }]), e4;
797
804
  }();
798
- function ce(e4, t2, n2) {
805
+ function ue(e4, t2, n2) {
799
806
  Object.defineProperty(e4, t2, { get: function() {
800
- return "RGB" === this.__state.space || de.recalculateRGB(this, t2, n2), this.__state[t2];
807
+ return "RGB" === this.__state.space || he.recalculateRGB(this, t2, n2), this.__state[t2];
801
808
  }, set: function(e5) {
802
- "RGB" !== this.__state.space && (de.recalculateRGB(this, t2, n2), this.__state.space = "RGB"), this.__state[t2] = e5;
809
+ "RGB" !== this.__state.space && (he.recalculateRGB(this, t2, n2), this.__state.space = "RGB"), this.__state[t2] = e5;
803
810
  } });
804
811
  }
805
- function he(e4, t2) {
812
+ function me(e4, t2) {
806
813
  Object.defineProperty(e4, t2, { get: function() {
807
- return "HSV" === this.__state.space || de.recalculateHSV(this), this.__state[t2];
814
+ return "HSV" === this.__state.space || he.recalculateHSV(this), this.__state[t2];
808
815
  }, set: function(e5) {
809
- "HSV" !== this.__state.space && (de.recalculateHSV(this), this.__state.space = "HSV"), this.__state[t2] = e5;
816
+ "HSV" !== this.__state.space && (he.recalculateHSV(this), this.__state.space = "HSV"), this.__state[t2] = e5;
810
817
  } });
811
818
  }
812
- de.recalculateRGB = function(e4, t2, n2) {
813
- if ("HEX" === e4.__state.space) e4.__state[t2] = ne.component_from_hex(e4.__state.hex, n2);
819
+ he.recalculateRGB = function(e4, t2, n2) {
820
+ if ("HEX" === e4.__state.space) e4.__state[t2] = ie.component_from_hex(e4.__state.hex, n2);
814
821
  else {
815
822
  if ("HSV" !== e4.__state.space) throw new Error("Corrupted color state");
816
- Z.extend(e4.__state, ne.hsv_to_rgb(e4.__state.h, e4.__state.s, e4.__state.v));
823
+ Q.extend(e4.__state, ie.hsv_to_rgb(e4.__state.h, e4.__state.s, e4.__state.v));
817
824
  }
818
- }, de.recalculateHSV = function(e4) {
819
- var t2 = ne.rgb_to_hsv(e4.r, e4.g, e4.b);
820
- Z.extend(e4.__state, { s: t2.s, v: t2.v }), Z.isNaN(t2.h) ? Z.isUndefined(e4.__state.h) && (e4.__state.h = 0) : e4.__state.h = t2.h;
821
- }, de.COMPONENTS = ["r", "g", "b", "h", "s", "v", "hex", "a"], ce(de.prototype, "r", 2), ce(de.prototype, "g", 1), ce(de.prototype, "b", 0), he(de.prototype, "h"), he(de.prototype, "s"), he(de.prototype, "v"), Object.defineProperty(de.prototype, "a", { get: function() {
825
+ }, he.recalculateHSV = function(e4) {
826
+ var t2 = ie.rgb_to_hsv(e4.r, e4.g, e4.b);
827
+ Q.extend(e4.__state, { s: t2.s, v: t2.v }), Q.isNaN(t2.h) ? Q.isUndefined(e4.__state.h) && (e4.__state.h = 0) : e4.__state.h = t2.h;
828
+ }, he.COMPONENTS = ["r", "g", "b", "h", "s", "v", "hex", "a"], ue(he.prototype, "r", 2), ue(he.prototype, "g", 1), ue(he.prototype, "b", 0), me(he.prototype, "h"), me(he.prototype, "s"), me(he.prototype, "v"), Object.defineProperty(he.prototype, "a", { get: function() {
822
829
  return this.__state.a;
823
830
  }, set: function(e4) {
824
831
  this.__state.a = e4;
825
- } }), Object.defineProperty(de.prototype, "hex", { get: function() {
826
- return "HEX" !== this.__state.space && (this.__state.hex = ne.rgb_to_hex(this.r, this.g, this.b), this.__state.space = "HEX"), this.__state.hex;
832
+ } }), Object.defineProperty(he.prototype, "hex", { get: function() {
833
+ return "HEX" !== this.__state.space && (this.__state.hex = ie.rgb_to_hex(this.r, this.g, this.b), this.__state.space = "HEX"), this.__state.hex;
827
834
  }, set: function(e4) {
828
835
  this.__state.space = "HEX", this.__state.hex = e4;
829
836
  } });
830
- var ue = function() {
837
+ var pe = function() {
831
838
  function e4(t2, n2) {
832
- ie(this, e4), this.initialValue = t2[n2], this.domElement = document.createElement("div"), this.object = t2, this.property = n2, this.__onChange = void 0, this.__onFinishChange = void 0;
839
+ re(this, e4), this.initialValue = t2[n2], this.domElement = document.createElement("div"), this.object = t2, this.property = n2, this.__onChange = void 0, this.__onFinishChange = void 0;
833
840
  }
834
- return oe(e4, [{ key: "onChange", value: function(e5) {
841
+ return ae(e4, [{ key: "onChange", value: function(e5) {
835
842
  return this.__onChange = e5, this;
836
843
  } }, { key: "onFinishChange", value: function(e5) {
837
844
  return this.__onFinishChange = e5, this;
@@ -844,28 +851,28 @@ var ue = function() {
844
851
  } }, { key: "isModified", value: function() {
845
852
  return this.initialValue !== this.getValue();
846
853
  } }]), e4;
847
- }(), me = {};
848
- Z.each({ HTMLEvents: ["change"], MouseEvents: ["click", "mousemove", "mousedown", "mouseup", "mouseover"], KeyboardEvents: ["keydown"] }, function(e4, t2) {
849
- Z.each(e4, function(e5) {
850
- me[e5] = t2;
854
+ }(), fe = {};
855
+ Q.each({ HTMLEvents: ["change"], MouseEvents: ["click", "mousemove", "mousedown", "mouseup", "mouseover"], KeyboardEvents: ["keydown"] }, function(e4, t2) {
856
+ Q.each(e4, function(e5) {
857
+ fe[e5] = t2;
851
858
  });
852
859
  });
853
- var pe = /(\d+(\.\d+)?)px/;
854
- function fe(e4) {
855
- if ("0" === e4 || Z.isUndefined(e4)) return 0;
856
- var t2 = e4.match(pe);
857
- return Z.isNull(t2) ? 0 : parseFloat(t2[1]);
860
+ var ge = /(\d+(\.\d+)?)px/;
861
+ function _e(e4) {
862
+ if ("0" === e4 || Q.isUndefined(e4)) return 0;
863
+ var t2 = e4.match(ge);
864
+ return Q.isNull(t2) ? 0 : parseFloat(t2[1]);
858
865
  }
859
- var ge = { makeSelectable: function(e4, t2) {
866
+ var ve = { makeSelectable: function(e4, t2) {
860
867
  void 0 !== e4 && void 0 !== e4.style && (e4.onselectstart = t2 ? function() {
861
868
  return false;
862
869
  } : function() {
863
870
  }, e4.style.MozUserSelect = t2 ? "auto" : "none", e4.style.KhtmlUserSelect = t2 ? "auto" : "none", e4.unselectable = t2 ? "on" : "off");
864
871
  }, makeFullscreen: function(e4, t2, n2) {
865
872
  var s2 = n2, i2 = t2;
866
- Z.isUndefined(i2) && (i2 = true), Z.isUndefined(s2) && (s2 = true), e4.style.position = "absolute", i2 && (e4.style.left = 0, e4.style.right = 0), s2 && (e4.style.top = 0, e4.style.bottom = 0);
873
+ Q.isUndefined(i2) && (i2 = true), Q.isUndefined(s2) && (s2 = true), e4.style.position = "absolute", i2 && (e4.style.left = 0, e4.style.right = 0), s2 && (e4.style.top = 0, e4.style.bottom = 0);
867
874
  }, fakeEvent: function(e4, t2, n2, s2) {
868
- var i2 = n2 || {}, o2 = me[t2];
875
+ var i2 = n2 || {}, o2 = fe[t2];
869
876
  if (!o2) throw new Error("Event type " + t2 + " not supported.");
870
877
  var r2 = document.createEvent(o2);
871
878
  switch (o2) {
@@ -875,25 +882,25 @@ var ge = { makeSelectable: function(e4, t2) {
875
882
  break;
876
883
  case "KeyboardEvents":
877
884
  var d2 = r2.initKeyboardEvent || r2.initKeyEvent;
878
- Z.defaults(i2, { cancelable: true, ctrlKey: false, altKey: false, shiftKey: false, metaKey: false, keyCode: void 0, charCode: void 0 }), d2(t2, i2.bubbles || false, i2.cancelable, window, i2.ctrlKey, i2.altKey, i2.shiftKey, i2.metaKey, i2.keyCode, i2.charCode);
885
+ Q.defaults(i2, { cancelable: true, ctrlKey: false, altKey: false, shiftKey: false, metaKey: false, keyCode: void 0, charCode: void 0 }), d2(t2, i2.bubbles || false, i2.cancelable, window, i2.ctrlKey, i2.altKey, i2.shiftKey, i2.metaKey, i2.keyCode, i2.charCode);
879
886
  break;
880
887
  default:
881
888
  r2.initEvent(t2, i2.bubbles || false, i2.cancelable || true);
882
889
  }
883
- Z.defaults(r2, s2), e4.dispatchEvent(r2);
890
+ Q.defaults(r2, s2), e4.dispatchEvent(r2);
884
891
  }, bind: function(e4, t2, n2, s2) {
885
892
  var i2 = s2 || false;
886
- return e4.addEventListener ? e4.addEventListener(t2, n2, i2) : e4.attachEvent && e4.attachEvent("on" + t2, n2), ge;
893
+ return e4.addEventListener ? e4.addEventListener(t2, n2, i2) : e4.attachEvent && e4.attachEvent("on" + t2, n2), ve;
887
894
  }, unbind: function(e4, t2, n2, s2) {
888
895
  var i2 = s2 || false;
889
- return e4.removeEventListener ? e4.removeEventListener(t2, n2, i2) : e4.detachEvent && e4.detachEvent("on" + t2, n2), ge;
896
+ return e4.removeEventListener ? e4.removeEventListener(t2, n2, i2) : e4.detachEvent && e4.detachEvent("on" + t2, n2), ve;
890
897
  }, addClass: function(e4, t2) {
891
898
  if (void 0 === e4.className) e4.className = t2;
892
899
  else if (e4.className !== t2) {
893
900
  var n2 = e4.className.split(/ +/);
894
901
  -1 === n2.indexOf(t2) && (n2.push(t2), e4.className = n2.join(" ").replace(/^\s+/, "").replace(/\s+$/, ""));
895
902
  }
896
- return ge;
903
+ return ve;
897
904
  }, removeClass: function(e4, t2) {
898
905
  if (t2) if (e4.className === t2) e4.removeAttribute("class");
899
906
  else {
@@ -901,15 +908,15 @@ var ge = { makeSelectable: function(e4, t2) {
901
908
  -1 !== s2 && (n2.splice(s2, 1), e4.className = n2.join(" "));
902
909
  }
903
910
  else e4.className = void 0;
904
- return ge;
911
+ return ve;
905
912
  }, hasClass: function(e4, t2) {
906
913
  return new RegExp("(?:^|\\s+)" + t2 + "(?:\\s+|$)").test(e4.className) || false;
907
914
  }, getWidth: function(e4) {
908
915
  var t2 = getComputedStyle(e4);
909
- return fe(t2["border-left-width"]) + fe(t2["border-right-width"]) + fe(t2["padding-left"]) + fe(t2["padding-right"]) + fe(t2.width);
916
+ return _e(t2["border-left-width"]) + _e(t2["border-right-width"]) + _e(t2["padding-left"]) + _e(t2["padding-right"]) + _e(t2.width);
910
917
  }, getHeight: function(e4) {
911
918
  var t2 = getComputedStyle(e4);
912
- return fe(t2["border-top-width"]) + fe(t2["border-bottom-width"]) + fe(t2["padding-top"]) + fe(t2["padding-bottom"]) + fe(t2.height);
919
+ return _e(t2["border-top-width"]) + _e(t2["border-bottom-width"]) + _e(t2["padding-top"]) + _e(t2["padding-bottom"]) + _e(t2.height);
913
920
  }, getOffset: function(e4) {
914
921
  var t2 = e4, n2 = { left: 0, top: 0 };
915
922
  if (t2.offsetParent) do {
@@ -918,86 +925,86 @@ var ge = { makeSelectable: function(e4, t2) {
918
925
  return n2;
919
926
  }, isActive: function(e4) {
920
927
  return e4 === document.activeElement && (e4.type || e4.href);
921
- } }, _e = function() {
928
+ } }, be = function() {
922
929
  function e4(t2, n2) {
923
- ie(this, e4);
924
- var s2 = le(this, (e4.__proto__ || Object.getPrototypeOf(e4)).call(this, t2, n2)), i2 = s2;
925
- return s2.__prev = s2.getValue(), s2.__checkbox = document.createElement("input"), s2.__checkbox.setAttribute("type", "checkbox"), ge.bind(s2.__checkbox, "change", function() {
930
+ re(this, e4);
931
+ var s2 = ce(this, (e4.__proto__ || Object.getPrototypeOf(e4)).call(this, t2, n2)), i2 = s2;
932
+ return s2.__prev = s2.getValue(), s2.__checkbox = document.createElement("input"), s2.__checkbox.setAttribute("type", "checkbox"), ve.bind(s2.__checkbox, "change", function() {
926
933
  i2.setValue(!i2.__prev);
927
934
  }, false), s2.domElement.appendChild(s2.__checkbox), s2.updateDisplay(), s2;
928
935
  }
929
- return ae(e4, ue), oe(e4, [{ key: "setValue", value: function(t2) {
930
- var n2 = re(e4.prototype.__proto__ || Object.getPrototypeOf(e4.prototype), "setValue", this).call(this, t2);
936
+ return de(e4, pe), ae(e4, [{ key: "setValue", value: function(t2) {
937
+ var n2 = le(e4.prototype.__proto__ || Object.getPrototypeOf(e4.prototype), "setValue", this).call(this, t2);
931
938
  return this.__onFinishChange && this.__onFinishChange.call(this, this.getValue()), this.__prev = this.getValue(), n2;
932
939
  } }, { key: "updateDisplay", value: function() {
933
- return true === this.getValue() ? (this.__checkbox.setAttribute("checked", "checked"), this.__checkbox.checked = true, this.__prev = true) : (this.__checkbox.checked = false, this.__prev = false), re(e4.prototype.__proto__ || Object.getPrototypeOf(e4.prototype), "updateDisplay", this).call(this);
940
+ return true === this.getValue() ? (this.__checkbox.setAttribute("checked", "checked"), this.__checkbox.checked = true, this.__prev = true) : (this.__checkbox.checked = false, this.__prev = false), le(e4.prototype.__proto__ || Object.getPrototypeOf(e4.prototype), "updateDisplay", this).call(this);
934
941
  } }]), e4;
935
- }(), ve = function() {
942
+ }(), ye = function() {
936
943
  function e4(t2, n2, s2) {
937
- ie(this, e4);
938
- var i2 = le(this, (e4.__proto__ || Object.getPrototypeOf(e4)).call(this, t2, n2)), o2 = s2, r2 = i2;
939
- if (i2.__select = document.createElement("select"), Z.isArray(o2)) {
944
+ re(this, e4);
945
+ var i2 = ce(this, (e4.__proto__ || Object.getPrototypeOf(e4)).call(this, t2, n2)), o2 = s2, r2 = i2;
946
+ if (i2.__select = document.createElement("select"), Q.isArray(o2)) {
940
947
  var a2 = {};
941
- Z.each(o2, function(e5) {
948
+ Q.each(o2, function(e5) {
942
949
  a2[e5] = e5;
943
950
  }), o2 = a2;
944
951
  }
945
- return Z.each(o2, function(e5, t3) {
952
+ return Q.each(o2, function(e5, t3) {
946
953
  var n3 = document.createElement("option");
947
954
  n3.innerHTML = t3, n3.setAttribute("value", e5), r2.__select.appendChild(n3);
948
- }), i2.updateDisplay(), ge.bind(i2.__select, "change", function() {
955
+ }), i2.updateDisplay(), ve.bind(i2.__select, "change", function() {
949
956
  var e5 = this.options[this.selectedIndex].value;
950
957
  r2.setValue(e5);
951
958
  }), i2.domElement.appendChild(i2.__select), i2;
952
959
  }
953
- return ae(e4, ue), oe(e4, [{ key: "setValue", value: function(t2) {
954
- var n2 = re(e4.prototype.__proto__ || Object.getPrototypeOf(e4.prototype), "setValue", this).call(this, t2);
960
+ return de(e4, pe), ae(e4, [{ key: "setValue", value: function(t2) {
961
+ var n2 = le(e4.prototype.__proto__ || Object.getPrototypeOf(e4.prototype), "setValue", this).call(this, t2);
955
962
  return this.__onFinishChange && this.__onFinishChange.call(this, this.getValue()), n2;
956
963
  } }, { key: "updateDisplay", value: function() {
957
- return ge.isActive(this.__select) ? this : (this.__select.value = this.getValue(), re(e4.prototype.__proto__ || Object.getPrototypeOf(e4.prototype), "updateDisplay", this).call(this));
964
+ return ve.isActive(this.__select) ? this : (this.__select.value = this.getValue(), le(e4.prototype.__proto__ || Object.getPrototypeOf(e4.prototype), "updateDisplay", this).call(this));
958
965
  } }]), e4;
959
- }(), be = function() {
966
+ }(), we = function() {
960
967
  function e4(t2, n2) {
961
- ie(this, e4);
962
- var s2 = le(this, (e4.__proto__ || Object.getPrototypeOf(e4)).call(this, t2, n2)), i2 = s2;
968
+ re(this, e4);
969
+ var s2 = ce(this, (e4.__proto__ || Object.getPrototypeOf(e4)).call(this, t2, n2)), i2 = s2;
963
970
  function o2() {
964
971
  i2.setValue(i2.__input.value);
965
972
  }
966
- return s2.__input = document.createElement("input"), s2.__input.setAttribute("type", "text"), ge.bind(s2.__input, "keyup", o2), ge.bind(s2.__input, "change", o2), ge.bind(s2.__input, "blur", function() {
973
+ return s2.__input = document.createElement("input"), s2.__input.setAttribute("type", "text"), ve.bind(s2.__input, "keyup", o2), ve.bind(s2.__input, "change", o2), ve.bind(s2.__input, "blur", function() {
967
974
  i2.__onFinishChange && i2.__onFinishChange.call(i2, i2.getValue());
968
- }), ge.bind(s2.__input, "keydown", function(e5) {
975
+ }), ve.bind(s2.__input, "keydown", function(e5) {
969
976
  13 === e5.keyCode && this.blur();
970
977
  }), s2.updateDisplay(), s2.domElement.appendChild(s2.__input), s2;
971
978
  }
972
- return ae(e4, ue), oe(e4, [{ key: "updateDisplay", value: function() {
973
- return ge.isActive(this.__input) || (this.__input.value = this.getValue()), re(e4.prototype.__proto__ || Object.getPrototypeOf(e4.prototype), "updateDisplay", this).call(this);
979
+ return de(e4, pe), ae(e4, [{ key: "updateDisplay", value: function() {
980
+ return ve.isActive(this.__input) || (this.__input.value = this.getValue()), le(e4.prototype.__proto__ || Object.getPrototypeOf(e4.prototype), "updateDisplay", this).call(this);
974
981
  } }]), e4;
975
982
  }();
976
- function ye(e4) {
983
+ function xe(e4) {
977
984
  var t2 = e4.toString();
978
985
  return t2.indexOf(".") > -1 ? t2.length - t2.indexOf(".") - 1 : 0;
979
986
  }
980
- var we = function() {
987
+ var Ce = function() {
981
988
  function e4(t2, n2, s2) {
982
- ie(this, e4);
983
- var i2 = le(this, (e4.__proto__ || Object.getPrototypeOf(e4)).call(this, t2, n2)), o2 = s2 || {};
984
- return i2.__min = o2.min, i2.__max = o2.max, i2.__step = o2.step, Z.isUndefined(i2.__step) ? 0 === i2.initialValue ? i2.__impliedStep = 1 : i2.__impliedStep = Math.pow(10, Math.floor(Math.log(Math.abs(i2.initialValue)) / Math.LN10)) / 10 : i2.__impliedStep = i2.__step, i2.__precision = ye(i2.__impliedStep), i2;
989
+ re(this, e4);
990
+ var i2 = ce(this, (e4.__proto__ || Object.getPrototypeOf(e4)).call(this, t2, n2)), o2 = s2 || {};
991
+ return i2.__min = o2.min, i2.__max = o2.max, i2.__step = o2.step, Q.isUndefined(i2.__step) ? 0 === i2.initialValue ? i2.__impliedStep = 1 : i2.__impliedStep = Math.pow(10, Math.floor(Math.log(Math.abs(i2.initialValue)) / Math.LN10)) / 10 : i2.__impliedStep = i2.__step, i2.__precision = xe(i2.__impliedStep), i2;
985
992
  }
986
- return ae(e4, ue), oe(e4, [{ key: "setValue", value: function(t2) {
993
+ return de(e4, pe), ae(e4, [{ key: "setValue", value: function(t2) {
987
994
  var n2 = t2;
988
- return void 0 !== this.__min && n2 < this.__min ? n2 = this.__min : void 0 !== this.__max && n2 > this.__max && (n2 = this.__max), void 0 !== this.__step && n2 % this.__step !== 0 && (n2 = Math.round(n2 / this.__step) * this.__step), re(e4.prototype.__proto__ || Object.getPrototypeOf(e4.prototype), "setValue", this).call(this, n2);
995
+ return void 0 !== this.__min && n2 < this.__min ? n2 = this.__min : void 0 !== this.__max && n2 > this.__max && (n2 = this.__max), void 0 !== this.__step && n2 % this.__step !== 0 && (n2 = Math.round(n2 / this.__step) * this.__step), le(e4.prototype.__proto__ || Object.getPrototypeOf(e4.prototype), "setValue", this).call(this, n2);
989
996
  } }, { key: "min", value: function(e5) {
990
997
  return this.__min = e5, this;
991
998
  } }, { key: "max", value: function(e5) {
992
999
  return this.__max = e5, this;
993
1000
  } }, { key: "step", value: function(e5) {
994
- return this.__step = e5, this.__impliedStep = e5, this.__precision = ye(e5), this;
1001
+ return this.__step = e5, this.__impliedStep = e5, this.__precision = xe(e5), this;
995
1002
  } }]), e4;
996
1003
  }();
997
- var xe = function() {
1004
+ var Me = function() {
998
1005
  function e4(t2, n2, s2) {
999
- ie(this, e4);
1000
- var i2 = le(this, (e4.__proto__ || Object.getPrototypeOf(e4)).call(this, t2, n2, s2));
1006
+ re(this, e4);
1007
+ var i2 = ce(this, (e4.__proto__ || Object.getPrototypeOf(e4)).call(this, t2, n2, s2));
1001
1008
  i2.__truncationSuspended = false;
1002
1009
  var o2 = i2, r2 = void 0;
1003
1010
  function a2() {
@@ -1008,100 +1015,100 @@ var xe = function() {
1008
1015
  o2.setValue(o2.getValue() + t3 * o2.__impliedStep), r2 = e5.clientY;
1009
1016
  }
1010
1017
  function d2() {
1011
- ge.unbind(window, "mousemove", l2), ge.unbind(window, "mouseup", d2), a2();
1018
+ ve.unbind(window, "mousemove", l2), ve.unbind(window, "mouseup", d2), a2();
1012
1019
  }
1013
- return i2.__input = document.createElement("input"), i2.__input.setAttribute("type", "text"), ge.bind(i2.__input, "change", function() {
1020
+ return i2.__input = document.createElement("input"), i2.__input.setAttribute("type", "text"), ve.bind(i2.__input, "change", function() {
1014
1021
  var e5 = parseFloat(o2.__input.value);
1015
- Z.isNaN(e5) || o2.setValue(e5);
1016
- }), ge.bind(i2.__input, "blur", function() {
1022
+ Q.isNaN(e5) || o2.setValue(e5);
1023
+ }), ve.bind(i2.__input, "blur", function() {
1017
1024
  a2();
1018
- }), ge.bind(i2.__input, "mousedown", function(e5) {
1019
- ge.bind(window, "mousemove", l2), ge.bind(window, "mouseup", d2), r2 = e5.clientY;
1020
- }), ge.bind(i2.__input, "keydown", function(e5) {
1025
+ }), ve.bind(i2.__input, "mousedown", function(e5) {
1026
+ ve.bind(window, "mousemove", l2), ve.bind(window, "mouseup", d2), r2 = e5.clientY;
1027
+ }), ve.bind(i2.__input, "keydown", function(e5) {
1021
1028
  13 === e5.keyCode && (o2.__truncationSuspended = true, this.blur(), o2.__truncationSuspended = false, a2());
1022
1029
  }), i2.updateDisplay(), i2.domElement.appendChild(i2.__input), i2;
1023
1030
  }
1024
- return ae(e4, we), oe(e4, [{ key: "updateDisplay", value: function() {
1031
+ return de(e4, Ce), ae(e4, [{ key: "updateDisplay", value: function() {
1025
1032
  var t2, n2, s2;
1026
- return this.__input.value = this.__truncationSuspended ? this.getValue() : (t2 = this.getValue(), n2 = this.__precision, s2 = Math.pow(10, n2), Math.round(t2 * s2) / s2), re(e4.prototype.__proto__ || Object.getPrototypeOf(e4.prototype), "updateDisplay", this).call(this);
1033
+ return this.__input.value = this.__truncationSuspended ? this.getValue() : (t2 = this.getValue(), n2 = this.__precision, s2 = Math.pow(10, n2), Math.round(t2 * s2) / s2), le(e4.prototype.__proto__ || Object.getPrototypeOf(e4.prototype), "updateDisplay", this).call(this);
1027
1034
  } }]), e4;
1028
1035
  }();
1029
- function Ce(e4, t2, n2, s2, i2) {
1036
+ function Pe(e4, t2, n2, s2, i2) {
1030
1037
  return s2 + (e4 - t2) / (n2 - t2) * (i2 - s2);
1031
1038
  }
1032
- var Me = function() {
1039
+ var Se = function() {
1033
1040
  function e4(t2, n2, s2, i2, o2) {
1034
- ie(this, e4);
1035
- var r2 = le(this, (e4.__proto__ || Object.getPrototypeOf(e4)).call(this, t2, n2, { min: s2, max: i2, step: o2 })), a2 = r2;
1041
+ re(this, e4);
1042
+ var r2 = ce(this, (e4.__proto__ || Object.getPrototypeOf(e4)).call(this, t2, n2, { min: s2, max: i2, step: o2 })), a2 = r2;
1036
1043
  function l2(e5) {
1037
1044
  e5.preventDefault();
1038
1045
  var t3 = a2.__background.getBoundingClientRect();
1039
- return a2.setValue(Ce(e5.clientX, t3.left, t3.right, a2.__min, a2.__max)), false;
1046
+ return a2.setValue(Pe(e5.clientX, t3.left, t3.right, a2.__min, a2.__max)), false;
1040
1047
  }
1041
1048
  function d2() {
1042
- ge.unbind(window, "mousemove", l2), ge.unbind(window, "mouseup", d2), a2.__onFinishChange && a2.__onFinishChange.call(a2, a2.getValue());
1049
+ ve.unbind(window, "mousemove", l2), ve.unbind(window, "mouseup", d2), a2.__onFinishChange && a2.__onFinishChange.call(a2, a2.getValue());
1043
1050
  }
1044
1051
  function c2(e5) {
1045
1052
  var t3 = e5.touches[0].clientX, n3 = a2.__background.getBoundingClientRect();
1046
- a2.setValue(Ce(t3, n3.left, n3.right, a2.__min, a2.__max));
1053
+ a2.setValue(Pe(t3, n3.left, n3.right, a2.__min, a2.__max));
1047
1054
  }
1048
1055
  function h2() {
1049
- ge.unbind(window, "touchmove", c2), ge.unbind(window, "touchend", h2), a2.__onFinishChange && a2.__onFinishChange.call(a2, a2.getValue());
1056
+ ve.unbind(window, "touchmove", c2), ve.unbind(window, "touchend", h2), a2.__onFinishChange && a2.__onFinishChange.call(a2, a2.getValue());
1050
1057
  }
1051
- return r2.__background = document.createElement("div"), r2.__foreground = document.createElement("div"), ge.bind(r2.__background, "mousedown", function(e5) {
1052
- document.activeElement.blur(), ge.bind(window, "mousemove", l2), ge.bind(window, "mouseup", d2), l2(e5);
1053
- }), ge.bind(r2.__background, "touchstart", function(e5) {
1058
+ return r2.__background = document.createElement("div"), r2.__foreground = document.createElement("div"), ve.bind(r2.__background, "mousedown", function(e5) {
1059
+ document.activeElement.blur(), ve.bind(window, "mousemove", l2), ve.bind(window, "mouseup", d2), l2(e5);
1060
+ }), ve.bind(r2.__background, "touchstart", function(e5) {
1054
1061
  if (1 !== e5.touches.length) return;
1055
- ge.bind(window, "touchmove", c2), ge.bind(window, "touchend", h2), c2(e5);
1056
- }), ge.addClass(r2.__background, "slider"), ge.addClass(r2.__foreground, "slider-fg"), r2.updateDisplay(), r2.__background.appendChild(r2.__foreground), r2.domElement.appendChild(r2.__background), r2;
1062
+ ve.bind(window, "touchmove", c2), ve.bind(window, "touchend", h2), c2(e5);
1063
+ }), ve.addClass(r2.__background, "slider"), ve.addClass(r2.__foreground, "slider-fg"), r2.updateDisplay(), r2.__background.appendChild(r2.__foreground), r2.domElement.appendChild(r2.__background), r2;
1057
1064
  }
1058
- return ae(e4, we), oe(e4, [{ key: "updateDisplay", value: function() {
1065
+ return de(e4, Ce), ae(e4, [{ key: "updateDisplay", value: function() {
1059
1066
  var t2 = (this.getValue() - this.__min) / (this.__max - this.__min);
1060
- return this.__foreground.style.width = 100 * t2 + "%", re(e4.prototype.__proto__ || Object.getPrototypeOf(e4.prototype), "updateDisplay", this).call(this);
1067
+ return this.__foreground.style.width = 100 * t2 + "%", le(e4.prototype.__proto__ || Object.getPrototypeOf(e4.prototype), "updateDisplay", this).call(this);
1061
1068
  } }]), e4;
1062
- }(), Pe = function() {
1069
+ }(), Fe = function() {
1063
1070
  function e4(t2, n2, s2) {
1064
- ie(this, e4);
1065
- var i2 = le(this, (e4.__proto__ || Object.getPrototypeOf(e4)).call(this, t2, n2)), o2 = i2;
1066
- return i2.__button = document.createElement("div"), i2.__button.innerHTML = void 0 === s2 ? "Fire" : s2, ge.bind(i2.__button, "click", function(e5) {
1071
+ re(this, e4);
1072
+ var i2 = ce(this, (e4.__proto__ || Object.getPrototypeOf(e4)).call(this, t2, n2)), o2 = i2;
1073
+ return i2.__button = document.createElement("div"), i2.__button.innerHTML = void 0 === s2 ? "Fire" : s2, ve.bind(i2.__button, "click", function(e5) {
1067
1074
  return e5.preventDefault(), o2.fire(), false;
1068
- }), ge.addClass(i2.__button, "button"), i2.domElement.appendChild(i2.__button), i2;
1075
+ }), ve.addClass(i2.__button, "button"), i2.domElement.appendChild(i2.__button), i2;
1069
1076
  }
1070
- return ae(e4, ue), oe(e4, [{ key: "fire", value: function() {
1077
+ return de(e4, pe), ae(e4, [{ key: "fire", value: function() {
1071
1078
  this.__onChange && this.__onChange.call(this), this.getValue().call(this.object), this.__onFinishChange && this.__onFinishChange.call(this, this.getValue());
1072
1079
  } }]), e4;
1073
- }(), Se = function() {
1080
+ }(), Ee = function() {
1074
1081
  function e4(t2, n2) {
1075
- ie(this, e4);
1076
- var s2 = le(this, (e4.__proto__ || Object.getPrototypeOf(e4)).call(this, t2, n2));
1077
- s2.__color = new de(s2.getValue()), s2.__temp = new de(0);
1082
+ re(this, e4);
1083
+ var s2 = ce(this, (e4.__proto__ || Object.getPrototypeOf(e4)).call(this, t2, n2));
1084
+ s2.__color = new he(s2.getValue()), s2.__temp = new he(0);
1078
1085
  var i2 = s2;
1079
- s2.domElement = document.createElement("div"), ge.makeSelectable(s2.domElement, false), s2.__selector = document.createElement("div"), s2.__selector.className = "selector", s2.__saturation_field = document.createElement("div"), s2.__saturation_field.className = "saturation-field", s2.__field_knob = document.createElement("div"), s2.__field_knob.className = "field-knob", s2.__field_knob_border = "2px solid ", s2.__hue_knob = document.createElement("div"), s2.__hue_knob.className = "hue-knob", s2.__hue_field = document.createElement("div"), s2.__hue_field.className = "hue-field", s2.__input = document.createElement("input"), s2.__input.type = "text", s2.__input_textShadow = "0 1px 1px ", ge.bind(s2.__input, "keydown", function(e5) {
1086
+ s2.domElement = document.createElement("div"), ve.makeSelectable(s2.domElement, false), s2.__selector = document.createElement("div"), s2.__selector.className = "selector", s2.__saturation_field = document.createElement("div"), s2.__saturation_field.className = "saturation-field", s2.__field_knob = document.createElement("div"), s2.__field_knob.className = "field-knob", s2.__field_knob_border = "2px solid ", s2.__hue_knob = document.createElement("div"), s2.__hue_knob.className = "hue-knob", s2.__hue_field = document.createElement("div"), s2.__hue_field.className = "hue-field", s2.__input = document.createElement("input"), s2.__input.type = "text", s2.__input_textShadow = "0 1px 1px ", ve.bind(s2.__input, "keydown", function(e5) {
1080
1087
  13 === e5.keyCode && h2.call(this);
1081
- }), ge.bind(s2.__input, "blur", h2), ge.bind(s2.__selector, "mousedown", function() {
1082
- ge.addClass(this, "drag").bind(window, "mouseup", function() {
1083
- ge.removeClass(i2.__selector, "drag");
1088
+ }), ve.bind(s2.__input, "blur", h2), ve.bind(s2.__selector, "mousedown", function() {
1089
+ ve.addClass(this, "drag").bind(window, "mouseup", function() {
1090
+ ve.removeClass(i2.__selector, "drag");
1084
1091
  });
1085
- }), ge.bind(s2.__selector, "touchstart", function() {
1086
- ge.addClass(this, "drag").bind(window, "touchend", function() {
1087
- ge.removeClass(i2.__selector, "drag");
1092
+ }), ve.bind(s2.__selector, "touchstart", function() {
1093
+ ve.addClass(this, "drag").bind(window, "touchend", function() {
1094
+ ve.removeClass(i2.__selector, "drag");
1088
1095
  });
1089
1096
  });
1090
1097
  var o2, r2 = document.createElement("div");
1091
1098
  function a2(e5) {
1092
- m2(e5), ge.bind(window, "mousemove", m2), ge.bind(window, "touchmove", m2), ge.bind(window, "mouseup", d2), ge.bind(window, "touchend", d2);
1099
+ m2(e5), ve.bind(window, "mousemove", m2), ve.bind(window, "touchmove", m2), ve.bind(window, "mouseup", d2), ve.bind(window, "touchend", d2);
1093
1100
  }
1094
1101
  function l2(e5) {
1095
- p2(e5), ge.bind(window, "mousemove", p2), ge.bind(window, "touchmove", p2), ge.bind(window, "mouseup", c2), ge.bind(window, "touchend", c2);
1102
+ p2(e5), ve.bind(window, "mousemove", p2), ve.bind(window, "touchmove", p2), ve.bind(window, "mouseup", c2), ve.bind(window, "touchend", c2);
1096
1103
  }
1097
1104
  function d2() {
1098
- ge.unbind(window, "mousemove", m2), ge.unbind(window, "touchmove", m2), ge.unbind(window, "mouseup", d2), ge.unbind(window, "touchend", d2), u2();
1105
+ ve.unbind(window, "mousemove", m2), ve.unbind(window, "touchmove", m2), ve.unbind(window, "mouseup", d2), ve.unbind(window, "touchend", d2), u2();
1099
1106
  }
1100
1107
  function c2() {
1101
- ge.unbind(window, "mousemove", p2), ge.unbind(window, "touchmove", p2), ge.unbind(window, "mouseup", c2), ge.unbind(window, "touchend", c2), u2();
1108
+ ve.unbind(window, "mousemove", p2), ve.unbind(window, "touchmove", p2), ve.unbind(window, "mouseup", c2), ve.unbind(window, "touchend", c2), u2();
1102
1109
  }
1103
1110
  function h2() {
1104
- var e5 = ee(this.value);
1111
+ var e5 = ne(this.value);
1105
1112
  false !== e5 ? (i2.__color.__state = e5, i2.setValue(i2.__color.toOriginal())) : this.value = i2.__color.toString();
1106
1113
  }
1107
1114
  function u2() {
@@ -1117,27 +1124,27 @@ var Me = function() {
1117
1124
  var t3 = i2.__hue_field.getBoundingClientRect(), n3 = 1 - ((e5.touches && e5.touches[0] || e5).clientY - t3.top) / (t3.bottom - t3.top);
1118
1125
  return n3 > 1 ? n3 = 1 : n3 < 0 && (n3 = 0), i2.__color.h = 360 * n3, i2.setValue(i2.__color.toOriginal()), false;
1119
1126
  }
1120
- return Z.extend(s2.__selector.style, { width: "122px", height: "102px", padding: "3px", backgroundColor: "#222", boxShadow: "0px 1px 3px rgba(0,0,0,0.3)" }), Z.extend(s2.__field_knob.style, { position: "absolute", width: "12px", height: "12px", border: s2.__field_knob_border + (s2.__color.v < 0.5 ? "#fff" : "#000"), boxShadow: "0px 1px 3px rgba(0,0,0,0.5)", borderRadius: "12px", zIndex: 1 }), Z.extend(s2.__hue_knob.style, { position: "absolute", width: "15px", height: "2px", borderRight: "4px solid #fff", zIndex: 1 }), Z.extend(s2.__saturation_field.style, { width: "100px", height: "100px", border: "1px solid #555", marginRight: "3px", display: "inline-block", cursor: "pointer" }), Z.extend(r2.style, { width: "100%", height: "100%", background: "none" }), Ee(r2, "top", "rgba(0,0,0,0)", "#000"), Z.extend(s2.__hue_field.style, { width: "15px", height: "100px", border: "1px solid #555", cursor: "ns-resize", position: "absolute", top: "3px", right: "3px" }), (o2 = s2.__hue_field).style.background = "", o2.style.cssText += "background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);", o2.style.cssText += "background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);", o2.style.cssText += "background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);", o2.style.cssText += "background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);", o2.style.cssText += "background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);", Z.extend(s2.__input.style, { outline: "none", textAlign: "center", color: "#fff", border: 0, fontWeight: "bold", textShadow: s2.__input_textShadow + "rgba(0,0,0,0.7)" }), ge.bind(s2.__saturation_field, "mousedown", a2), ge.bind(s2.__saturation_field, "touchstart", a2), ge.bind(s2.__field_knob, "mousedown", a2), ge.bind(s2.__field_knob, "touchstart", a2), ge.bind(s2.__hue_field, "mousedown", l2), ge.bind(s2.__hue_field, "touchstart", l2), s2.__saturation_field.appendChild(r2), s2.__selector.appendChild(s2.__field_knob), s2.__selector.appendChild(s2.__saturation_field), s2.__selector.appendChild(s2.__hue_field), s2.__hue_field.appendChild(s2.__hue_knob), s2.domElement.appendChild(s2.__input), s2.domElement.appendChild(s2.__selector), s2.updateDisplay(), s2;
1127
+ return Q.extend(s2.__selector.style, { width: "122px", height: "102px", padding: "3px", backgroundColor: "#222", boxShadow: "0px 1px 3px rgba(0,0,0,0.3)" }), Q.extend(s2.__field_knob.style, { position: "absolute", width: "12px", height: "12px", border: s2.__field_knob_border + (s2.__color.v < 0.5 ? "#fff" : "#000"), boxShadow: "0px 1px 3px rgba(0,0,0,0.5)", borderRadius: "12px", zIndex: 1 }), Q.extend(s2.__hue_knob.style, { position: "absolute", width: "15px", height: "2px", borderRight: "4px solid #fff", zIndex: 1 }), Q.extend(s2.__saturation_field.style, { width: "100px", height: "100px", border: "1px solid #555", marginRight: "3px", display: "inline-block", cursor: "pointer" }), Q.extend(r2.style, { width: "100%", height: "100%", background: "none" }), ke(r2, "top", "rgba(0,0,0,0)", "#000"), Q.extend(s2.__hue_field.style, { width: "15px", height: "100px", border: "1px solid #555", cursor: "ns-resize", position: "absolute", top: "3px", right: "3px" }), (o2 = s2.__hue_field).style.background = "", o2.style.cssText += "background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);", o2.style.cssText += "background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);", o2.style.cssText += "background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);", o2.style.cssText += "background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);", o2.style.cssText += "background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);", Q.extend(s2.__input.style, { outline: "none", textAlign: "center", color: "#fff", border: 0, fontWeight: "bold", textShadow: s2.__input_textShadow + "rgba(0,0,0,0.7)" }), ve.bind(s2.__saturation_field, "mousedown", a2), ve.bind(s2.__saturation_field, "touchstart", a2), ve.bind(s2.__field_knob, "mousedown", a2), ve.bind(s2.__field_knob, "touchstart", a2), ve.bind(s2.__hue_field, "mousedown", l2), ve.bind(s2.__hue_field, "touchstart", l2), s2.__saturation_field.appendChild(r2), s2.__selector.appendChild(s2.__field_knob), s2.__selector.appendChild(s2.__saturation_field), s2.__selector.appendChild(s2.__hue_field), s2.__hue_field.appendChild(s2.__hue_knob), s2.domElement.appendChild(s2.__input), s2.domElement.appendChild(s2.__selector), s2.updateDisplay(), s2;
1121
1128
  }
1122
- return ae(e4, ue), oe(e4, [{ key: "updateDisplay", value: function() {
1123
- var e5 = ee(this.getValue());
1129
+ return de(e4, pe), ae(e4, [{ key: "updateDisplay", value: function() {
1130
+ var e5 = ne(this.getValue());
1124
1131
  if (false !== e5) {
1125
1132
  var t2 = false;
1126
- Z.each(de.COMPONENTS, function(n3) {
1127
- if (!Z.isUndefined(e5[n3]) && !Z.isUndefined(this.__color.__state[n3]) && e5[n3] !== this.__color.__state[n3]) return t2 = true, {};
1128
- }, this), t2 && Z.extend(this.__color.__state, e5);
1133
+ Q.each(he.COMPONENTS, function(n3) {
1134
+ if (!Q.isUndefined(e5[n3]) && !Q.isUndefined(this.__color.__state[n3]) && e5[n3] !== this.__color.__state[n3]) return t2 = true, {};
1135
+ }, this), t2 && Q.extend(this.__color.__state, e5);
1129
1136
  }
1130
- Z.extend(this.__temp.__state, this.__color.__state), this.__temp.a = 1;
1137
+ Q.extend(this.__temp.__state, this.__color.__state), this.__temp.a = 1;
1131
1138
  var n2 = this.__color.v < 0.5 || this.__color.s > 0.5 ? 255 : 0, s2 = 255 - n2;
1132
- Z.extend(this.__field_knob.style, { marginLeft: 100 * this.__color.s - 7 + "px", marginTop: 100 * (1 - this.__color.v) - 7 + "px", backgroundColor: this.__temp.toHexString(), border: this.__field_knob_border + "rgb(" + n2 + "," + n2 + "," + n2 + ")" }), this.__hue_knob.style.marginTop = 100 * (1 - this.__color.h / 360) + "px", this.__temp.s = 1, this.__temp.v = 1, Ee(this.__saturation_field, "left", "#fff", this.__temp.toHexString()), this.__input.value = this.__color.toString(), Z.extend(this.__input.style, { backgroundColor: this.__color.toHexString(), color: "rgb(" + n2 + "," + n2 + "," + n2 + ")", textShadow: this.__input_textShadow + "rgba(" + s2 + "," + s2 + "," + s2 + ",.7)" });
1139
+ Q.extend(this.__field_knob.style, { marginLeft: 100 * this.__color.s - 7 + "px", marginTop: 100 * (1 - this.__color.v) - 7 + "px", backgroundColor: this.__temp.toHexString(), border: this.__field_knob_border + "rgb(" + n2 + "," + n2 + "," + n2 + ")" }), this.__hue_knob.style.marginTop = 100 * (1 - this.__color.h / 360) + "px", this.__temp.s = 1, this.__temp.v = 1, ke(this.__saturation_field, "left", "#fff", this.__temp.toHexString()), this.__input.value = this.__color.toString(), Q.extend(this.__input.style, { backgroundColor: this.__color.toHexString(), color: "rgb(" + n2 + "," + n2 + "," + n2 + ")", textShadow: this.__input_textShadow + "rgba(" + s2 + "," + s2 + "," + s2 + ",.7)" });
1133
1140
  } }]), e4;
1134
- }(), Fe = ["-moz-", "-o-", "-webkit-", "-ms-", ""];
1135
- function Ee(e4, t2, n2, s2) {
1136
- e4.style.background = "", Z.each(Fe, function(i2) {
1141
+ }(), Ae = ["-moz-", "-o-", "-webkit-", "-ms-", ""];
1142
+ function ke(e4, t2, n2, s2) {
1143
+ e4.style.background = "", Q.each(Ae, function(i2) {
1137
1144
  e4.style.cssText += "background: " + i2 + "linear-gradient(" + t2 + ", " + n2 + " 0%, " + s2 + " 100%); ";
1138
1145
  });
1139
1146
  }
1140
- var Ae = function(e4, t2) {
1147
+ var Te = function(e4, t2) {
1141
1148
  var n2 = t2 || document, s2 = document.createElement("style");
1142
1149
  s2.type = "text/css", s2.innerHTML = e4;
1143
1150
  var i2 = n2.getElementsByTagName("head")[0];
@@ -1145,50 +1152,50 @@ var Ae = function(e4, t2) {
1145
1152
  i2.appendChild(s2);
1146
1153
  } catch (e5) {
1147
1154
  }
1148
- }, ke = function(e4, t2) {
1155
+ }, Le = function(e4, t2) {
1149
1156
  var n2 = e4[t2];
1150
- return Z.isArray(arguments[2]) || Z.isObject(arguments[2]) ? new ve(e4, t2, arguments[2]) : Z.isNumber(n2) ? Z.isNumber(arguments[2]) && Z.isNumber(arguments[3]) ? Z.isNumber(arguments[4]) ? new Me(e4, t2, arguments[2], arguments[3], arguments[4]) : new Me(e4, t2, arguments[2], arguments[3]) : Z.isNumber(arguments[4]) ? new xe(e4, t2, { min: arguments[2], max: arguments[3], step: arguments[4] }) : new xe(e4, t2, { min: arguments[2], max: arguments[3] }) : Z.isString(n2) ? new be(e4, t2) : Z.isFunction(n2) ? new Pe(e4, t2, "") : Z.isBoolean(n2) ? new _e(e4, t2) : null;
1157
+ return Q.isArray(arguments[2]) || Q.isObject(arguments[2]) ? new ye(e4, t2, arguments[2]) : Q.isNumber(n2) ? Q.isNumber(arguments[2]) && Q.isNumber(arguments[3]) ? Q.isNumber(arguments[4]) ? new Se(e4, t2, arguments[2], arguments[3], arguments[4]) : new Se(e4, t2, arguments[2], arguments[3]) : Q.isNumber(arguments[4]) ? new Me(e4, t2, { min: arguments[2], max: arguments[3], step: arguments[4] }) : new Me(e4, t2, { min: arguments[2], max: arguments[3] }) : Q.isString(n2) ? new we(e4, t2) : Q.isFunction(n2) ? new Fe(e4, t2, "") : Q.isBoolean(n2) ? new be(e4, t2) : null;
1151
1158
  };
1152
- var Te = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(e4) {
1159
+ var He = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(e4) {
1153
1160
  setTimeout(e4, 1e3 / 60);
1154
- }, Le = function() {
1161
+ }, Oe = function() {
1155
1162
  function e4() {
1156
- ie(this, e4), this.backgroundElement = document.createElement("div"), Z.extend(this.backgroundElement.style, { backgroundColor: "rgba(0,0,0,0.8)", top: 0, left: 0, display: "none", zIndex: "1000", opacity: 0, WebkitTransition: "opacity 0.2s linear", transition: "opacity 0.2s linear" }), ge.makeFullscreen(this.backgroundElement), this.backgroundElement.style.position = "fixed", this.domElement = document.createElement("div"), Z.extend(this.domElement.style, { position: "fixed", display: "none", zIndex: "1001", opacity: 0, WebkitTransition: "-webkit-transform 0.2s ease-out, opacity 0.2s linear", transition: "transform 0.2s ease-out, opacity 0.2s linear" }), document.body.appendChild(this.backgroundElement), document.body.appendChild(this.domElement);
1163
+ re(this, e4), this.backgroundElement = document.createElement("div"), Q.extend(this.backgroundElement.style, { backgroundColor: "rgba(0,0,0,0.8)", top: 0, left: 0, display: "none", zIndex: "1000", opacity: 0, WebkitTransition: "opacity 0.2s linear", transition: "opacity 0.2s linear" }), ve.makeFullscreen(this.backgroundElement), this.backgroundElement.style.position = "fixed", this.domElement = document.createElement("div"), Q.extend(this.domElement.style, { position: "fixed", display: "none", zIndex: "1001", opacity: 0, WebkitTransition: "-webkit-transform 0.2s ease-out, opacity 0.2s linear", transition: "transform 0.2s ease-out, opacity 0.2s linear" }), document.body.appendChild(this.backgroundElement), document.body.appendChild(this.domElement);
1157
1164
  var t2 = this;
1158
- ge.bind(this.backgroundElement, "click", function() {
1165
+ ve.bind(this.backgroundElement, "click", function() {
1159
1166
  t2.hide();
1160
1167
  });
1161
1168
  }
1162
- return oe(e4, [{ key: "show", value: function() {
1169
+ return ae(e4, [{ key: "show", value: function() {
1163
1170
  var e5 = this;
1164
- this.backgroundElement.style.display = "block", this.domElement.style.display = "block", this.domElement.style.opacity = 0, this.domElement.style.webkitTransform = "scale(1.1)", this.layout(), Z.defer(function() {
1171
+ this.backgroundElement.style.display = "block", this.domElement.style.display = "block", this.domElement.style.opacity = 0, this.domElement.style.webkitTransform = "scale(1.1)", this.layout(), Q.defer(function() {
1165
1172
  e5.backgroundElement.style.opacity = 1, e5.domElement.style.opacity = 1, e5.domElement.style.webkitTransform = "scale(1)";
1166
1173
  });
1167
1174
  } }, { key: "hide", value: function() {
1168
1175
  var e5 = this, t2 = function t3() {
1169
- e5.domElement.style.display = "none", e5.backgroundElement.style.display = "none", ge.unbind(e5.domElement, "webkitTransitionEnd", t3), ge.unbind(e5.domElement, "transitionend", t3), ge.unbind(e5.domElement, "oTransitionEnd", t3);
1176
+ e5.domElement.style.display = "none", e5.backgroundElement.style.display = "none", ve.unbind(e5.domElement, "webkitTransitionEnd", t3), ve.unbind(e5.domElement, "transitionend", t3), ve.unbind(e5.domElement, "oTransitionEnd", t3);
1170
1177
  };
1171
- ge.bind(this.domElement, "webkitTransitionEnd", t2), ge.bind(this.domElement, "transitionend", t2), ge.bind(this.domElement, "oTransitionEnd", t2), this.backgroundElement.style.opacity = 0, this.domElement.style.opacity = 0, this.domElement.style.webkitTransform = "scale(1.1)";
1178
+ ve.bind(this.domElement, "webkitTransitionEnd", t2), ve.bind(this.domElement, "transitionend", t2), ve.bind(this.domElement, "oTransitionEnd", t2), this.backgroundElement.style.opacity = 0, this.domElement.style.opacity = 0, this.domElement.style.webkitTransform = "scale(1.1)";
1172
1179
  } }, { key: "layout", value: function() {
1173
- this.domElement.style.left = window.innerWidth / 2 - ge.getWidth(this.domElement) / 2 + "px", this.domElement.style.top = window.innerHeight / 2 - ge.getHeight(this.domElement) / 2 + "px";
1180
+ this.domElement.style.left = window.innerWidth / 2 - ve.getWidth(this.domElement) / 2 + "px", this.domElement.style.top = window.innerHeight / 2 - ve.getHeight(this.domElement) / 2 + "px";
1174
1181
  } }]), e4;
1175
- }(), Oe = function(e4) {
1182
+ }(), Be = function(e4) {
1176
1183
  if ("undefined" != typeof window) {
1177
1184
  var t2 = document.createElement("style");
1178
1185
  return t2.setAttribute("type", "text/css"), t2.innerHTML = e4, document.head.appendChild(t2), e4;
1179
1186
  }
1180
1187
  }(".dg ul{list-style:none;margin:0;padding:0;width:100%;clear:both}.dg.ac{position:fixed;top:0;left:0;right:0;height:0;z-index:0}.dg:not(.ac) .main{overflow:hidden}.dg.main{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear}.dg.main.taller-than-window{overflow-y:auto}.dg.main.taller-than-window .close-button{opacity:1;margin-top:-1px;border-top:1px solid #2c2c2c}.dg.main ul.closed .close-button{opacity:1 !important}.dg.main:hover .close-button,.dg.main .close-button.drag{opacity:1}.dg.main .close-button{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear;border:0;line-height:19px;height:20px;cursor:pointer;text-align:center;background-color:#000}.dg.main .close-button.close-top{position:relative}.dg.main .close-button.close-bottom{position:absolute}.dg.main .close-button:hover{background-color:#111}.dg.a{float:right;margin-right:15px;overflow-y:visible}.dg.a.has-save>ul.close-top{margin-top:0}.dg.a.has-save>ul.close-bottom{margin-top:27px}.dg.a.has-save>ul.closed{margin-top:0}.dg.a .save-row{top:0;z-index:1002}.dg.a .save-row.close-top{position:relative}.dg.a .save-row.close-bottom{position:fixed}.dg li{-webkit-transition:height .1s ease-out;-o-transition:height .1s ease-out;-moz-transition:height .1s ease-out;transition:height .1s ease-out;-webkit-transition:overflow .1s linear;-o-transition:overflow .1s linear;-moz-transition:overflow .1s linear;transition:overflow .1s linear}.dg li:not(.folder){cursor:auto;height:27px;line-height:27px;padding:0 4px 0 5px}.dg li.folder{padding:0;border-left:4px solid rgba(0,0,0,0)}.dg li.title{cursor:pointer;margin-left:-4px}.dg .closed li:not(.title),.dg .closed ul li,.dg .closed ul li>*{height:0;overflow:hidden;border:0}.dg .cr{clear:both;padding-left:3px;height:27px;overflow:hidden}.dg .property-name{cursor:default;float:left;clear:left;width:40%;overflow:hidden;text-overflow:ellipsis}.dg .cr.function .property-name{width:100%}.dg .c{float:left;width:60%;position:relative}.dg .c input[type=text]{border:0;margin-top:4px;padding:3px;width:100%;float:right}.dg .has-slider input[type=text]{width:30%;margin-left:0}.dg .slider{float:left;width:66%;margin-left:-5px;margin-right:0;height:19px;margin-top:4px}.dg .slider-fg{height:100%}.dg .c input[type=checkbox]{margin-top:7px}.dg .c select{margin-top:5px}.dg .cr.function,.dg .cr.function .property-name,.dg .cr.function *,.dg .cr.boolean,.dg .cr.boolean *{cursor:pointer}.dg .cr.color{overflow:visible}.dg .selector{display:none;position:absolute;margin-left:-9px;margin-top:23px;z-index:10}.dg .c:hover .selector,.dg .selector.drag{display:block}.dg li.save-row{padding:0}.dg li.save-row .button{display:inline-block;padding:0px 6px}.dg.dialogue{background-color:#222;width:460px;padding:15px;font-size:13px;line-height:15px}#dg-new-constructor{padding:10px;color:#222;font-family:Monaco, monospace;font-size:10px;border:0;resize:none;box-shadow:inset 1px 1px 1px #888;word-wrap:break-word;margin:12px 0;display:block;width:440px;overflow-y:scroll;height:100px;position:relative}#dg-local-explain{display:none;font-size:11px;line-height:17px;border-radius:3px;background-color:#333;padding:8px;margin-top:10px}#dg-local-explain code{font-size:10px}#dat-gui-save-locally{display:none}.dg{color:#eee;font:11px 'Lucida Grande', sans-serif;text-shadow:0 -1px 0 #111}.dg.main::-webkit-scrollbar{width:5px;background:#1a1a1a}.dg.main::-webkit-scrollbar-corner{height:0;display:none}.dg.main::-webkit-scrollbar-thumb{border-radius:5px;background:#676767}.dg li:not(.folder){background:#1a1a1a;border-bottom:1px solid #2c2c2c}.dg li.save-row{line-height:25px;background:#dad5cb;border:0}.dg li.save-row select{margin-left:5px;width:108px}.dg li.save-row .button{margin-left:5px;margin-top:1px;border-radius:2px;font-size:9px;line-height:7px;padding:4px 4px 5px 4px;background:#c5bdad;color:#fff;text-shadow:0 1px 0 #b0a58f;box-shadow:0 -1px 0 #b0a58f;cursor:pointer}.dg li.save-row .button.gears{background:#c5bdad url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAANCAYAAAB/9ZQ7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQJJREFUeNpiYKAU/P//PwGIC/ApCABiBSAW+I8AClAcgKxQ4T9hoMAEUrxx2QSGN6+egDX+/vWT4e7N82AMYoPAx/evwWoYoSYbACX2s7KxCxzcsezDh3evFoDEBYTEEqycggWAzA9AuUSQQgeYPa9fPv6/YWm/Acx5IPb7ty/fw+QZblw67vDs8R0YHyQhgObx+yAJkBqmG5dPPDh1aPOGR/eugW0G4vlIoTIfyFcA+QekhhHJhPdQxbiAIguMBTQZrPD7108M6roWYDFQiIAAv6Aow/1bFwXgis+f2LUAynwoIaNcz8XNx3Dl7MEJUDGQpx9gtQ8YCueB+D26OECAAQDadt7e46D42QAAAABJRU5ErkJggg==) 2px 1px no-repeat;height:7px;width:8px}.dg li.save-row .button:hover{background-color:#bab19e;box-shadow:0 -1px 0 #b0a58f}.dg li.folder{border-bottom:0}.dg li.title{padding-left:16px;background:#000 url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlI+hKgFxoCgAOw==) 6px 10px no-repeat;cursor:pointer;border-bottom:1px solid rgba(255,255,255,0.2)}.dg .closed li.title{background-image:url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlGIWqMCbWAEAOw==)}.dg .cr.boolean{border-left:3px solid #806787}.dg .cr.color{border-left:3px solid}.dg .cr.function{border-left:3px solid #e61d5f}.dg .cr.number{border-left:3px solid #2FA1D6}.dg .cr.number input[type=text]{color:#2FA1D6}.dg .cr.string{border-left:3px solid #1ed36f}.dg .cr.string input[type=text]{color:#1ed36f}.dg .cr.function:hover,.dg .cr.boolean:hover{background:#111}.dg .c input[type=text]{background:#303030;outline:none}.dg .c input[type=text]:hover{background:#3c3c3c}.dg .c input[type=text]:focus{background:#494949;color:#fff}.dg .c .slider{background:#303030;cursor:ew-resize}.dg .c .slider-fg{background:#2FA1D6;max-width:100%}.dg .c .slider:hover{background:#3c3c3c}.dg .c .slider:hover .slider-fg{background:#44abda}\n");
1181
- Ae(Oe);
1182
- var He = "Default", Be = function() {
1188
+ Te(Be);
1189
+ var je = "Default", Re = function() {
1183
1190
  try {
1184
1191
  return !!window.localStorage;
1185
1192
  } catch (e4) {
1186
1193
  return false;
1187
1194
  }
1188
- }(), je = void 0, Re = true, ze = void 0, De = false, Ge = [], Ue = function e3(t2) {
1195
+ }(), ze = void 0, De = true, Ge = void 0, Ue = false, Ie = [], Ve = function e3(t2) {
1189
1196
  var n2 = this, s2 = t2 || {};
1190
- this.domElement = document.createElement("div"), this.__ul = document.createElement("ul"), this.domElement.appendChild(this.__ul), ge.addClass(this.domElement, "dg"), this.__folders = {}, this.__controllers = [], this.__rememberedObjects = [], this.__rememberedObjectIndecesToControllers = [], this.__listening = [], s2 = Z.defaults(s2, { closeOnTop: false, autoPlace: true, width: e3.DEFAULT_WIDTH }), s2 = Z.defaults(s2, { resizable: s2.autoPlace, hideable: s2.autoPlace }), Z.isUndefined(s2.load) ? s2.load = { preset: He } : s2.preset && (s2.load.preset = s2.preset), Z.isUndefined(s2.parent) && s2.hideable && Ge.push(this), s2.resizable = Z.isUndefined(s2.parent) && s2.resizable, s2.autoPlace && Z.isUndefined(s2.scrollable) && (s2.scrollable = true);
1191
- var i2, o2 = Be && "true" === localStorage.getItem(Je(this, "isLocal")), r2 = void 0, a2 = void 0;
1197
+ this.domElement = document.createElement("div"), this.__ul = document.createElement("ul"), this.domElement.appendChild(this.__ul), ve.addClass(this.domElement, "dg"), this.__folders = {}, this.__controllers = [], this.__rememberedObjects = [], this.__rememberedObjectIndecesToControllers = [], this.__listening = [], s2 = Q.defaults(s2, { closeOnTop: false, autoPlace: true, width: e3.DEFAULT_WIDTH }), s2 = Q.defaults(s2, { resizable: s2.autoPlace, hideable: s2.autoPlace }), Q.isUndefined(s2.load) ? s2.load = { preset: je } : s2.preset && (s2.load.preset = s2.preset), Q.isUndefined(s2.parent) && s2.hideable && Ie.push(this), s2.resizable = Q.isUndefined(s2.parent) && s2.resizable, s2.autoPlace && Q.isUndefined(s2.scrollable) && (s2.scrollable = true);
1198
+ var i2, o2 = Re && "true" === localStorage.getItem(Ke(this, "isLocal")), r2 = void 0, a2 = void 0;
1192
1199
  if (Object.defineProperties(this, { parent: { get: function() {
1193
1200
  return s2.parent;
1194
1201
  } }, scrollable: { get: function() {
@@ -1206,7 +1213,7 @@ var He = "Default", Be = function() {
1206
1213
  } }, width: { get: function() {
1207
1214
  return s2.width;
1208
1215
  }, set: function(e4) {
1209
- s2.width = e4, qe(n2, e4);
1216
+ s2.width = e4, $e(n2, e4);
1210
1217
  } }, name: { get: function() {
1211
1218
  return s2.name;
1212
1219
  }, set: function(e4) {
@@ -1214,50 +1221,50 @@ var He = "Default", Be = function() {
1214
1221
  } }, closed: { get: function() {
1215
1222
  return s2.closed;
1216
1223
  }, set: function(t3) {
1217
- s2.closed = t3, s2.closed ? ge.addClass(n2.__ul, e3.CLASS_CLOSED) : ge.removeClass(n2.__ul, e3.CLASS_CLOSED), this.onResize(), n2.__closeButton && (n2.__closeButton.innerHTML = t3 ? e3.TEXT_OPEN : e3.TEXT_CLOSED);
1224
+ s2.closed = t3, s2.closed ? ve.addClass(n2.__ul, e3.CLASS_CLOSED) : ve.removeClass(n2.__ul, e3.CLASS_CLOSED), this.onResize(), n2.__closeButton && (n2.__closeButton.innerHTML = t3 ? e3.TEXT_OPEN : e3.TEXT_CLOSED);
1218
1225
  } }, load: { get: function() {
1219
1226
  return s2.load;
1220
1227
  } }, useLocalStorage: { get: function() {
1221
1228
  return o2;
1222
1229
  }, set: function(e4) {
1223
- Be && (o2 = e4, e4 ? ge.bind(window, "unload", r2) : ge.unbind(window, "unload", r2), localStorage.setItem(Je(n2, "isLocal"), e4));
1224
- } } }), Z.isUndefined(s2.parent)) {
1225
- if (this.closed = s2.closed || false, ge.addClass(this.domElement, e3.CLASS_MAIN), ge.makeSelectable(this.domElement, false), Be && o2) {
1230
+ Re && (o2 = e4, e4 ? ve.bind(window, "unload", r2) : ve.unbind(window, "unload", r2), localStorage.setItem(Ke(n2, "isLocal"), e4));
1231
+ } } }), Q.isUndefined(s2.parent)) {
1232
+ if (this.closed = s2.closed || false, ve.addClass(this.domElement, e3.CLASS_MAIN), ve.makeSelectable(this.domElement, false), Re && o2) {
1226
1233
  n2.useLocalStorage = true;
1227
- var l2 = localStorage.getItem(Je(this, "gui"));
1234
+ var l2 = localStorage.getItem(Ke(this, "gui"));
1228
1235
  l2 && (s2.load = JSON.parse(l2));
1229
1236
  }
1230
- this.__closeButton = document.createElement("div"), this.__closeButton.innerHTML = e3.TEXT_CLOSED, ge.addClass(this.__closeButton, e3.CLASS_CLOSE_BUTTON), s2.closeOnTop ? (ge.addClass(this.__closeButton, e3.CLASS_CLOSE_TOP), this.domElement.insertBefore(this.__closeButton, this.domElement.childNodes[0])) : (ge.addClass(this.__closeButton, e3.CLASS_CLOSE_BOTTOM), this.domElement.appendChild(this.__closeButton)), ge.bind(this.__closeButton, "click", function() {
1237
+ this.__closeButton = document.createElement("div"), this.__closeButton.innerHTML = e3.TEXT_CLOSED, ve.addClass(this.__closeButton, e3.CLASS_CLOSE_BUTTON), s2.closeOnTop ? (ve.addClass(this.__closeButton, e3.CLASS_CLOSE_TOP), this.domElement.insertBefore(this.__closeButton, this.domElement.childNodes[0])) : (ve.addClass(this.__closeButton, e3.CLASS_CLOSE_BOTTOM), this.domElement.appendChild(this.__closeButton)), ve.bind(this.__closeButton, "click", function() {
1231
1238
  n2.closed = !n2.closed;
1232
1239
  });
1233
1240
  } else {
1234
1241
  void 0 === s2.closed && (s2.closed = true);
1235
1242
  var d2 = document.createTextNode(s2.name);
1236
- ge.addClass(d2, "controller-name"), a2 = Ie(n2, d2);
1237
- ge.addClass(this.__ul, e3.CLASS_CLOSED), ge.addClass(a2, "title"), ge.bind(a2, "click", function(e4) {
1243
+ ve.addClass(d2, "controller-name"), a2 = Ne(n2, d2);
1244
+ ve.addClass(this.__ul, e3.CLASS_CLOSED), ve.addClass(a2, "title"), ve.bind(a2, "click", function(e4) {
1238
1245
  return e4.preventDefault(), n2.closed = !n2.closed, false;
1239
1246
  }), s2.closed || (this.closed = false);
1240
1247
  }
1241
- s2.autoPlace && (Z.isUndefined(s2.parent) && (Re && (ze = document.createElement("div"), ge.addClass(ze, "dg"), ge.addClass(ze, e3.CLASS_AUTO_PLACE_CONTAINER), document.body.appendChild(ze), Re = false), ze.appendChild(this.domElement), ge.addClass(this.domElement, e3.CLASS_AUTO_PLACE)), this.parent || qe(n2, s2.width)), this.__resizeHandler = function() {
1248
+ s2.autoPlace && (Q.isUndefined(s2.parent) && (De && (Ge = document.createElement("div"), ve.addClass(Ge, "dg"), ve.addClass(Ge, e3.CLASS_AUTO_PLACE_CONTAINER), document.body.appendChild(Ge), De = false), Ge.appendChild(this.domElement), ve.addClass(this.domElement, e3.CLASS_AUTO_PLACE)), this.parent || $e(n2, s2.width)), this.__resizeHandler = function() {
1242
1249
  n2.onResizeDebounced();
1243
- }, ge.bind(window, "resize", this.__resizeHandler), ge.bind(this.__ul, "webkitTransitionEnd", this.__resizeHandler), ge.bind(this.__ul, "transitionend", this.__resizeHandler), ge.bind(this.__ul, "oTransitionEnd", this.__resizeHandler), this.onResize(), s2.resizable && Ze(this), r2 = function() {
1244
- Be && "true" === localStorage.getItem(Je(n2, "isLocal")) && localStorage.setItem(Je(n2, "gui"), JSON.stringify(n2.getSaveObject()));
1245
- }, this.saveToLocalStorageIfPossible = r2, s2.parent || ((i2 = n2.getRoot()).width += 1, Z.defer(function() {
1250
+ }, ve.bind(window, "resize", this.__resizeHandler), ve.bind(this.__ul, "webkitTransitionEnd", this.__resizeHandler), ve.bind(this.__ul, "transitionend", this.__resizeHandler), ve.bind(this.__ul, "oTransitionEnd", this.__resizeHandler), this.onResize(), s2.resizable && Qe(this), r2 = function() {
1251
+ Re && "true" === localStorage.getItem(Ke(n2, "isLocal")) && localStorage.setItem(Ke(n2, "gui"), JSON.stringify(n2.getSaveObject()));
1252
+ }, this.saveToLocalStorageIfPossible = r2, s2.parent || ((i2 = n2.getRoot()).width += 1, Q.defer(function() {
1246
1253
  i2.width -= 1;
1247
1254
  }));
1248
1255
  };
1249
- function Ie(e4, t2, n2) {
1256
+ function Ne(e4, t2, n2) {
1250
1257
  var s2 = document.createElement("li");
1251
1258
  return t2 && s2.appendChild(t2), n2 ? e4.__ul.insertBefore(s2, n2) : e4.__ul.appendChild(s2), e4.onResize(), s2;
1252
1259
  }
1253
- function Ve(e4) {
1254
- ge.unbind(window, "resize", e4.__resizeHandler), e4.saveToLocalStorageIfPossible && ge.unbind(window, "unload", e4.saveToLocalStorageIfPossible);
1260
+ function Xe(e4) {
1261
+ ve.unbind(window, "resize", e4.__resizeHandler), e4.saveToLocalStorageIfPossible && ve.unbind(window, "unload", e4.saveToLocalStorageIfPossible);
1255
1262
  }
1256
- function Ne(e4, t2) {
1263
+ function We(e4, t2) {
1257
1264
  var n2 = e4.__preset_select[e4.__preset_select.selectedIndex];
1258
1265
  n2.innerHTML = t2 ? n2.value + "*" : n2.value;
1259
1266
  }
1260
- function Xe(e4, t2) {
1267
+ function Je(e4, t2) {
1261
1268
  var n2 = e4.getRoot(), s2 = n2.__rememberedObjects.indexOf(t2.object);
1262
1269
  if (-1 !== s2) {
1263
1270
  var i2 = n2.__rememberedObjectIndecesToControllers[s2];
@@ -1265,8 +1272,8 @@ function Xe(e4, t2) {
1265
1272
  var o2 = n2.load.remembered, r2 = void 0;
1266
1273
  if (o2[e4.preset]) r2 = o2[e4.preset];
1267
1274
  else {
1268
- if (!o2[He]) return;
1269
- r2 = o2[He];
1275
+ if (!o2[je]) return;
1276
+ r2 = o2[je];
1270
1277
  }
1271
1278
  if (r2[s2] && void 0 !== r2[s2][t2.property]) {
1272
1279
  var a2 = r2[s2][t2.property];
@@ -1275,29 +1282,29 @@ function Xe(e4, t2) {
1275
1282
  }
1276
1283
  }
1277
1284
  }
1278
- function We(e4, t2, n2, s2) {
1285
+ function Ye(e4, t2, n2, s2) {
1279
1286
  if (void 0 === t2[n2]) throw new Error('Object "' + t2 + '" has no property "' + n2 + '"');
1280
1287
  var i2 = void 0;
1281
- if (s2.color) i2 = new Se(t2, n2);
1288
+ if (s2.color) i2 = new Ee(t2, n2);
1282
1289
  else {
1283
1290
  var o2 = [t2, n2].concat(s2.factoryArgs);
1284
- i2 = ke.apply(e4, o2);
1291
+ i2 = Le.apply(e4, o2);
1285
1292
  }
1286
- s2.before instanceof ue && (s2.before = s2.before.__li), Xe(e4, i2), ge.addClass(i2.domElement, "c");
1293
+ s2.before instanceof pe && (s2.before = s2.before.__li), Je(e4, i2), ve.addClass(i2.domElement, "c");
1287
1294
  var r2 = document.createElement("span");
1288
- ge.addClass(r2, "property-name"), r2.innerHTML = i2.property;
1295
+ ve.addClass(r2, "property-name"), r2.innerHTML = i2.property;
1289
1296
  var a2 = document.createElement("div");
1290
1297
  a2.appendChild(r2), a2.appendChild(i2.domElement);
1291
- var l2 = Ie(e4, a2, s2.before);
1292
- return ge.addClass(l2, Ue.CLASS_CONTROLLER_ROW), i2 instanceof Se ? ge.addClass(l2, "color") : ge.addClass(l2, se(i2.getValue())), function(e5, t3, n3) {
1293
- if (n3.__li = t3, n3.__gui = e5, Z.extend(n3, { options: function(t4) {
1298
+ var l2 = Ne(e4, a2, s2.before);
1299
+ return ve.addClass(l2, Ve.CLASS_CONTROLLER_ROW), i2 instanceof Ee ? ve.addClass(l2, "color") : ve.addClass(l2, oe(i2.getValue())), function(e5, t3, n3) {
1300
+ if (n3.__li = t3, n3.__gui = e5, Q.extend(n3, { options: function(t4) {
1294
1301
  if (arguments.length > 1) {
1295
1302
  var s4 = n3.__li.nextElementSibling;
1296
- return n3.remove(), We(e5, n3.object, n3.property, { before: s4, factoryArgs: [Z.toArray(arguments)] });
1303
+ return n3.remove(), Ye(e5, n3.object, n3.property, { before: s4, factoryArgs: [Q.toArray(arguments)] });
1297
1304
  }
1298
- if (Z.isArray(t4) || Z.isObject(t4)) {
1305
+ if (Q.isArray(t4) || Q.isObject(t4)) {
1299
1306
  var i4 = n3.__li.nextElementSibling;
1300
- return n3.remove(), We(e5, n3.object, n3.property, { before: i4, factoryArgs: [t4] });
1307
+ return n3.remove(), Ye(e5, n3.object, n3.property, { before: i4, factoryArgs: [t4] });
1301
1308
  }
1302
1309
  }, name: function(e6) {
1303
1310
  return n3.__li.firstElementChild.firstElementChild.innerHTML = e6, n3;
@@ -1305,123 +1312,123 @@ function We(e4, t2, n2, s2) {
1305
1312
  return n3.__gui.listen(n3), n3;
1306
1313
  }, remove: function() {
1307
1314
  return n3.__gui.remove(n3), n3;
1308
- } }), n3 instanceof Me) {
1309
- var s3 = new xe(n3.object, n3.property, { min: n3.__min, max: n3.__max, step: n3.__step });
1310
- Z.each(["updateDisplay", "onChange", "onFinishChange", "step", "min", "max"], function(e6) {
1315
+ } }), n3 instanceof Se) {
1316
+ var s3 = new Me(n3.object, n3.property, { min: n3.__min, max: n3.__max, step: n3.__step });
1317
+ Q.each(["updateDisplay", "onChange", "onFinishChange", "step", "min", "max"], function(e6) {
1311
1318
  var t4 = n3[e6], i4 = s3[e6];
1312
1319
  n3[e6] = s3[e6] = function() {
1313
1320
  var e7 = Array.prototype.slice.call(arguments);
1314
1321
  return i4.apply(s3, e7), t4.apply(n3, e7);
1315
1322
  };
1316
- }), ge.addClass(t3, "has-slider"), n3.domElement.insertBefore(s3.domElement, n3.domElement.firstElementChild);
1317
- } else if (n3 instanceof xe) {
1323
+ }), ve.addClass(t3, "has-slider"), n3.domElement.insertBefore(s3.domElement, n3.domElement.firstElementChild);
1324
+ } else if (n3 instanceof Me) {
1318
1325
  var i3 = function(t4) {
1319
- if (Z.isNumber(n3.__min) && Z.isNumber(n3.__max)) {
1326
+ if (Q.isNumber(n3.__min) && Q.isNumber(n3.__max)) {
1320
1327
  var s4 = n3.__li.firstElementChild.firstElementChild.innerHTML, i4 = n3.__gui.__listening.indexOf(n3) > -1;
1321
1328
  n3.remove();
1322
- var o3 = We(e5, n3.object, n3.property, { before: n3.__li.nextElementSibling, factoryArgs: [n3.__min, n3.__max, n3.__step] });
1329
+ var o3 = Ye(e5, n3.object, n3.property, { before: n3.__li.nextElementSibling, factoryArgs: [n3.__min, n3.__max, n3.__step] });
1323
1330
  return o3.name(s4), i4 && o3.listen(), o3;
1324
1331
  }
1325
1332
  return t4;
1326
1333
  };
1327
- n3.min = Z.compose(i3, n3.min), n3.max = Z.compose(i3, n3.max);
1328
- } else n3 instanceof _e ? (ge.bind(t3, "click", function() {
1329
- ge.fakeEvent(n3.__checkbox, "click");
1330
- }), ge.bind(n3.__checkbox, "click", function(e6) {
1334
+ n3.min = Q.compose(i3, n3.min), n3.max = Q.compose(i3, n3.max);
1335
+ } else n3 instanceof be ? (ve.bind(t3, "click", function() {
1336
+ ve.fakeEvent(n3.__checkbox, "click");
1337
+ }), ve.bind(n3.__checkbox, "click", function(e6) {
1331
1338
  e6.stopPropagation();
1332
- })) : n3 instanceof Pe ? (ge.bind(t3, "click", function() {
1333
- ge.fakeEvent(n3.__button, "click");
1334
- }), ge.bind(t3, "mouseover", function() {
1335
- ge.addClass(n3.__button, "hover");
1336
- }), ge.bind(t3, "mouseout", function() {
1337
- ge.removeClass(n3.__button, "hover");
1338
- })) : n3 instanceof Se && (ge.addClass(t3, "color"), n3.updateDisplay = Z.compose(function(e6) {
1339
+ })) : n3 instanceof Fe ? (ve.bind(t3, "click", function() {
1340
+ ve.fakeEvent(n3.__button, "click");
1341
+ }), ve.bind(t3, "mouseover", function() {
1342
+ ve.addClass(n3.__button, "hover");
1343
+ }), ve.bind(t3, "mouseout", function() {
1344
+ ve.removeClass(n3.__button, "hover");
1345
+ })) : n3 instanceof Ee && (ve.addClass(t3, "color"), n3.updateDisplay = Q.compose(function(e6) {
1339
1346
  return t3.style.borderLeftColor = n3.__color.toString(), e6;
1340
1347
  }, n3.updateDisplay), n3.updateDisplay());
1341
- n3.setValue = Z.compose(function(t4) {
1342
- return e5.getRoot().__preset_select && n3.isModified() && Ne(e5.getRoot(), true), t4;
1348
+ n3.setValue = Q.compose(function(t4) {
1349
+ return e5.getRoot().__preset_select && n3.isModified() && We(e5.getRoot(), true), t4;
1343
1350
  }, n3.setValue);
1344
1351
  }(e4, l2, i2), e4.__controllers.push(i2), i2;
1345
1352
  }
1346
- function Je(e4, t2) {
1353
+ function Ke(e4, t2) {
1347
1354
  return document.location.href + "." + t2;
1348
1355
  }
1349
- function Ye(e4, t2, n2) {
1356
+ function Ze(e4, t2, n2) {
1350
1357
  var s2 = document.createElement("option");
1351
1358
  s2.innerHTML = t2, s2.value = t2, e4.__preset_select.appendChild(s2), n2 && (e4.__preset_select.selectedIndex = e4.__preset_select.length - 1);
1352
1359
  }
1353
- function Ke(e4, t2) {
1360
+ function qe(e4, t2) {
1354
1361
  t2.style.display = e4.useLocalStorage ? "block" : "none";
1355
1362
  }
1356
- function Ze(e4) {
1363
+ function Qe(e4) {
1357
1364
  var t2 = void 0;
1358
1365
  function n2(n3) {
1359
1366
  return n3.preventDefault(), e4.width += t2 - n3.clientX, e4.onResize(), t2 = n3.clientX, false;
1360
1367
  }
1361
1368
  function s2() {
1362
- ge.removeClass(e4.__closeButton, Ue.CLASS_DRAG), ge.unbind(window, "mousemove", n2), ge.unbind(window, "mouseup", s2);
1369
+ ve.removeClass(e4.__closeButton, Ve.CLASS_DRAG), ve.unbind(window, "mousemove", n2), ve.unbind(window, "mouseup", s2);
1363
1370
  }
1364
1371
  function i2(i3) {
1365
- return i3.preventDefault(), t2 = i3.clientX, ge.addClass(e4.__closeButton, Ue.CLASS_DRAG), ge.bind(window, "mousemove", n2), ge.bind(window, "mouseup", s2), false;
1372
+ return i3.preventDefault(), t2 = i3.clientX, ve.addClass(e4.__closeButton, Ve.CLASS_DRAG), ve.bind(window, "mousemove", n2), ve.bind(window, "mouseup", s2), false;
1366
1373
  }
1367
- e4.__resize_handle = document.createElement("div"), Z.extend(e4.__resize_handle.style, { width: "6px", marginLeft: "-3px", height: "200px", cursor: "ew-resize", position: "absolute" }), ge.bind(e4.__resize_handle, "mousedown", i2), ge.bind(e4.__closeButton, "mousedown", i2), e4.domElement.insertBefore(e4.__resize_handle, e4.domElement.firstElementChild);
1374
+ e4.__resize_handle = document.createElement("div"), Q.extend(e4.__resize_handle.style, { width: "6px", marginLeft: "-3px", height: "200px", cursor: "ew-resize", position: "absolute" }), ve.bind(e4.__resize_handle, "mousedown", i2), ve.bind(e4.__closeButton, "mousedown", i2), e4.domElement.insertBefore(e4.__resize_handle, e4.domElement.firstElementChild);
1368
1375
  }
1369
- function qe(e4, t2) {
1376
+ function $e(e4, t2) {
1370
1377
  e4.domElement.style.width = t2 + "px", e4.__save_row && e4.autoPlace && (e4.__save_row.style.width = t2 + "px"), e4.__closeButton && (e4.__closeButton.style.width = t2 + "px");
1371
1378
  }
1372
- function Qe(e4, t2) {
1379
+ function et(e4, t2) {
1373
1380
  var n2 = {};
1374
- return Z.each(e4.__rememberedObjects, function(s2, i2) {
1381
+ return Q.each(e4.__rememberedObjects, function(s2, i2) {
1375
1382
  var o2 = {}, r2 = e4.__rememberedObjectIndecesToControllers[i2];
1376
- Z.each(r2, function(e5, n3) {
1383
+ Q.each(r2, function(e5, n3) {
1377
1384
  o2[n3] = t2 ? e5.initialValue : e5.getValue();
1378
1385
  }), n2[i2] = o2;
1379
1386
  }), n2;
1380
1387
  }
1381
- function $e(e4) {
1382
- 0 !== e4.length && Te.call(window, function() {
1383
- $e(e4);
1384
- }), Z.each(e4, function(e5) {
1388
+ function tt(e4) {
1389
+ 0 !== e4.length && He.call(window, function() {
1390
+ tt(e4);
1391
+ }), Q.each(e4, function(e5) {
1385
1392
  e5.updateDisplay();
1386
1393
  });
1387
1394
  }
1388
- Ue.toggleHide = function() {
1389
- De = !De, Z.each(Ge, function(e4) {
1390
- e4.domElement.style.display = De ? "none" : "";
1395
+ Ve.toggleHide = function() {
1396
+ Ue = !Ue, Q.each(Ie, function(e4) {
1397
+ e4.domElement.style.display = Ue ? "none" : "";
1391
1398
  });
1392
- }, Ue.CLASS_AUTO_PLACE = "a", Ue.CLASS_AUTO_PLACE_CONTAINER = "ac", Ue.CLASS_MAIN = "main", Ue.CLASS_CONTROLLER_ROW = "cr", Ue.CLASS_TOO_TALL = "taller-than-window", Ue.CLASS_CLOSED = "closed", Ue.CLASS_CLOSE_BUTTON = "close-button", Ue.CLASS_CLOSE_TOP = "close-top", Ue.CLASS_CLOSE_BOTTOM = "close-bottom", Ue.CLASS_DRAG = "drag", Ue.DEFAULT_WIDTH = 245, Ue.TEXT_CLOSED = "Close Controls", Ue.TEXT_OPEN = "Open Controls", Ue._keydownHandler = function(e4) {
1393
- "text" === document.activeElement.type || 72 !== e4.which && 72 !== e4.keyCode || Ue.toggleHide();
1394
- }, ge.bind(window, "keydown", Ue._keydownHandler, false), Z.extend(Ue.prototype, { add: function(e4, t2) {
1395
- return We(this, e4, t2, { factoryArgs: Array.prototype.slice.call(arguments, 2) });
1399
+ }, Ve.CLASS_AUTO_PLACE = "a", Ve.CLASS_AUTO_PLACE_CONTAINER = "ac", Ve.CLASS_MAIN = "main", Ve.CLASS_CONTROLLER_ROW = "cr", Ve.CLASS_TOO_TALL = "taller-than-window", Ve.CLASS_CLOSED = "closed", Ve.CLASS_CLOSE_BUTTON = "close-button", Ve.CLASS_CLOSE_TOP = "close-top", Ve.CLASS_CLOSE_BOTTOM = "close-bottom", Ve.CLASS_DRAG = "drag", Ve.DEFAULT_WIDTH = 245, Ve.TEXT_CLOSED = "Close Controls", Ve.TEXT_OPEN = "Open Controls", Ve._keydownHandler = function(e4) {
1400
+ "text" === document.activeElement.type || 72 !== e4.which && 72 !== e4.keyCode || Ve.toggleHide();
1401
+ }, ve.bind(window, "keydown", Ve._keydownHandler, false), Q.extend(Ve.prototype, { add: function(e4, t2) {
1402
+ return Ye(this, e4, t2, { factoryArgs: Array.prototype.slice.call(arguments, 2) });
1396
1403
  }, addColor: function(e4, t2) {
1397
- return We(this, e4, t2, { color: true });
1404
+ return Ye(this, e4, t2, { color: true });
1398
1405
  }, remove: function(e4) {
1399
1406
  this.__ul.removeChild(e4.__li), this.__controllers.splice(this.__controllers.indexOf(e4), 1);
1400
1407
  var t2 = this;
1401
- Z.defer(function() {
1408
+ Q.defer(function() {
1402
1409
  t2.onResize();
1403
1410
  });
1404
1411
  }, destroy: function() {
1405
1412
  if (this.parent) throw new Error("Only the root GUI should be removed with .destroy(). For subfolders, use gui.removeFolder(folder) instead.");
1406
- this.autoPlace && ze.removeChild(this.domElement);
1413
+ this.autoPlace && Ge.removeChild(this.domElement);
1407
1414
  var e4 = this;
1408
- Z.each(this.__folders, function(t2) {
1415
+ Q.each(this.__folders, function(t2) {
1409
1416
  e4.removeFolder(t2);
1410
- }), ge.unbind(window, "keydown", Ue._keydownHandler, false), Ve(this);
1417
+ }), ve.unbind(window, "keydown", Ve._keydownHandler, false), Xe(this);
1411
1418
  }, addFolder: function(e4) {
1412
1419
  if (void 0 !== this.__folders[e4]) throw new Error('You already have a folder in this GUI by the name "' + e4 + '"');
1413
1420
  var t2 = { name: e4, parent: this };
1414
1421
  t2.autoPlace = this.autoPlace, this.load && this.load.folders && this.load.folders[e4] && (t2.closed = this.load.folders[e4].closed, t2.load = this.load.folders[e4]);
1415
- var n2 = new Ue(t2);
1422
+ var n2 = new Ve(t2);
1416
1423
  this.__folders[e4] = n2;
1417
- var s2 = Ie(this, n2.domElement);
1418
- return ge.addClass(s2, "folder"), n2;
1424
+ var s2 = Ne(this, n2.domElement);
1425
+ return ve.addClass(s2, "folder"), n2;
1419
1426
  }, removeFolder: function(e4) {
1420
- this.__ul.removeChild(e4.domElement.parentElement), delete this.__folders[e4.name], this.load && this.load.folders && this.load.folders[e4.name] && delete this.load.folders[e4.name], Ve(e4);
1427
+ this.__ul.removeChild(e4.domElement.parentElement), delete this.__folders[e4.name], this.load && this.load.folders && this.load.folders[e4.name] && delete this.load.folders[e4.name], Xe(e4);
1421
1428
  var t2 = this;
1422
- Z.each(e4.__folders, function(t3) {
1429
+ Q.each(e4.__folders, function(t3) {
1423
1430
  e4.removeFolder(t3);
1424
- }), Z.defer(function() {
1431
+ }), Q.defer(function() {
1425
1432
  t2.onResize();
1426
1433
  });
1427
1434
  }, open: function() {
@@ -1435,18 +1442,18 @@ Ue.toggleHide = function() {
1435
1442
  }, onResize: function() {
1436
1443
  var e4 = this.getRoot();
1437
1444
  if (e4.scrollable) {
1438
- var t2 = ge.getOffset(e4.__ul).top, n2 = 0;
1439
- Z.each(e4.__ul.childNodes, function(t3) {
1440
- e4.autoPlace && t3 === e4.__save_row || (n2 += ge.getHeight(t3));
1441
- }), window.innerHeight - t2 - 20 < n2 ? (ge.addClass(e4.domElement, Ue.CLASS_TOO_TALL), e4.__ul.style.height = window.innerHeight - t2 - 20 + "px") : (ge.removeClass(e4.domElement, Ue.CLASS_TOO_TALL), e4.__ul.style.height = "auto");
1445
+ var t2 = ve.getOffset(e4.__ul).top, n2 = 0;
1446
+ Q.each(e4.__ul.childNodes, function(t3) {
1447
+ e4.autoPlace && t3 === e4.__save_row || (n2 += ve.getHeight(t3));
1448
+ }), window.innerHeight - t2 - 20 < n2 ? (ve.addClass(e4.domElement, Ve.CLASS_TOO_TALL), e4.__ul.style.height = window.innerHeight - t2 - 20 + "px") : (ve.removeClass(e4.domElement, Ve.CLASS_TOO_TALL), e4.__ul.style.height = "auto");
1442
1449
  }
1443
- e4.__resize_handle && Z.defer(function() {
1450
+ e4.__resize_handle && Q.defer(function() {
1444
1451
  e4.__resize_handle.style.height = e4.__ul.offsetHeight + "px";
1445
1452
  }), e4.__closeButton && (e4.__closeButton.style.width = e4.width + "px");
1446
- }, onResizeDebounced: Z.debounce(function() {
1453
+ }, onResizeDebounced: Q.debounce(function() {
1447
1454
  this.onResize();
1448
1455
  }, 50), remember: function() {
1449
- if (Z.isUndefined(je) && ((je = new Le()).domElement.innerHTML = `<div id="dg-save" class="dg dialogue">
1456
+ if (Q.isUndefined(ze) && ((ze = new Oe()).domElement.innerHTML = `<div id="dg-save" class="dg dialogue">
1450
1457
 
1451
1458
  Here's the new load parameter for your <code>GUI</code>'s constructor:
1452
1459
 
@@ -1468,79 +1475,79 @@ Ue.toggleHide = function() {
1468
1475
 
1469
1476
  </div>`), this.parent) throw new Error("You can only call remember on a top level GUI.");
1470
1477
  var e4 = this;
1471
- Z.each(Array.prototype.slice.call(arguments), function(t2) {
1478
+ Q.each(Array.prototype.slice.call(arguments), function(t2) {
1472
1479
  0 === e4.__rememberedObjects.length && function(e5) {
1473
1480
  var t3 = e5.__save_row = document.createElement("li");
1474
- ge.addClass(e5.domElement, "has-save"), e5.__ul.insertBefore(t3, e5.__ul.firstChild), ge.addClass(t3, "save-row");
1481
+ ve.addClass(e5.domElement, "has-save"), e5.__ul.insertBefore(t3, e5.__ul.firstChild), ve.addClass(t3, "save-row");
1475
1482
  var n2 = document.createElement("span");
1476
- n2.innerHTML = "&nbsp;", ge.addClass(n2, "button gears");
1483
+ n2.innerHTML = "&nbsp;", ve.addClass(n2, "button gears");
1477
1484
  var s2 = document.createElement("span");
1478
- s2.innerHTML = "Save", ge.addClass(s2, "button"), ge.addClass(s2, "save");
1485
+ s2.innerHTML = "Save", ve.addClass(s2, "button"), ve.addClass(s2, "save");
1479
1486
  var i2 = document.createElement("span");
1480
- i2.innerHTML = "New", ge.addClass(i2, "button"), ge.addClass(i2, "save-as");
1487
+ i2.innerHTML = "New", ve.addClass(i2, "button"), ve.addClass(i2, "save-as");
1481
1488
  var o2 = document.createElement("span");
1482
- o2.innerHTML = "Revert", ge.addClass(o2, "button"), ge.addClass(o2, "revert");
1489
+ o2.innerHTML = "Revert", ve.addClass(o2, "button"), ve.addClass(o2, "revert");
1483
1490
  var r2 = e5.__preset_select = document.createElement("select");
1484
- e5.load && e5.load.remembered ? Z.each(e5.load.remembered, function(t4, n3) {
1485
- Ye(e5, n3, n3 === e5.preset);
1486
- }) : Ye(e5, He, false);
1487
- if (ge.bind(r2, "change", function() {
1491
+ e5.load && e5.load.remembered ? Q.each(e5.load.remembered, function(t4, n3) {
1492
+ Ze(e5, n3, n3 === e5.preset);
1493
+ }) : Ze(e5, je, false);
1494
+ if (ve.bind(r2, "change", function() {
1488
1495
  for (var t4 = 0; t4 < e5.__preset_select.length; t4++) e5.__preset_select[t4].innerHTML = e5.__preset_select[t4].value;
1489
1496
  e5.preset = this.value;
1490
- }), t3.appendChild(r2), t3.appendChild(n2), t3.appendChild(s2), t3.appendChild(i2), t3.appendChild(o2), Be) {
1497
+ }), t3.appendChild(r2), t3.appendChild(n2), t3.appendChild(s2), t3.appendChild(i2), t3.appendChild(o2), Re) {
1491
1498
  var a2 = document.getElementById("dg-local-explain"), l2 = document.getElementById("dg-local-storage");
1492
- document.getElementById("dg-save-locally").style.display = "block", "true" === localStorage.getItem(Je(e5, "isLocal")) && l2.setAttribute("checked", "checked"), Ke(e5, a2), ge.bind(l2, "change", function() {
1493
- e5.useLocalStorage = !e5.useLocalStorage, Ke(e5, a2);
1499
+ document.getElementById("dg-save-locally").style.display = "block", "true" === localStorage.getItem(Ke(e5, "isLocal")) && l2.setAttribute("checked", "checked"), qe(e5, a2), ve.bind(l2, "change", function() {
1500
+ e5.useLocalStorage = !e5.useLocalStorage, qe(e5, a2);
1494
1501
  });
1495
1502
  }
1496
1503
  var d2 = document.getElementById("dg-new-constructor");
1497
- ge.bind(d2, "keydown", function(e6) {
1498
- !e6.metaKey || 67 !== e6.which && 67 !== e6.keyCode || je.hide();
1499
- }), ge.bind(n2, "click", function() {
1500
- d2.innerHTML = JSON.stringify(e5.getSaveObject(), void 0, 2), je.show(), d2.focus(), d2.select();
1501
- }), ge.bind(s2, "click", function() {
1504
+ ve.bind(d2, "keydown", function(e6) {
1505
+ !e6.metaKey || 67 !== e6.which && 67 !== e6.keyCode || ze.hide();
1506
+ }), ve.bind(n2, "click", function() {
1507
+ d2.innerHTML = JSON.stringify(e5.getSaveObject(), void 0, 2), ze.show(), d2.focus(), d2.select();
1508
+ }), ve.bind(s2, "click", function() {
1502
1509
  e5.save();
1503
- }), ge.bind(i2, "click", function() {
1510
+ }), ve.bind(i2, "click", function() {
1504
1511
  var t4 = prompt("Enter a new preset name.");
1505
1512
  t4 && e5.saveAs(t4);
1506
- }), ge.bind(o2, "click", function() {
1513
+ }), ve.bind(o2, "click", function() {
1507
1514
  e5.revert();
1508
1515
  });
1509
1516
  }(e4), -1 === e4.__rememberedObjects.indexOf(t2) && e4.__rememberedObjects.push(t2);
1510
- }), this.autoPlace && qe(this, this.width);
1517
+ }), this.autoPlace && $e(this, this.width);
1511
1518
  }, getRoot: function() {
1512
1519
  for (var e4 = this; e4.parent; ) e4 = e4.parent;
1513
1520
  return e4;
1514
1521
  }, getSaveObject: function() {
1515
1522
  var e4 = this.load;
1516
- return e4.closed = this.closed, this.__rememberedObjects.length > 0 && (e4.preset = this.preset, e4.remembered || (e4.remembered = {}), e4.remembered[this.preset] = Qe(this)), e4.folders = {}, Z.each(this.__folders, function(t2, n2) {
1523
+ return e4.closed = this.closed, this.__rememberedObjects.length > 0 && (e4.preset = this.preset, e4.remembered || (e4.remembered = {}), e4.remembered[this.preset] = et(this)), e4.folders = {}, Q.each(this.__folders, function(t2, n2) {
1517
1524
  e4.folders[n2] = t2.getSaveObject();
1518
1525
  }), e4;
1519
1526
  }, save: function() {
1520
- this.load.remembered || (this.load.remembered = {}), this.load.remembered[this.preset] = Qe(this), Ne(this, false), this.saveToLocalStorageIfPossible();
1527
+ this.load.remembered || (this.load.remembered = {}), this.load.remembered[this.preset] = et(this), We(this, false), this.saveToLocalStorageIfPossible();
1521
1528
  }, saveAs: function(e4) {
1522
- this.load.remembered || (this.load.remembered = {}, this.load.remembered[He] = Qe(this, true)), this.load.remembered[e4] = Qe(this), this.preset = e4, Ye(this, e4, true), this.saveToLocalStorageIfPossible();
1529
+ this.load.remembered || (this.load.remembered = {}, this.load.remembered[je] = et(this, true)), this.load.remembered[e4] = et(this), this.preset = e4, Ze(this, e4, true), this.saveToLocalStorageIfPossible();
1523
1530
  }, revert: function(e4) {
1524
- Z.each(this.__controllers, function(t2) {
1525
- this.getRoot().load.remembered ? Xe(e4 || this.getRoot(), t2) : t2.setValue(t2.initialValue), t2.__onFinishChange && t2.__onFinishChange.call(t2, t2.getValue());
1526
- }, this), Z.each(this.__folders, function(e5) {
1531
+ Q.each(this.__controllers, function(t2) {
1532
+ this.getRoot().load.remembered ? Je(e4 || this.getRoot(), t2) : t2.setValue(t2.initialValue), t2.__onFinishChange && t2.__onFinishChange.call(t2, t2.getValue());
1533
+ }, this), Q.each(this.__folders, function(e5) {
1527
1534
  e5.revert(e5);
1528
- }), e4 || Ne(this.getRoot(), false);
1535
+ }), e4 || We(this.getRoot(), false);
1529
1536
  }, listen: function(e4) {
1530
1537
  var t2 = 0 === this.__listening.length;
1531
- this.__listening.push(e4), t2 && $e(this.__listening);
1538
+ this.__listening.push(e4), t2 && tt(this.__listening);
1532
1539
  }, updateDisplay: function() {
1533
- Z.each(this.__controllers, function(e4) {
1540
+ Q.each(this.__controllers, function(e4) {
1534
1541
  e4.updateDisplay();
1535
- }), Z.each(this.__folders, function(e4) {
1542
+ }), Q.each(this.__folders, function(e4) {
1536
1543
  e4.updateDisplay();
1537
1544
  });
1538
1545
  } });
1539
- var et = Ue;
1540
- const tt = { autoPlace: true, width: 300, useProxy: false, closed: false }, nt = ["立方体", "球体", "圆柱体", "圆锥体", "圆环", "平面", "圆环结", "十二面体", "二十面体", "八面体", "四面体"], st = ["基础材质", "标准材质", "Lambert材质", "Phong材质", "物理材质", "Toon材质"], it = ["AmbientLight", "DirectionalLight", "PointLight", "SpotLight", "HemisphereLight", "RectAreaLight"], ot = ["围栏物体", "平面绘制", "曲线路径", "直线路径"], rt = ["场景交点", "地图区域中心", "地图行政中心"];
1541
- class at extends k {
1546
+ var nt = Ve;
1547
+ const st = { autoPlace: true, width: 300, useProxy: false, closed: false }, it = ["立方体", "球体", "圆柱体", "圆锥体", "圆环", "平面", "圆环结", "十二面体", "二十面体", "八面体", "四面体"], ot = ["基础材质", "标准材质", "Lambert材质", "Phong材质", "物理材质", "Toon材质"], rt = ["AmbientLight", "DirectionalLight", "PointLight", "SpotLight", "HemisphereLight", "RectAreaLight"], at = ["围栏物体", "平面绘制", "曲线路径", "直线路径"], lt = ["场景交点", "地图区域中心", "地图行政中心"];
1548
+ class dt extends k {
1542
1549
  constructor(e4) {
1543
- super({ ...tt, ...e4 }), this.name = "gui", this._gui = null, this.sceneFolder = null, this.controlFolder = null, this.meshFolder = null, this.animationFolder = null, this.selectPanel = null, this.modelListFolder = null, this.innerMeshListFolder = null, this.drawMeshListFolder = null, this.geoMapListFolder = null, this.particleListFolder = null, this.borderGroupListFolder = null, this.textMeshListFolder = null, this.designMeshListFolder = null, this.lightListFolder = null, this.handlerParams = { mode: "变换", isTransformChildren: false, openKey: false }, this.innerMeshParams = { geometryType: "立方体", materialType: "标准材质" }, this.drawParams = { mode: "围栏物体", pointMode: "场景交点", materialType: "标准材质" }, this.geoMapParams = { url: "", materialType: "标准材质" }, this.particleParams = { particlesSum: 1e5, inner: 0, outer: 2e3, maxVelocity: 50, mapUrl: "https://z2586300277.github.io/three-editor/dist/files/channels/snow.png", sportType: "全随机", shaderCodeName: "水波纹" }, this.borderGroupParams = { url: "https://geo.datav.aliyun.com/areas_v3/bound/100000.json", materialType: "基础材质", dlength: 0 }, this.textMeshParams = { fontLink: "https://z2586300277.github.io/three-editor/dist/files/font/cn1.json", text: "", materialType: "标准材质" }, this.designMeshParams = { type: "镜面" }, this.lightParams = { lightType: "AmbientLight" };
1550
+ super({ ...st, ...e4 }), this.name = "gui", this._gui = null, this.sceneFolder = null, this.controlFolder = null, this.meshFolder = null, this.animationFolder = null, this.selectPanel = null, this.modelListFolder = null, this.innerMeshListFolder = null, this.drawMeshListFolder = null, this.geoMapListFolder = null, this.particleListFolder = null, this.borderGroupListFolder = null, this.textMeshListFolder = null, this.designMeshListFolder = null, this.lightListFolder = null, this.handlerParams = { mode: "变换", isTransformChildren: false, openKey: false }, this.innerMeshParams = { geometryType: "立方体", materialType: "标准材质" }, this.drawParams = { mode: "围栏物体", pointMode: "场景交点", materialType: "标准材质" }, this.geoMapParams = { url: "", materialType: "标准材质" }, this.particleParams = { particlesSum: 1e5, inner: 0, outer: 2e3, maxVelocity: 50, mapUrl: "https://z2586300277.github.io/three-editor/dist/files/channels/snow.png", sportType: "全随机", shaderCodeName: "水波纹" }, this.borderGroupParams = { url: "https://geo.datav.aliyun.com/areas_v3/bound/100000.json", materialType: "基础材质", dlength: 0 }, this.textMeshParams = { fontLink: "https://z2586300277.github.io/three-editor/dist/files/font/cn1.json", text: "", materialType: "标准材质" }, this.designMeshParams = { type: "镜面" }, this.lightParams = { lightType: "AmbientLight" };
1544
1551
  }
1545
1552
  onInstall() {
1546
1553
  this.createGUI();
@@ -1556,7 +1563,7 @@ class at extends k {
1556
1563
  return ((_a = this._gui) == null ? void 0 : _a.domElement) ?? null;
1557
1564
  }
1558
1565
  createGUI() {
1559
- this.config.useProxy || (this._gui = new et({ autoPlace: this.config.autoPlace, width: this.config.width }), this.createSceneFolder(), this.createControlFolder(), this.createMeshFolder(), this.createAnimationFolder());
1566
+ this.config.useProxy || (this._gui = new nt({ autoPlace: this.config.autoPlace, width: this.config.width }), this.createSceneFolder(), this.createControlFolder(), this.createMeshFolder(), this.createAnimationFolder());
1560
1567
  }
1561
1568
  createSceneFolder() {
1562
1569
  this._gui && (this.sceneFolder = this._gui.addFolder("场景配置"), this.createRendererFolder(), this.createCameraFolder(), this.createOrbitControlsFolder(), this.createEnvironmentFolder(), this.createLightGroupFolder(), this.createComposerFolder(), this.config.closed || this.sceneFolder.open());
@@ -1615,7 +1622,7 @@ class at extends k {
1615
1622
  createLightGroupFolder() {
1616
1623
  if (!this.sceneFolder) return;
1617
1624
  const e4 = this.sceneFolder.addFolder("灯光配置");
1618
- this.lightListFolder = e4.addFolder("灯光列表"), e4.add(this.lightParams, "lightType", it).name("光源类型"), e4.add({ fn: () => {
1625
+ this.lightListFolder = e4.addFolder("灯光列表"), e4.add(this.lightParams, "lightType", rt).name("光源类型"), e4.add({ fn: () => {
1619
1626
  const e5 = this.createLight(this.lightParams.lightType);
1620
1627
  this.scene.add(e5), this.addLightPanel(e5), this.events.emit("light:add", { light: e5 });
1621
1628
  } }, "fn").name("添加光源"), this.scene.children.forEach((e5) => {
@@ -1819,7 +1826,7 @@ class at extends k {
1819
1826
  createDrawFolder() {
1820
1827
  if (!this.meshFolder) return;
1821
1828
  const e4 = this.meshFolder.addFolder("绘制配置");
1822
- this.drawMeshListFolder = e4.addFolder("已有列表"), e4.add(this.drawParams, "mode", ot).name("绘制模式"), e4.add(this.drawParams, "pointMode", rt).name("点模式"), e4.add(this.drawParams, "materialType", st).name("材质"), e4.add({ fn: () => {
1829
+ this.drawMeshListFolder = e4.addFolder("已有列表"), e4.add(this.drawParams, "mode", at).name("绘制模式"), e4.add(this.drawParams, "pointMode", lt).name("点模式"), e4.add(this.drawParams, "materialType", ot).name("材质"), e4.add({ fn: () => {
1823
1830
  this.events.emit("draw:start", { mode: this.drawParams.mode, pointMode: this.drawParams.pointMode, materialType: this.drawParams.materialType });
1824
1831
  } }, "fn").name("添加绘制组");
1825
1832
  }
@@ -1837,7 +1844,7 @@ class at extends k {
1837
1844
  createInnerMeshFolder() {
1838
1845
  if (!this.meshFolder) return;
1839
1846
  const e4 = this.meshFolder.addFolder("内置物体");
1840
- this.innerMeshListFolder = e4.addFolder("已有列表"), e4.add(this.innerMeshParams, "geometryType", nt).name("几何体"), e4.add(this.innerMeshParams, "materialType", st).name("材质"), e4.add({ fn: () => {
1847
+ this.innerMeshListFolder = e4.addFolder("已有列表"), e4.add(this.innerMeshParams, "geometryType", it).name("几何体"), e4.add(this.innerMeshParams, "materialType", ot).name("材质"), e4.add({ fn: () => {
1841
1848
  var _a;
1842
1849
  const e5 = this.createGeometry(this.innerMeshParams.geometryType), n2 = this.createMaterial(this.innerMeshParams.materialType), s2 = new t.Mesh(e5, n2);
1843
1850
  s2.isInnerMesh = true, s2.geometryType = this.innerMeshParams.geometryType, s2.materialType = this.innerMeshParams.materialType, this.scene.add(s2), this.addInnerMeshPanel(s2);
@@ -1876,7 +1883,7 @@ class at extends k {
1876
1883
  createGeoMapFolder() {
1877
1884
  if (!this.meshFolder) return;
1878
1885
  const e4 = this.meshFolder.addFolder("三维地图");
1879
- this.geoMapListFolder = e4.addFolder("地图列表"), e4.add(this.geoMapParams, "url").name("地图数据地址"), e4.add(this.geoMapParams, "materialType", st).name("地图材质类型"), e4.add({ fn: () => {
1886
+ this.geoMapListFolder = e4.addFolder("地图列表"), e4.add(this.geoMapParams, "url").name("地图数据地址"), e4.add(this.geoMapParams, "materialType", ot).name("地图材质类型"), e4.add({ fn: () => {
1880
1887
  const e5 = this.geoMapParams.url || "https://z2586300277.github.io/3d-file-server/files/json/guangdong.json";
1881
1888
  this.events.emit("geomap:load", { url: e5, materialType: this.geoMapParams.materialType });
1882
1889
  } }, "fn").name("添加地图");
@@ -1915,7 +1922,7 @@ class at extends k {
1915
1922
  createBorderGroupFolder() {
1916
1923
  if (!this.meshFolder) return;
1917
1924
  const e4 = this.meshFolder.addFolder("边界物体");
1918
- this.borderGroupListFolder = e4.addFolder("列表"), e4.add(this.borderGroupParams, "url").name("边界物体数据源"), e4.add(this.borderGroupParams, "materialType", st).name("材质类型"), e4.add(this.borderGroupParams, "dlength", 0).name("低于点数舍弃"), e4.add({ fn: () => {
1925
+ this.borderGroupListFolder = e4.addFolder("列表"), e4.add(this.borderGroupParams, "url").name("边界物体数据源"), e4.add(this.borderGroupParams, "materialType", ot).name("材质类型"), e4.add(this.borderGroupParams, "dlength", 0).name("低于点数舍弃"), e4.add({ fn: () => {
1919
1926
  this.events.emit("bordergroup:create", { ...this.borderGroupParams });
1920
1927
  } }, "fn").name("添加边界物体");
1921
1928
  }
@@ -1933,7 +1940,7 @@ class at extends k {
1933
1940
  createTextMeshFolder() {
1934
1941
  if (!this.meshFolder) return;
1935
1942
  const e4 = this.meshFolder.addFolder("文本物体");
1936
- this.textMeshListFolder = e4.addFolder("列表"), e4.add(this.textMeshParams, "fontLink").name("字体链接"), e4.add(this.textMeshParams, "materialType", st).name("材质类型"), e4.add(this.textMeshParams, "text").name("文本内容"), e4.add({ fn: () => {
1943
+ this.textMeshListFolder = e4.addFolder("列表"), e4.add(this.textMeshParams, "fontLink").name("字体链接"), e4.add(this.textMeshParams, "materialType", ot).name("材质类型"), e4.add(this.textMeshParams, "text").name("文本内容"), e4.add({ fn: () => {
1937
1944
  this.textMeshParams.text && this.events.emit("textmesh:create", { ...this.textMeshParams });
1938
1945
  } }, "fn").name("添加文本物体");
1939
1946
  }
@@ -2133,10 +2140,10 @@ class at extends k {
2133
2140
  return this.handlerParams.mode;
2134
2141
  }
2135
2142
  }
2136
- const lt = { grid: { enabled: true, size: 100, divisions: 100, colorCenterLine: 4473924, colorGrid: 8947848 }, axes: { enabled: true, size: 5 }, stats: { enabled: false, mode: 0 }, viewHelper: { enabled: false, size: 128, position: "bottom-right" }, box3Helper: { enabled: false, color: 16776960 } };
2137
- class dt extends k {
2143
+ const ct = { grid: { enabled: true, size: 100, divisions: 100, colorCenterLine: 4473924, colorGrid: 8947848 }, axes: { enabled: true, size: 5 }, stats: { enabled: false, mode: 0 }, viewHelper: { enabled: false, size: 128, position: "bottom-right" }, box3Helper: { enabled: false, color: 16776960 } };
2144
+ class ht extends k {
2138
2145
  constructor(e4) {
2139
- super({ ...lt, ...e4 }), this.name = "gizmo", this.gridHelper = null, this.axesHelper = null, this.stats = null, this.viewHelper = null, this.box3Helper = null, this.currentBox3 = null;
2146
+ super({ ...ct, ...e4 }), this.name = "gizmo", this.gridHelper = null, this.axesHelper = null, this.stats = null, this.viewHelper = null, this.box3Helper = null, this.currentBox3 = null;
2140
2147
  }
2141
2148
  onInstall() {
2142
2149
  this.config.grid.enabled && this.createGridHelper(), this.config.axes.enabled && this.createAxesHelper(), this.config.stats.enabled && this.createStats(), this.config.viewHelper.enabled && this.createViewHelper(), this.subscribe("object:selected", (e4) => {
@@ -2244,50 +2251,50 @@ class dt extends k {
2244
2251
  return { ...this.config };
2245
2252
  }
2246
2253
  }
2247
- function ct(e4, n2, s2 = 0.9) {
2254
+ function ut(e4, n2, s2 = 0.9) {
2248
2255
  const i2 = e4.distanceTo(n2);
2249
2256
  return new t.Vector3().subVectors(n2, e4).normalize().multiplyScalar(i2 * s2).add(e4);
2250
2257
  }
2251
- function ht(e4, n2, s2) {
2258
+ function mt(e4, n2, s2) {
2252
2259
  return new t.Vector3().subVectors(n2, e4).normalize().multiplyScalar(s2).add(e4);
2253
2260
  }
2254
- function ut(e4) {
2261
+ function pt(e4) {
2255
2262
  return e4 * (Math.PI / 180);
2256
2263
  }
2257
- function mt(e4) {
2264
+ function ft(e4) {
2258
2265
  return e4 * (180 / Math.PI);
2259
2266
  }
2260
- function pt(e4, t2, n2) {
2267
+ function gt(e4, t2, n2) {
2261
2268
  return Math.max(t2, Math.min(n2, e4));
2262
2269
  }
2263
- function ft(e4, t2, n2) {
2270
+ function _t(e4, t2, n2) {
2264
2271
  return e4 + (t2 - e4) * n2;
2265
2272
  }
2266
- function gt(e4, t2, n2) {
2267
- const s2 = pt((n2 - e4) / (t2 - e4), 0, 1);
2273
+ function vt(e4, t2, n2) {
2274
+ const s2 = gt((n2 - e4) / (t2 - e4), 0, 1);
2268
2275
  return s2 * s2 * (3 - 2 * s2);
2269
2276
  }
2270
- function _t(e4) {
2277
+ function bt(e4) {
2271
2278
  const n2 = new t.Box3().setFromObject(e4), { max: s2, min: i2 } = n2, o2 = new t.Vector3();
2272
2279
  n2.getCenter(o2);
2273
2280
  return { max: s2, min: i2, center: o2, radius: new t.Vector3().subVectors(s2, i2).length() / 2 };
2274
2281
  }
2275
- function vt(e4, n2 = 2.5) {
2276
- const { center: s2, max: i2 } = _t(e4);
2277
- return { position: ht(s2, i2, new t.Vector3().subVectors(i2, s2).length() * n2), target: s2 };
2282
+ function yt(e4, n2 = 2.5) {
2283
+ const { center: s2, max: i2 } = bt(e4);
2284
+ return { position: mt(s2, i2, new t.Vector3().subVectors(i2, s2).length() * n2), target: s2 };
2278
2285
  }
2279
- function bt(e4, n2 = 50) {
2280
- const { center: s2, max: i2, min: o2, radius: r2 } = _t(e4), a2 = r2 / Math.tan(n2 * Math.PI / 360);
2286
+ function wt(e4, n2 = 50) {
2287
+ const { center: s2, max: i2, min: o2, radius: r2 } = bt(e4), a2 = r2 / Math.tan(n2 * Math.PI / 360);
2281
2288
  return { frontView: new t.Vector3(s2.x, s2.y, i2.z + a2), backView: new t.Vector3(s2.x, s2.y, o2.z - a2), leftView: new t.Vector3(o2.x - a2, s2.y, s2.z), rightView: new t.Vector3(i2.x + a2, s2.y, s2.z), topView: new t.Vector3(s2.x, i2.y + a2, s2.z), bottomView: new t.Vector3(s2.x, o2.y - a2, s2.z), target: s2 };
2282
2289
  }
2283
- function yt(e4 = 16776960) {
2290
+ function xt(e4 = 16776960) {
2284
2291
  const n2 = new t.Box3(), s2 = new t.Box3Helper(n2, e4);
2285
2292
  return s2.name = "Box3Helper", s2.visible = false, s2;
2286
2293
  }
2287
- const wt = { speed: 0.01, mixRatio: 0.5 };
2288
- class xt extends k {
2294
+ const Ct = { speed: 0.01, mixRatio: 0.5 };
2295
+ class Mt extends k {
2289
2296
  constructor(e4) {
2290
- super({ ...wt, ...e4 }), this.name = "shader", this.presets = /* @__PURE__ */ new Map(), this.appliedObjects = /* @__PURE__ */ new Map(), this.shaderAnimations = [];
2297
+ super({ ...Ct, ...e4 }), this.name = "shader", this.presets = /* @__PURE__ */ new Map(), this.appliedObjects = /* @__PURE__ */ new Map(), this.shaderAnimations = [];
2291
2298
  }
2292
2299
  onInstall() {
2293
2300
  this.registerBuiltinPresets();
@@ -2394,10 +2401,10 @@ ${n2.fragFunc || ""}`), e5.fragmentShader = e5.fragmentShader.replace("vec4 diff
2394
2401
  }), [...new Set(t2)];
2395
2402
  }
2396
2403
  }
2397
- const Ct = { defaultDuration: 2, defaultEase: "power2.inOut" };
2398
- class Mt extends k {
2404
+ const Pt = { defaultDuration: 2, defaultEase: "power2.inOut" };
2405
+ class St extends k {
2399
2406
  constructor(e4) {
2400
- super({ ...Ct, ...e4 }), this.name = "animation", this.mixers = [], this.curveAnimations = [], this.tweens = [];
2407
+ super({ ...Pt, ...e4 }), this.name = "animation", this.mixers = [], this.curveAnimations = [], this.tweens = [];
2401
2408
  }
2402
2409
  onUninstall() {
2403
2410
  this.stopAll();
@@ -2510,10 +2517,10 @@ class Mt extends k {
2510
2517
  for (const e4 of this.tweens) e4.resume();
2511
2518
  }
2512
2519
  }
2513
- const Pt = { defaultMode: "围栏物体", defaultPointMode: "场景交点", defaultMaterialType: "标准材质", fenceHeight: 5, lineWidth: 0.01 };
2514
- class St extends k {
2520
+ const Ft = { defaultMode: "围栏物体", defaultPointMode: "场景交点", defaultMaterialType: "标准材质", fenceHeight: 5, lineWidth: 0.01 };
2521
+ class Et extends k {
2515
2522
  constructor(e4) {
2516
- super({ ...Pt, ...e4 }), this.name = "drawing", this.currentPoints = [], this.previewMesh = null, this._isDrawing = false, this.drawnObjects = [], this._mode = this.config.defaultMode, this._pointMode = this.config.defaultPointMode;
2523
+ super({ ...Ft, ...e4 }), this.name = "drawing", this.currentPoints = [], this.previewMesh = null, this._isDrawing = false, this.drawnObjects = [], this._mode = this.config.defaultMode, this._pointMode = this.config.defaultPointMode;
2517
2524
  }
2518
2525
  get mode() {
2519
2526
  return this._mode;
@@ -2657,10 +2664,10 @@ class St extends k {
2657
2664
  return this.scene.children.filter((e4) => e4.isCurveMesh).map((e4) => ({ path: e4.curvePath, mesh: e4 }));
2658
2665
  }
2659
2666
  }
2660
- const Ft = { materialType: "标准材质", coordinateScale: 1e4 };
2661
- class Et extends k {
2667
+ const At = { materialType: "标准材质", coordinateScale: 1e4 };
2668
+ class kt extends k {
2662
2669
  constructor(e4) {
2663
- super({ ...Ft, ...e4 }), this.name = "geomap", this.geoGroups = [];
2670
+ super({ ...At, ...e4 }), this.name = "geomap", this.geoGroups = [];
2664
2671
  }
2665
2672
  onUninstall() {
2666
2673
  this.clearAll();
@@ -2755,10 +2762,10 @@ class Et extends k {
2755
2762
  e4.material instanceof t.MeshStandardMaterial && (e4.material.emissiveIntensity = 0);
2756
2763
  }
2757
2764
  }
2758
- const At = { defaultSize: 1 };
2759
- class kt extends k {
2765
+ const Tt = { defaultSize: 1 };
2766
+ class Lt extends k {
2760
2767
  constructor(e4) {
2761
- super({ ...At, ...e4 }), this.name = "geometry", this.geometryTypes = ["立方体", "球体", "圆柱体", "圆锥体", "平面", "圆环", "圆环结", "十二面体", "二十面体", "八面体", "四面体", "胶囊体"], this.innerMeshes = [];
2768
+ super({ ...Tt, ...e4 }), this.name = "geometry", this.geometryTypes = ["立方体", "球体", "圆柱体", "圆锥体", "平面", "圆环", "圆环结", "十二面体", "二十面体", "八面体", "四面体", "胶囊体"], this.innerMeshes = [];
2762
2769
  }
2763
2770
  onUninstall() {
2764
2771
  this.clearAll();
@@ -2824,10 +2831,10 @@ class kt extends k {
2824
2831
  e4.geometry = this.createGeometry(t2, n2), e4.geometry.geometryType = t2, s2.dispose();
2825
2832
  }
2826
2833
  }
2827
- const Tt = { defaultType: "标准材质", defaultColor: 8421504 };
2828
- class Lt extends k {
2834
+ const Ht = { defaultType: "标准材质", defaultColor: 8421504 };
2835
+ class Ot extends k {
2829
2836
  constructor(e4) {
2830
- super({ ...Tt, ...e4 }), this.name = "material", this.materialTypes = ["基础材质", "标准材质", "物理材质", "Lambert材质", "Phong材质", "Toon材质", "法线材质", "深度材质"];
2837
+ super({ ...Ht, ...e4 }), this.name = "material", this.materialTypes = ["基础材质", "标准材质", "物理材质", "Lambert材质", "Phong材质", "Toon材质", "法线材质", "深度材质"];
2831
2838
  }
2832
2839
  createMaterial(e4, n2) {
2833
2840
  const s2 = n2 || {}, i2 = { color: s2.color ?? this.config.defaultColor, opacity: s2.opacity ?? 1, transparent: s2.transparent ?? false, side: s2.side ?? t.FrontSide, wireframe: s2.wireframe ?? false };
@@ -2899,10 +2906,10 @@ class Lt extends k {
2899
2906
  }), [...new Set(t2)];
2900
2907
  }
2901
2908
  }
2902
- const Ot = { particlesSum: 1e4, inner: 0, outer: 100, maxVelocity: 10, mapUrl: "", shaderCodeName: "雪片着色", sportType: "全随机" };
2903
- class Ht extends k {
2909
+ const Bt = { particlesSum: 1e4, inner: 0, outer: 100, maxVelocity: 10, mapUrl: "", shaderCodeName: "雪片着色", sportType: "全随机" };
2910
+ class jt extends k {
2904
2911
  constructor(e4) {
2905
- super({ ...Ot, ...e4 }), this.name = "particle", this.sportTypes = ["全随机", "随机向下", "随机向上", "直线匀速向上", "直线匀速向下"], this.particleSystems = [], this.textureLoader = new t.TextureLoader();
2912
+ super({ ...Bt, ...e4 }), this.name = "particle", this.sportTypes = ["全随机", "随机向下", "随机向上", "直线匀速向上", "直线匀速向下"], this.particleSystems = [], this.textureLoader = new t.TextureLoader();
2906
2913
  }
2907
2914
  onUninstall() {
2908
2915
  this.clearAll();
@@ -2972,10 +2979,10 @@ class Ht extends k {
2972
2979
  e4.visible = t2;
2973
2980
  }
2974
2981
  }
2975
- const Bt = { gravity: { x: 0, y: -9.82, z: 0 }, defaultMass: 1 };
2976
- class jt extends k {
2982
+ const Rt = { gravity: { x: 0, y: -9.82, z: 0 }, defaultMass: 1 };
2983
+ class zt extends k {
2977
2984
  constructor(e4) {
2978
- super({ ...Bt, ...e4 }), this.name = "physics", this.bodies = [], this._enabled = true;
2985
+ super({ ...Rt, ...e4 }), this.name = "physics", this.bodies = [], this._enabled = true;
2979
2986
  }
2980
2987
  get physicsWorld() {
2981
2988
  return this.world;
@@ -3002,7 +3009,7 @@ class jt extends k {
3002
3009
  this.world.gravity.set(e4, t2, n2), this.config.gravity = { x: e4, y: t2, z: n2 };
3003
3010
  }
3004
3011
  addBody(e4, t2) {
3005
- const { center: n2, max: s2, min: i2, radius: o2 } = _t(e4), r2 = (t2 == null ? void 0 : t2.isStatic) ? 0 : (t2 == null ? void 0 : t2.mass) ?? this.config.defaultMass;
3012
+ const { center: n2, max: s2, min: i2, radius: o2 } = bt(e4), r2 = (t2 == null ? void 0 : t2.isStatic) ? 0 : (t2 == null ? void 0 : t2.mass) ?? this.config.defaultMass;
3006
3013
  let a2;
3007
3014
  switch (t2 == null ? void 0 : t2.shape) {
3008
3015
  case "sphere":
@@ -3075,10 +3082,10 @@ class jt extends k {
3075
3082
  return this.bodies;
3076
3083
  }
3077
3084
  }
3078
- const Rt = { defaultFontUrl: "https://z2586300277.github.io/three-editor/dist/files/font/cn1.json", defaultSize: 1, defaultHeight: 0.2 };
3079
- class zt extends k {
3085
+ const Dt = { defaultFontUrl: "https://z2586300277.github.io/three-editor/dist/files/font/cn1.json", defaultSize: 1, defaultHeight: 0.2 };
3086
+ class Gt extends k {
3080
3087
  constructor(e4) {
3081
- super({ ...Rt, ...e4 }), this.name = "text", this.fontLoader = new l(), this.fontCache = /* @__PURE__ */ new Map(), this.textMeshes = [];
3088
+ super({ ...Dt, ...e4 }), this.name = "text", this.fontLoader = new l(), this.fontCache = /* @__PURE__ */ new Map(), this.textMeshes = [];
3082
3089
  }
3083
3090
  onUninstall() {
3084
3091
  this.clearAll(), this.fontCache.clear();
@@ -3131,10 +3138,10 @@ class zt extends k {
3131
3138
  this.textMeshes = [];
3132
3139
  }
3133
3140
  }
3134
- const Dt = { fog: { enabled: false, type: "linear", color: 13421772, near: 1, far: 1e3, density: 25e-5 }, skybox: null, environmentMap: null, environmentIntensity: 1, backgroundBlurriness: 0, backgroundIntensity: 1 };
3135
- class Gt extends k {
3141
+ const Ut = { fog: { enabled: false, type: "linear", color: 13421772, near: 1, far: 1e3, density: 25e-5 }, skybox: null, environmentMap: null, environmentIntensity: 1, backgroundBlurriness: 0, backgroundIntensity: 1 };
3142
+ class It extends k {
3136
3143
  constructor(e4) {
3137
- super({ ...Dt, ...e4 }), this.name = "environment", this.rgbeLoader = new E(), this.cubeTextureLoader = new t.CubeTextureLoader(), this.textureLoader = new t.TextureLoader(), this.currentEnvMap = null, this.currentBackground = null;
3144
+ super({ ...Ut, ...e4 }), this.name = "environment", this.rgbeLoader = new E(), this.cubeTextureLoader = new t.CubeTextureLoader(), this.textureLoader = new t.TextureLoader(), this.currentEnvMap = null, this.currentBackground = null;
3138
3145
  }
3139
3146
  onInstall() {
3140
3147
  this.config.fog.enabled && this.setFog(this.config.fog), this.config.skybox && this.setSkybox(this.config.skybox), this.config.environmentMap && this.setEnvironmentMap(this.config.environmentMap);
@@ -3244,10 +3251,10 @@ class Gt extends k {
3244
3251
  return { ...this.config };
3245
3252
  }
3246
3253
  }
3247
- const Ut = { version: "1.0.0", includeGeometry: false, includeMaterial: true, includeUserData: true, excludeHelpers: true };
3248
- class It extends k {
3254
+ const Vt = { version: "1.0.0", includeGeometry: false, includeMaterial: true, includeUserData: true, excludeHelpers: true };
3255
+ class Nt extends k {
3249
3256
  constructor(e4) {
3250
- super({ ...Ut, ...e4 }), this.name = "serialization";
3257
+ super({ ...Vt, ...e4 }), this.name = "serialization";
3251
3258
  }
3252
3259
  serialize() {
3253
3260
  const e4 = this.scene, t2 = this.camera;
@@ -3351,61 +3358,61 @@ class It extends k {
3351
3358
  }
3352
3359
  }
3353
3360
  export {
3354
- gt as $,
3355
- Mt as A,
3356
- it as B,
3361
+ vt as $,
3362
+ St as A,
3363
+ rt as B,
3357
3364
  z as C,
3358
- X as D,
3359
- W as E,
3360
- ot as F,
3361
- kt as G,
3362
- rt as H,
3363
- ct as I,
3364
- vt as J,
3365
- bt as K,
3365
+ J as D,
3366
+ Y as E,
3367
+ at as F,
3368
+ Lt as G,
3369
+ lt as H,
3370
+ ut as I,
3371
+ yt as J,
3372
+ wt as K,
3366
3373
  j as L,
3367
- Lt as M,
3374
+ Ot as M,
3368
3375
  G as N,
3369
3376
  L as O,
3370
3377
  k as P,
3371
3378
  U as Q,
3372
- I as R,
3373
- xt as S,
3374
- H as T,
3375
- V as U,
3376
- N as V,
3377
- ht as W,
3378
- ut as X,
3379
- mt as Y,
3380
- pt as Z,
3381
- ft as _,
3379
+ N as R,
3380
+ Mt as S,
3381
+ O as T,
3382
+ X as U,
3383
+ W as V,
3384
+ mt as W,
3385
+ pt as X,
3386
+ ft as Y,
3387
+ gt as Z,
3388
+ _t as _,
3382
3389
  A as a,
3383
- _t as a0,
3384
- yt as a1,
3390
+ bt as a0,
3391
+ xt as a1,
3385
3392
  T as b,
3386
- O as c,
3393
+ H as c,
3387
3394
  B as d,
3388
3395
  R as e,
3389
3396
  D as f,
3390
- At as g,
3391
- Tt as h,
3392
- wt as i,
3393
- Ct as j,
3394
- St as k,
3395
- Pt as l,
3396
- Et as m,
3397
- Ft as n,
3398
- Ht as o,
3399
- Ot as p,
3400
- jt as q,
3401
- Bt as r,
3402
- zt as s,
3403
- dt as t,
3404
- Gt as u,
3405
- It as v,
3406
- at as w,
3407
- tt as x,
3408
- nt as y,
3409
- st as z
3397
+ Tt as g,
3398
+ Ht as h,
3399
+ Ct as i,
3400
+ Pt as j,
3401
+ Et as k,
3402
+ Ft as l,
3403
+ kt as m,
3404
+ At as n,
3405
+ jt as o,
3406
+ Bt as p,
3407
+ zt as q,
3408
+ Rt as r,
3409
+ Gt as s,
3410
+ ht as t,
3411
+ It as u,
3412
+ Nt as v,
3413
+ dt as w,
3414
+ st as x,
3415
+ it as y,
3416
+ ot as z
3410
3417
  };
3411
- //# sourceMappingURL=SerializationPlugin-CBr1GY5q.js.map
3418
+ //# sourceMappingURL=SerializationPlugin-D418fw5V.js.map