babylonjs-gui 5.14.1 → 5.16.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
@@ -4053,7 +4053,7 @@ declare module BABYLON.GUI {
4053
4053
  private _connectedInputTexts;
4054
4054
  private _onKeyPressObserver;
4055
4055
  /** Gets the input text control currently attached to the keyboard */
4056
- get connectedInputText(): BABYLON.Nullable<InputText>;
4056
+ get connectedInputText(): BABYLON.Nullable<InputText | InputTextArea>;
4057
4057
  /**
4058
4058
  * Connects the keyboard with an input text control
4059
4059
  *
@@ -4735,13 +4735,13 @@ declare module BABYLON.GUI {
4735
4735
  export class Control3D implements BABYLON.IDisposable, BABYLON.IBehaviorAware<Control3D> {
4736
4736
  /** Defines the control name */
4737
4737
  name?: string | undefined;
4738
- /** @hidden */
4739
- _host: GUI3DManager;
4740
4738
  private _node;
4741
4739
  private _downCount;
4742
4740
  private _enterCount;
4743
4741
  private _downPointerIds;
4744
- private _isVisible;
4742
+ protected _isVisible: boolean;
4743
+ /** @hidden */
4744
+ _host: GUI3DManager;
4745
4745
  /** @hidden */
4746
4746
  _isScaledByManager: boolean;
4747
4747
  /** Gets or sets the control position in world space */
@@ -5355,6 +5355,8 @@ declare module BABYLON.GUI {
5355
5355
  * Gets the slider backplate material used by this control
5356
5356
  */
5357
5357
  get sliderBackplateMaterial(): MRDLBackplateMaterial;
5358
+ /** Sets a boolean indicating if the control is visible */
5359
+ set isVisible(value: boolean);
5358
5360
  protected _createNode(scene: BABYLON.Scene): BABYLON.TransformNode;
5359
5361
  protected _affectMaterial(mesh: BABYLON.AbstractMesh): void;
5360
5362
  private _createBehavior;
@@ -6000,7 +6002,7 @@ declare module BABYLON.GUI {
6000
6002
  */
6001
6003
  renderHoverLight: boolean;
6002
6004
  /**
6003
- * Gets or sets the radius used to render the hover light (default is 1.0)
6005
+ * Gets or sets the radius used to render the hover light (default is 0.01)
6004
6006
  */
6005
6007
  hoverRadius: number;
6006
6008
  /**
package/babylon.gui.js CHANGED
@@ -3974,6 +3974,7 @@ var Container = /** @class */ (function (_super) {
3974
3974
  * @hidden
3975
3975
  */
3976
3976
  Container.prototype._reOrderControl = function (control) {
3977
+ var linkedMesh = control.linkedMesh;
3977
3978
  this.removeControl(control);
3978
3979
  var wasAdded = false;
3979
3980
  for (var index = 0; index < this._children.length; index++) {
@@ -3987,6 +3988,9 @@ var Container = /** @class */ (function (_super) {
3987
3988
  this._children.push(control);
3988
3989
  }
3989
3990
  control.parent = this;
3991
+ if (linkedMesh) {
3992
+ control.linkWithMesh(linkedMesh);
3993
+ }
3990
3994
  this._markAsDirty();
3991
3995
  };
3992
3996
  /**
@@ -16505,6 +16509,8 @@ __webpack_require__.r(__webpack_exports__);
16505
16509
  /* harmony import */ var core_Misc_observable__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_Misc_observable__WEBPACK_IMPORTED_MODULE_1__);
16506
16510
  /* harmony import */ var _stackPanel__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./stackPanel */ "../../../lts/gui/dist/2D/controls/stackPanel.js");
16507
16511
  /* harmony import */ var _button__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./button */ "../../../lts/gui/dist/2D/controls/button.js");
16512
+ /* harmony import */ var _inputTextArea__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./inputTextArea */ "../../../lts/gui/dist/2D/controls/inputTextArea.js");
16513
+
16508
16514
 
16509
16515
 
16510
16516
 
@@ -16666,13 +16672,28 @@ var VirtualKeyboard = /** @class */ (function (_super) {
16666
16672
  _this.applyShiftState(_this.shiftState);
16667
16673
  return;
16668
16674
  case "\u2190":
16669
- _this._currentlyConnectedInputText.processKey(8);
16675
+ if (_this._currentlyConnectedInputText instanceof _inputTextArea__WEBPACK_IMPORTED_MODULE_4__.InputTextArea) {
16676
+ _this._currentlyConnectedInputText.alternativeProcessKey("Backspace");
16677
+ }
16678
+ else {
16679
+ _this._currentlyConnectedInputText.processKey(8);
16680
+ }
16670
16681
  return;
16671
16682
  case "\u21B5":
16672
- _this._currentlyConnectedInputText.processKey(13);
16683
+ if (_this._currentlyConnectedInputText instanceof _inputTextArea__WEBPACK_IMPORTED_MODULE_4__.InputTextArea) {
16684
+ _this._currentlyConnectedInputText.alternativeProcessKey("Enter");
16685
+ }
16686
+ else {
16687
+ _this._currentlyConnectedInputText.processKey(13);
16688
+ }
16673
16689
  return;
16674
16690
  }
16675
- _this._currentlyConnectedInputText.processKey(-1, _this.shiftState ? key.toUpperCase() : key);
16691
+ if (_this._currentlyConnectedInputText instanceof _inputTextArea__WEBPACK_IMPORTED_MODULE_4__.InputTextArea) {
16692
+ _this._currentlyConnectedInputText.alternativeProcessKey("", _this.shiftState ? key.toUpperCase() : key);
16693
+ }
16694
+ else {
16695
+ _this._currentlyConnectedInputText.processKey(-1, _this.shiftState ? key.toUpperCase() : key);
16696
+ }
16676
16697
  if (_this.shiftState === 1) {
16677
16698
  _this.shiftState = 0;
16678
16699
  _this.applyShiftState(_this.shiftState);
@@ -20890,6 +20911,19 @@ var Slider3D = /** @class */ (function (_super) {
20890
20911
  enumerable: false,
20891
20912
  configurable: true
20892
20913
  });
20914
+ Object.defineProperty(Slider3D.prototype, "isVisible", {
20915
+ /** Sets a boolean indicating if the control is visible */
20916
+ set: function (value) {
20917
+ var _a;
20918
+ if (this._isVisible === value) {
20919
+ return;
20920
+ }
20921
+ this._isVisible = value;
20922
+ (_a = this.node) === null || _a === void 0 ? void 0 : _a.setEnabled(value);
20923
+ },
20924
+ enumerable: false,
20925
+ configurable: true
20926
+ });
20893
20927
  // Mesh association
20894
20928
  Slider3D.prototype._createNode = function (scene) {
20895
20929
  var _this = this;
@@ -20940,6 +20974,10 @@ var Slider3D = /** @class */ (function (_super) {
20940
20974
  }
20941
20975
  _this._sliderThumb = sliderThumbModel;
20942
20976
  }
20977
+ _this._injectGUI3DReservedDataStore(sliderBackplate).control = _this;
20978
+ sliderBackplate.getChildMeshes().forEach(function (mesh) {
20979
+ _this._injectGUI3DReservedDataStore(mesh).control = _this;
20980
+ });
20943
20981
  });
20944
20982
  this._affectMaterial(sliderBackplate);
20945
20983
  return sliderBackplate;
@@ -23429,7 +23467,7 @@ var FluentMaterial = /** @class */ (function (_super) {
23429
23467
  */
23430
23468
  _this.renderHoverLight = false;
23431
23469
  /**
23432
- * Gets or sets the radius used to render the hover light (default is 1.0)
23470
+ * Gets or sets the radius used to render the hover light (default is 0.01)
23433
23471
  */
23434
23472
  _this.hoverRadius = 0.01;
23435
23473
  /**
@@ -27736,7 +27774,9 @@ __webpack_require__.r(__webpack_exports__);
27736
27774
  var globalObject = typeof __webpack_require__.g !== "undefined" ? __webpack_require__.g : typeof window !== "undefined" ? window : undefined;
27737
27775
  if (typeof globalObject !== "undefined") {
27738
27776
  globalObject.BABYLON = globalObject.BABYLON || {};
27739
- globalObject.BABYLON.GUI = _index__WEBPACK_IMPORTED_MODULE_0__;
27777
+ if (!globalObject.BABYLON.GUI) {
27778
+ globalObject.BABYLON.GUI = _index__WEBPACK_IMPORTED_MODULE_0__;
27779
+ }
27740
27780
  }
27741
27781
 
27742
27782