babylonjs-gui 5.15.0 → 5.17.0

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/babylon.gui.d.ts CHANGED
@@ -66,7 +66,7 @@ declare module BABYLON.GUI {
66
66
  private _renderObserver;
67
67
  private _resizeObserver;
68
68
  private _preKeyboardObserver;
69
- private _pointerMoveObserver;
69
+ private _prePointerObserver;
70
70
  private _sceneRenderObserver;
71
71
  private _pointerObserver;
72
72
  private _canvasPointerOutObserver;
@@ -414,21 +414,45 @@ declare module BABYLON.GUI {
414
414
  * @param serializedObject define the JSON serialized object to restore from
415
415
  * @param scaleToSize defines whether to scale to texture to the saved size
416
416
  */
417
- parseContent(serializedObject: any, scaleToSize?: boolean): void;
417
+ parseSerializedObject(serializedObject: any, scaleToSize?: boolean): void;
418
+ /**
419
+ * Recreate the content of the ADT from a JSON object
420
+ * @param serializedObject define the JSON serialized object to restore from
421
+ * @param scaleToSize defines whether to scale to texture to the saved size
422
+ * @deprecated Please use parseSerializedObject instead
423
+ */
424
+ parseContent: (serializedObject: any, scaleToSize?: boolean | undefined) => void;
425
+ /**
426
+ * Recreate the content of the ADT from a snippet saved by the GUI editor
427
+ * @param snippetId defines the snippet to load
428
+ * @param scaleToSize defines whether to scale to texture to the saved size
429
+ * @param appendToAdt if provided the snippet will be appended to the adt. Otherwise a fullscreen ADT will be created.
430
+ * @returns a promise that will resolve on success
431
+ */
432
+ static ParseFromSnippetAsync(snippetId: string, scaleToSize?: boolean, appendToAdt?: AdvancedDynamicTexture): Promise<AdvancedDynamicTexture>;
418
433
  /**
419
434
  * Recreate the content of the ADT from a snippet saved by the GUI editor
420
435
  * @param snippetId defines the snippet to load
421
436
  * @param scaleToSize defines whether to scale to texture to the saved size
422
437
  * @returns a promise that will resolve on success
423
438
  */
424
- parseFromSnippetAsync(snippetId: string, scaleToSize?: boolean): Promise<void>;
439
+ parseFromSnippetAsync(snippetId: string, scaleToSize?: boolean): Promise<AdvancedDynamicTexture>;
440
+ /**
441
+ * Recreate the content of the ADT from a url json
442
+ * @param url defines the url to load
443
+ * @param scaleToSize defines whether to scale to texture to the saved size
444
+ * @param appendToAdt if provided the snippet will be appended to the adt. Otherwise a fullscreen ADT will be created.
445
+ * @returns a promise that will resolve on success
446
+ */
447
+ static ParseFromFileAsync(url: string, scaleToSize?: boolean, appendToAdt?: AdvancedDynamicTexture): Promise<AdvancedDynamicTexture>;
425
448
  /**
426
449
  * Recreate the content of the ADT from a url json
427
450
  * @param url defines the url to load
428
451
  * @param scaleToSize defines whether to scale to texture to the saved size
429
452
  * @returns a promise that will resolve on success
430
453
  */
431
- parseFromURLAsync(url: string, scaleToSize?: boolean): Promise<void>;
454
+ parseFromURLAsync(url: string, scaleToSize?: boolean): Promise<AdvancedDynamicTexture>;
455
+ private static _LoadURLContentAsync;
432
456
  /**
433
457
  * Compares two rectangle based controls for pixel overlap
434
458
  * @param control1 The first control to compare
@@ -1063,7 +1087,13 @@ declare module BABYLON.GUI {
1063
1087
  metadata: any;
1064
1088
  /** Gets or sets a boolean indicating if the control can be hit with pointer events */
1065
1089
  isHitTestVisible: boolean;
1066
- /** Gets or sets a boolean indicating if the control can block pointer events */
1090
+ /** Gets or sets a boolean indicating if the control can block pointer events. False by default except on the following controls:
1091
+ * * Button controls (Button, RadioButton, ToggleButton)
1092
+ * * Checkbox
1093
+ * * ColorPicker
1094
+ * * InputText
1095
+ * * Slider
1096
+ */
1067
1097
  isPointerBlocker: boolean;
1068
1098
  /** Gets or sets a boolean indicating if the control can be focusable */
1069
1099
  isFocusInvisible: boolean;
@@ -4053,7 +4083,7 @@ declare module BABYLON.GUI {
4053
4083
  private _connectedInputTexts;
4054
4084
  private _onKeyPressObserver;
4055
4085
  /** Gets the input text control currently attached to the keyboard */
4056
- get connectedInputText(): BABYLON.Nullable<InputText>;
4086
+ get connectedInputText(): BABYLON.Nullable<InputText | InputTextArea>;
4057
4087
  /**
4058
4088
  * Connects the keyboard with an input text control
4059
4089
  *
@@ -4735,13 +4765,13 @@ declare module BABYLON.GUI {
4735
4765
  export class Control3D implements BABYLON.IDisposable, BABYLON.IBehaviorAware<Control3D> {
4736
4766
  /** Defines the control name */
4737
4767
  name?: string | undefined;
4738
- /** @hidden */
4739
- _host: GUI3DManager;
4740
4768
  private _node;
4741
4769
  private _downCount;
4742
4770
  private _enterCount;
4743
4771
  private _downPointerIds;
4744
- private _isVisible;
4772
+ protected _isVisible: boolean;
4773
+ /** @hidden */
4774
+ _host: GUI3DManager;
4745
4775
  /** @hidden */
4746
4776
  _isScaledByManager: boolean;
4747
4777
  /** Gets or sets the control position in world space */
@@ -5355,6 +5385,8 @@ declare module BABYLON.GUI {
5355
5385
  * Gets the slider backplate material used by this control
5356
5386
  */
5357
5387
  get sliderBackplateMaterial(): MRDLBackplateMaterial;
5388
+ /** Sets a boolean indicating if the control is visible */
5389
+ set isVisible(value: boolean);
5358
5390
  protected _createNode(scene: BABYLON.Scene): BABYLON.TransformNode;
5359
5391
  protected _affectMaterial(mesh: BABYLON.AbstractMesh): void;
5360
5392
  private _createBehavior;
package/babylon.gui.js CHANGED
@@ -603,6 +603,13 @@ var AdvancedDynamicTexture = /** @class */ (function (_super) {
603
603
  _this.onClipboardObservable.notifyObservers(ev);
604
604
  evt.preventDefault();
605
605
  };
606
+ /**
607
+ * Recreate the content of the ADT from a JSON object
608
+ * @param serializedObject define the JSON serialized object to restore from
609
+ * @param scaleToSize defines whether to scale to texture to the saved size
610
+ * @deprecated Please use parseSerializedObject instead
611
+ */
612
+ _this.parseContent = _this.parseSerializedObject;
606
613
  scene = _this.getScene();
607
614
  if (!scene || !_this._texture) {
608
615
  return _this;
@@ -1048,8 +1055,8 @@ var AdvancedDynamicTexture = /** @class */ (function (_super) {
1048
1055
  if (this._resizeObserver) {
1049
1056
  scene.getEngine().onResizeObservable.remove(this._resizeObserver);
1050
1057
  }
1051
- if (this._pointerMoveObserver) {
1052
- scene.onPrePointerObservable.remove(this._pointerMoveObserver);
1058
+ if (this._prePointerObserver) {
1059
+ scene.onPrePointerObservable.remove(this._prePointerObserver);
1053
1060
  }
1054
1061
  if (this._sceneRenderObserver) {
1055
1062
  scene.onBeforeRenderObservable.remove(this._sceneRenderObserver);
@@ -1261,6 +1268,9 @@ var AdvancedDynamicTexture = /** @class */ (function (_super) {
1261
1268
  y = y * (textureSize.height / (engine.getRenderHeight() * viewport.height));
1262
1269
  }
1263
1270
  if (this._capturingControl[pointerId]) {
1271
+ if (this._capturingControl[pointerId].isPointerBlocker) {
1272
+ this._shouldBlockPointer = true;
1273
+ }
1264
1274
  this._capturingControl[pointerId]._processObservables(type, x, y, pi, pointerId, buttonIndex);
1265
1275
  return;
1266
1276
  }
@@ -1368,18 +1378,21 @@ var AdvancedDynamicTexture = /** @class */ (function (_super) {
1368
1378
  return;
1369
1379
  }
1370
1380
  var tempViewport = new core_Misc_observable__WEBPACK_IMPORTED_MODULE_1__.Viewport(0, 0, 0, 0);
1371
- this._pointerMoveObserver = scene.onPrePointerObservable.add(function (pi) {
1372
- if (scene.isPointerCaptured(pi.event.pointerId)) {
1373
- return;
1374
- }
1381
+ this._prePointerObserver = scene.onPrePointerObservable.add(function (pi) {
1375
1382
  if (pi.type !== core_Misc_observable__WEBPACK_IMPORTED_MODULE_1__.PointerEventTypes.POINTERMOVE &&
1376
1383
  pi.type !== core_Misc_observable__WEBPACK_IMPORTED_MODULE_1__.PointerEventTypes.POINTERUP &&
1377
1384
  pi.type !== core_Misc_observable__WEBPACK_IMPORTED_MODULE_1__.PointerEventTypes.POINTERDOWN &&
1378
1385
  pi.type !== core_Misc_observable__WEBPACK_IMPORTED_MODULE_1__.PointerEventTypes.POINTERWHEEL) {
1379
1386
  return;
1380
1387
  }
1381
- if (pi.type === core_Misc_observable__WEBPACK_IMPORTED_MODULE_1__.PointerEventTypes.POINTERMOVE && pi.event.pointerId) {
1382
- _this._defaultMousePointerId = pi.event.pointerId; // This is required to make sure we have the correct pointer ID for wheel
1388
+ if (pi.type === core_Misc_observable__WEBPACK_IMPORTED_MODULE_1__.PointerEventTypes.POINTERMOVE) {
1389
+ // Avoid pointerMove events firing while the pointer is captured by the scene
1390
+ if (scene.isPointerCaptured(pi.event.pointerId)) {
1391
+ return;
1392
+ }
1393
+ if (pi.event.pointerId) {
1394
+ _this._defaultMousePointerId = pi.event.pointerId; // This is required to make sure we have the correct pointer ID for wheel
1395
+ }
1383
1396
  }
1384
1397
  _this._translateToPicking(scene, tempViewport, pi);
1385
1398
  });
@@ -1568,7 +1581,7 @@ var AdvancedDynamicTexture = /** @class */ (function (_super) {
1568
1581
  * @param serializedObject define the JSON serialized object to restore from
1569
1582
  * @param scaleToSize defines whether to scale to texture to the saved size
1570
1583
  */
1571
- AdvancedDynamicTexture.prototype.parseContent = function (serializedObject, scaleToSize) {
1584
+ AdvancedDynamicTexture.prototype.parseSerializedObject = function (serializedObject, scaleToSize) {
1572
1585
  this._rootContainer = _controls_control__WEBPACK_IMPORTED_MODULE_3__.Control.Parse(serializedObject.root, this);
1573
1586
  if (scaleToSize) {
1574
1587
  var width = serializedObject.width;
@@ -1582,6 +1595,32 @@ var AdvancedDynamicTexture = /** @class */ (function (_super) {
1582
1595
  }
1583
1596
  }
1584
1597
  };
1598
+ /**
1599
+ * Recreate the content of the ADT from a snippet saved by the GUI editor
1600
+ * @param snippetId defines the snippet to load
1601
+ * @param scaleToSize defines whether to scale to texture to the saved size
1602
+ * @param appendToAdt if provided the snippet will be appended to the adt. Otherwise a fullscreen ADT will be created.
1603
+ * @returns a promise that will resolve on success
1604
+ */
1605
+ AdvancedDynamicTexture.ParseFromSnippetAsync = function (snippetId, scaleToSize, appendToAdt) {
1606
+ return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function () {
1607
+ var adt, serialized;
1608
+ return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this, function (_a) {
1609
+ switch (_a.label) {
1610
+ case 0:
1611
+ adt = appendToAdt !== null && appendToAdt !== void 0 ? appendToAdt : AdvancedDynamicTexture.CreateFullscreenUI("ADT from snippet");
1612
+ if (snippetId === "_BLANK") {
1613
+ return [2 /*return*/, adt];
1614
+ }
1615
+ return [4 /*yield*/, AdvancedDynamicTexture._LoadURLContentAsync(AdvancedDynamicTexture.SnippetUrl + "/" + snippetId.replace(/#/g, "/"), true)];
1616
+ case 1:
1617
+ serialized = _a.sent();
1618
+ adt.parseSerializedObject(serialized, scaleToSize);
1619
+ return [2 /*return*/, adt];
1620
+ }
1621
+ });
1622
+ });
1623
+ };
1585
1624
  /**
1586
1625
  * Recreate the content of the ADT from a snippet saved by the GUI editor
1587
1626
  * @param snippetId defines the snippet to load
@@ -1589,28 +1628,29 @@ var AdvancedDynamicTexture = /** @class */ (function (_super) {
1589
1628
  * @returns a promise that will resolve on success
1590
1629
  */
1591
1630
  AdvancedDynamicTexture.prototype.parseFromSnippetAsync = function (snippetId, scaleToSize) {
1592
- var _this = this;
1593
- if (snippetId === "_BLANK") {
1594
- return Promise.resolve();
1595
- }
1596
- return new Promise(function (resolve, reject) {
1597
- var request = new core_Misc_observable__WEBPACK_IMPORTED_MODULE_1__.WebRequest();
1598
- request.addEventListener("readystatechange", function () {
1599
- if (request.readyState == 4) {
1600
- if (request.status == 200) {
1601
- var snippet = JSON.parse(JSON.parse(request.responseText).jsonPayload);
1602
- var serializationObject = JSON.parse(snippet.gui);
1603
- _this.parseContent(serializationObject, scaleToSize);
1604
- _this.snippetId = snippetId;
1605
- resolve();
1606
- }
1607
- else {
1608
- reject("Unable to load the snippet " + snippetId);
1609
- }
1631
+ return AdvancedDynamicTexture.ParseFromSnippetAsync(snippetId, scaleToSize, this);
1632
+ };
1633
+ /**
1634
+ * Recreate the content of the ADT from a url json
1635
+ * @param url defines the url to load
1636
+ * @param scaleToSize defines whether to scale to texture to the saved size
1637
+ * @param appendToAdt if provided the snippet will be appended to the adt. Otherwise a fullscreen ADT will be created.
1638
+ * @returns a promise that will resolve on success
1639
+ */
1640
+ AdvancedDynamicTexture.ParseFromFileAsync = function (url, scaleToSize, appendToAdt) {
1641
+ return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function () {
1642
+ var adt, serialized;
1643
+ return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this, function (_a) {
1644
+ switch (_a.label) {
1645
+ case 0:
1646
+ adt = appendToAdt !== null && appendToAdt !== void 0 ? appendToAdt : AdvancedDynamicTexture.CreateFullscreenUI("ADT from URL");
1647
+ return [4 /*yield*/, AdvancedDynamicTexture._LoadURLContentAsync(url)];
1648
+ case 1:
1649
+ serialized = _a.sent();
1650
+ adt.parseSerializedObject(serialized, scaleToSize);
1651
+ return [2 /*return*/, adt];
1610
1652
  }
1611
1653
  });
1612
- request.open("GET", AdvancedDynamicTexture.SnippetUrl + "/" + snippetId.replace(/#/g, "/"));
1613
- request.send();
1614
1654
  });
1615
1655
  };
1616
1656
  /**
@@ -1620,19 +1660,21 @@ var AdvancedDynamicTexture = /** @class */ (function (_super) {
1620
1660
  * @returns a promise that will resolve on success
1621
1661
  */
1622
1662
  AdvancedDynamicTexture.prototype.parseFromURLAsync = function (url, scaleToSize) {
1623
- var _this = this;
1663
+ return AdvancedDynamicTexture.ParseFromFileAsync(url, scaleToSize, this);
1664
+ };
1665
+ AdvancedDynamicTexture._LoadURLContentAsync = function (url, snippet) {
1666
+ if (snippet === void 0) { snippet = false; }
1624
1667
  if (url === "") {
1625
- return Promise.resolve();
1668
+ return Promise.reject("No URL provided");
1626
1669
  }
1627
1670
  return new Promise(function (resolve, reject) {
1628
1671
  var request = new core_Misc_observable__WEBPACK_IMPORTED_MODULE_1__.WebRequest();
1629
1672
  request.addEventListener("readystatechange", function () {
1630
1673
  if (request.readyState == 4) {
1631
1674
  if (request.status == 200) {
1632
- var gui = request.responseText;
1675
+ var gui = snippet ? JSON.parse(JSON.parse(request.responseText).jsonPayload).gui : request.responseText;
1633
1676
  var serializationObject = JSON.parse(gui);
1634
- _this.parseContent(serializationObject, scaleToSize);
1635
- resolve();
1677
+ resolve(serializationObject);
1636
1678
  }
1637
1679
  else {
1638
1680
  reject("Unable to load");
@@ -4446,7 +4488,13 @@ var Control = /** @class */ (function () {
4446
4488
  this.metadata = null;
4447
4489
  /** Gets or sets a boolean indicating if the control can be hit with pointer events */
4448
4490
  this.isHitTestVisible = true;
4449
- /** Gets or sets a boolean indicating if the control can block pointer events */
4491
+ /** Gets or sets a boolean indicating if the control can block pointer events. False by default except on the following controls:
4492
+ * * Button controls (Button, RadioButton, ToggleButton)
4493
+ * * Checkbox
4494
+ * * ColorPicker
4495
+ * * InputText
4496
+ * * Slider
4497
+ */
4450
4498
  this.isPointerBlocker = false;
4451
4499
  /** Gets or sets a boolean indicating if the control can be focusable */
4452
4500
  this.isFocusInvisible = false;
@@ -6278,7 +6326,7 @@ var Control = /** @class */ (function () {
6278
6326
  */
6279
6327
  Control.prototype._onPointerMove = function (target, coordinates, pointerId, pi) {
6280
6328
  var canNotify = this.onPointerMoveObservable.notifyObservers(coordinates, -1, target, this, pi);
6281
- if (canNotify && this.parent != null) {
6329
+ if (canNotify && this.parent != null && !this.isPointerBlocker) {
6282
6330
  this.parent._onPointerMove(target, coordinates, pointerId, pi);
6283
6331
  }
6284
6332
  };
@@ -6300,7 +6348,7 @@ var Control = /** @class */ (function () {
6300
6348
  }
6301
6349
  this._enterCount++;
6302
6350
  var canNotify = this.onPointerEnterObservable.notifyObservers(this, -1, target, this, pi);
6303
- if (canNotify && this.parent != null) {
6351
+ if (canNotify && this.parent != null && !this.isPointerBlocker) {
6304
6352
  this.parent._onPointerEnter(target, pi);
6305
6353
  }
6306
6354
  return true;
@@ -6321,7 +6369,7 @@ var Control = /** @class */ (function () {
6321
6369
  if (!target.isAscendant(this)) {
6322
6370
  canNotify = this.onPointerOutObservable.notifyObservers(this, -1, target, this, pi);
6323
6371
  }
6324
- if (canNotify && this.parent != null) {
6372
+ if (canNotify && this.parent != null && !this.isPointerBlocker) {
6325
6373
  this.parent._onPointerOut(target, pi, force);
6326
6374
  }
6327
6375
  };
@@ -6343,7 +6391,7 @@ var Control = /** @class */ (function () {
6343
6391
  this._downCount++;
6344
6392
  this._downPointerIds[pointerId] = true;
6345
6393
  var canNotify = this.onPointerDownObservable.notifyObservers(new _math2D__WEBPACK_IMPORTED_MODULE_4__.Vector2WithInfo(coordinates, buttonIndex), -1, target, this, pi);
6346
- if (canNotify && this.parent != null) {
6394
+ if (canNotify && this.parent != null && !this.isPointerBlocker) {
6347
6395
  this.parent._onPointerDown(target, coordinates, pointerId, buttonIndex, pi);
6348
6396
  }
6349
6397
  return true;
@@ -6368,7 +6416,7 @@ var Control = /** @class */ (function () {
6368
6416
  canNotifyClick = this.onPointerClickObservable.notifyObservers(new _math2D__WEBPACK_IMPORTED_MODULE_4__.Vector2WithInfo(coordinates, buttonIndex), -1, target, this, pi);
6369
6417
  }
6370
6418
  var canNotify = this.onPointerUpObservable.notifyObservers(new _math2D__WEBPACK_IMPORTED_MODULE_4__.Vector2WithInfo(coordinates, buttonIndex), -1, target, this, pi);
6371
- if (canNotify && this.parent != null) {
6419
+ if (canNotify && this.parent != null && !this.isPointerBlocker) {
6372
6420
  this.parent._onPointerUp(target, coordinates, pointerId, buttonIndex, canNotifyClick, pi);
6373
6421
  }
6374
6422
  };
@@ -7744,12 +7792,12 @@ var Grid = /** @class */ (function (_super) {
7744
7792
  for (var index = 0; index < this._columnDefinitions.length; index++) {
7745
7793
  this._columnDefinitions[index].onChangedObservable.remove(this._columnDefinitionObservers[index]);
7746
7794
  }
7747
- this._rowDefinitionObservers = [];
7748
- this._rowDefinitions = [];
7749
- this._columnDefinitionObservers = [];
7750
- this._columnDefinitions = [];
7795
+ this._rowDefinitionObservers.length = 0;
7796
+ this._rowDefinitions.length = 0;
7797
+ this._columnDefinitionObservers.length = 0;
7798
+ this._columnDefinitions.length = 0;
7751
7799
  this._cells = {};
7752
- this._childControls = [];
7800
+ this._childControls.length = 0;
7753
7801
  };
7754
7802
  /**
7755
7803
  * Serializes the current control
@@ -16509,6 +16557,8 @@ __webpack_require__.r(__webpack_exports__);
16509
16557
  /* harmony import */ var core_Misc_observable__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_Misc_observable__WEBPACK_IMPORTED_MODULE_1__);
16510
16558
  /* harmony import */ var _stackPanel__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./stackPanel */ "../../../lts/gui/dist/2D/controls/stackPanel.js");
16511
16559
  /* harmony import */ var _button__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./button */ "../../../lts/gui/dist/2D/controls/button.js");
16560
+ /* harmony import */ var _inputTextArea__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./inputTextArea */ "../../../lts/gui/dist/2D/controls/inputTextArea.js");
16561
+
16512
16562
 
16513
16563
 
16514
16564
 
@@ -16670,13 +16720,28 @@ var VirtualKeyboard = /** @class */ (function (_super) {
16670
16720
  _this.applyShiftState(_this.shiftState);
16671
16721
  return;
16672
16722
  case "\u2190":
16673
- _this._currentlyConnectedInputText.processKey(8);
16723
+ if (_this._currentlyConnectedInputText instanceof _inputTextArea__WEBPACK_IMPORTED_MODULE_4__.InputTextArea) {
16724
+ _this._currentlyConnectedInputText.alternativeProcessKey("Backspace");
16725
+ }
16726
+ else {
16727
+ _this._currentlyConnectedInputText.processKey(8);
16728
+ }
16674
16729
  return;
16675
16730
  case "\u21B5":
16676
- _this._currentlyConnectedInputText.processKey(13);
16731
+ if (_this._currentlyConnectedInputText instanceof _inputTextArea__WEBPACK_IMPORTED_MODULE_4__.InputTextArea) {
16732
+ _this._currentlyConnectedInputText.alternativeProcessKey("Enter");
16733
+ }
16734
+ else {
16735
+ _this._currentlyConnectedInputText.processKey(13);
16736
+ }
16677
16737
  return;
16678
16738
  }
16679
- _this._currentlyConnectedInputText.processKey(-1, _this.shiftState ? key.toUpperCase() : key);
16739
+ if (_this._currentlyConnectedInputText instanceof _inputTextArea__WEBPACK_IMPORTED_MODULE_4__.InputTextArea) {
16740
+ _this._currentlyConnectedInputText.alternativeProcessKey("", _this.shiftState ? key.toUpperCase() : key);
16741
+ }
16742
+ else {
16743
+ _this._currentlyConnectedInputText.processKey(-1, _this.shiftState ? key.toUpperCase() : key);
16744
+ }
16680
16745
  if (_this.shiftState === 1) {
16681
16746
  _this.shiftState = 0;
16682
16747
  _this.applyShiftState(_this.shiftState);
@@ -16725,7 +16790,7 @@ var VirtualKeyboard = /** @class */ (function (_super) {
16725
16790
  this._connectedInputTexts.forEach(function (connectedInputText) {
16726
16791
  _this._removeConnectedInputObservables(connectedInputText);
16727
16792
  });
16728
- this._connectedInputTexts = [];
16793
+ this._connectedInputTexts.length = 0;
16729
16794
  }
16730
16795
  if (this._connectedInputTexts.length === 0) {
16731
16796
  this._currentlyConnectedInputText = null;
@@ -18559,7 +18624,7 @@ var Container3D = /** @class */ (function (_super) {
18559
18624
  var control = _a[_i];
18560
18625
  control.dispose();
18561
18626
  }
18562
- this._children = [];
18627
+ this._children.length = 0;
18563
18628
  _super.prototype.dispose.call(this);
18564
18629
  };
18565
18630
  /** Control rotation will remain unchanged */
@@ -20894,6 +20959,19 @@ var Slider3D = /** @class */ (function (_super) {
20894
20959
  enumerable: false,
20895
20960
  configurable: true
20896
20961
  });
20962
+ Object.defineProperty(Slider3D.prototype, "isVisible", {
20963
+ /** Sets a boolean indicating if the control is visible */
20964
+ set: function (value) {
20965
+ var _a;
20966
+ if (this._isVisible === value) {
20967
+ return;
20968
+ }
20969
+ this._isVisible = value;
20970
+ (_a = this.node) === null || _a === void 0 ? void 0 : _a.setEnabled(value);
20971
+ },
20972
+ enumerable: false,
20973
+ configurable: true
20974
+ });
20897
20975
  // Mesh association
20898
20976
  Slider3D.prototype._createNode = function (scene) {
20899
20977
  var _this = this;
@@ -20944,6 +21022,10 @@ var Slider3D = /** @class */ (function (_super) {
20944
21022
  }
20945
21023
  _this._sliderThumb = sliderThumbModel;
20946
21024
  }
21025
+ _this._injectGUI3DReservedDataStore(sliderBackplate).control = _this;
21026
+ sliderBackplate.getChildMeshes().forEach(function (mesh) {
21027
+ _this._injectGUI3DReservedDataStore(mesh).control = _this;
21028
+ });
20947
21029
  });
20948
21030
  this._affectMaterial(sliderBackplate);
20949
21031
  return sliderBackplate;