bg2e-js 2.3.10 → 2.3.12

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.
package/dist/bg2e-js.js CHANGED
@@ -8731,7 +8731,7 @@ class w0 extends ce {
8731
8731
  }
8732
8732
  class v0 {
8733
8733
  constructor(e) {
8734
- this._selectionBuffer = null, this._selectionIdVisitor = null, this._downPosition = new h(), this._viewportSize = [1, 1], this._renderer = e, this._sceneRoot = null, this._camera = null, this._selectionMode = mt.POLY_LIST, this._multiSelect = !1, this._selection = [], this._selectionChangedCallbacks = {};
8734
+ this._selectionBuffer = null, this._selectionIdVisitor = null, this._downPosition = new h(), this._viewportSize = [1, 1], this._enabled = !0, this._renderer = e, this._sceneRoot = null, this._camera = null, this._selectionMode = mt.POLY_LIST, this._multiSelect = !1, this._selection = [], this._selectionChangedCallbacks = {};
8735
8735
  }
8736
8736
  async init() {
8737
8737
  this._selectionBuffer = new d0(this._renderer), await this._selectionBuffer.init(), this._selectionIdVisitor = new w0();
@@ -8742,6 +8742,18 @@ class v0 {
8742
8742
  get selection() {
8743
8743
  return this._selection;
8744
8744
  }
8745
+ enable() {
8746
+ this.enabled = !0;
8747
+ }
8748
+ disable() {
8749
+ this.enabled = !1;
8750
+ }
8751
+ get enabled() {
8752
+ return this._enabled;
8753
+ }
8754
+ set enabled(e) {
8755
+ this._enabled = e, this._enabled || this.clearSelection();
8756
+ }
8745
8757
  clearSelection() {
8746
8758
  this._selection.forEach((e) => e.polyList.selected = !1), this._selection = [], this.triggerSelectionChanged();
8747
8759
  }
@@ -8763,6 +8775,12 @@ class v0 {
8763
8775
  get selectionMode() {
8764
8776
  return this._selectionMode;
8765
8777
  }
8778
+ setSelectionMode(e) {
8779
+ this.selectionMode = e;
8780
+ }
8781
+ setMultiSelectMode(e) {
8782
+ this.multiSelectMode = e;
8783
+ }
8766
8784
  set multiSelectMode(e) {
8767
8785
  this._multiSelect = e, this.clearSelection();
8768
8786
  }
@@ -8777,7 +8795,7 @@ class v0 {
8777
8795
  this._selectionChangedCallbacks[e](this._selection);
8778
8796
  }
8779
8797
  mouseUp(e) {
8780
- if (!this._selectionBuffer || !this._selectionIdVisitor || !this.camera || !this.sceneRoot)
8798
+ if (!this._selectionBuffer || !this._selectionIdVisitor || !this.camera || !this.sceneRoot || !this.enabled)
8781
8799
  return;
8782
8800
  const r = new h([e.x, e.y]);
8783
8801
  if (h.Distance(this._downPosition, r) < 2) {