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.
@@ -84,7 +84,7 @@ export class AdvancedDynamicTexture extends DynamicTexture {
84
84
  private _renderObserver;
85
85
  private _resizeObserver;
86
86
  private _preKeyboardObserver;
87
- private _pointerMoveObserver;
87
+ private _prePointerObserver;
88
88
  private _sceneRenderObserver;
89
89
  private _pointerObserver;
90
90
  private _canvasPointerOutObserver;
@@ -432,21 +432,45 @@ export class AdvancedDynamicTexture extends DynamicTexture {
432
432
  * @param serializedObject define the JSON serialized object to restore from
433
433
  * @param scaleToSize defines whether to scale to texture to the saved size
434
434
  */
435
- parseContent(serializedObject: any, scaleToSize?: boolean): void;
435
+ parseSerializedObject(serializedObject: any, scaleToSize?: boolean): void;
436
+ /**
437
+ * Recreate the content of the ADT from a JSON object
438
+ * @param serializedObject define the JSON serialized object to restore from
439
+ * @param scaleToSize defines whether to scale to texture to the saved size
440
+ * @deprecated Please use parseSerializedObject instead
441
+ */
442
+ parseContent: (serializedObject: any, scaleToSize?: boolean | undefined) => void;
443
+ /**
444
+ * Recreate the content of the ADT from a snippet saved by the GUI editor
445
+ * @param snippetId defines the snippet to load
446
+ * @param scaleToSize defines whether to scale to texture to the saved size
447
+ * @param appendToAdt if provided the snippet will be appended to the adt. Otherwise a fullscreen ADT will be created.
448
+ * @returns a promise that will resolve on success
449
+ */
450
+ static ParseFromSnippetAsync(snippetId: string, scaleToSize?: boolean, appendToAdt?: AdvancedDynamicTexture): Promise<AdvancedDynamicTexture>;
436
451
  /**
437
452
  * Recreate the content of the ADT from a snippet saved by the GUI editor
438
453
  * @param snippetId defines the snippet to load
439
454
  * @param scaleToSize defines whether to scale to texture to the saved size
440
455
  * @returns a promise that will resolve on success
441
456
  */
442
- parseFromSnippetAsync(snippetId: string, scaleToSize?: boolean): Promise<void>;
457
+ parseFromSnippetAsync(snippetId: string, scaleToSize?: boolean): Promise<AdvancedDynamicTexture>;
458
+ /**
459
+ * Recreate the content of the ADT from a url json
460
+ * @param url defines the url to load
461
+ * @param scaleToSize defines whether to scale to texture to the saved size
462
+ * @param appendToAdt if provided the snippet will be appended to the adt. Otherwise a fullscreen ADT will be created.
463
+ * @returns a promise that will resolve on success
464
+ */
465
+ static ParseFromFileAsync(url: string, scaleToSize?: boolean, appendToAdt?: AdvancedDynamicTexture): Promise<AdvancedDynamicTexture>;
443
466
  /**
444
467
  * Recreate the content of the ADT from a url json
445
468
  * @param url defines the url to load
446
469
  * @param scaleToSize defines whether to scale to texture to the saved size
447
470
  * @returns a promise that will resolve on success
448
471
  */
449
- parseFromURLAsync(url: string, scaleToSize?: boolean): Promise<void>;
472
+ parseFromURLAsync(url: string, scaleToSize?: boolean): Promise<AdvancedDynamicTexture>;
473
+ private static _LoadURLContentAsync;
450
474
  /**
451
475
  * Compares two rectangle based controls for pixel overlap
452
476
  * @param control1 The first control to compare
@@ -1128,7 +1152,13 @@ export class Control {
1128
1152
  metadata: any;
1129
1153
  /** Gets or sets a boolean indicating if the control can be hit with pointer events */
1130
1154
  isHitTestVisible: boolean;
1131
- /** Gets or sets a boolean indicating if the control can block pointer events */
1155
+ /** Gets or sets a boolean indicating if the control can block pointer events. False by default except on the following controls:
1156
+ * * Button controls (Button, RadioButton, ToggleButton)
1157
+ * * Checkbox
1158
+ * * ColorPicker
1159
+ * * InputText
1160
+ * * Slider
1161
+ */
1132
1162
  isPointerBlocker: boolean;
1133
1163
  /** Gets or sets a boolean indicating if the control can be focusable */
1134
1164
  isFocusInvisible: boolean;
@@ -4239,6 +4269,7 @@ import { Observable } from "babylonjs/Misc/observable";
4239
4269
  import { StackPanel } from "babylonjs-gui/2D/controls/stackPanel";
4240
4270
  import { InputText } from "babylonjs-gui/2D/controls/inputText";
4241
4271
  import { AdvancedDynamicTexture } from "babylonjs-gui/2D/advancedDynamicTexture";
4272
+ import { InputTextArea } from "babylonjs-gui/2D/controls/inputTextArea";
4242
4273
  /**
4243
4274
  * Class used to store key control properties
4244
4275
  */
@@ -4305,7 +4336,7 @@ export class VirtualKeyboard extends StackPanel {
4305
4336
  private _connectedInputTexts;
4306
4337
  private _onKeyPressObserver;
4307
4338
  /** Gets the input text control currently attached to the keyboard */
4308
- get connectedInputText(): Nullable<InputText>;
4339
+ get connectedInputText(): Nullable<InputText | InputTextArea>;
4309
4340
  /**
4310
4341
  * Connects the keyboard with an input text control
4311
4342
  *
@@ -5057,13 +5088,13 @@ import { Container3D } from "babylonjs-gui/3D/controls/container3D";
5057
5088
  export class Control3D implements IDisposable, IBehaviorAware<Control3D> {
5058
5089
  /** Defines the control name */
5059
5090
  name?: string | undefined;
5060
- /** @hidden */
5061
- _host: GUI3DManager;
5062
5091
  private _node;
5063
5092
  private _downCount;
5064
5093
  private _enterCount;
5065
5094
  private _downPointerIds;
5066
- private _isVisible;
5095
+ protected _isVisible: boolean;
5096
+ /** @hidden */
5097
+ _host: GUI3DManager;
5067
5098
  /** @hidden */
5068
5099
  _isScaledByManager: boolean;
5069
5100
  /** Gets or sets the control position in world space */
@@ -5768,6 +5799,8 @@ export class Slider3D extends Control3D {
5768
5799
  * Gets the slider backplate material used by this control
5769
5800
  */
5770
5801
  get sliderBackplateMaterial(): MRDLBackplateMaterial;
5802
+ /** Sets a boolean indicating if the control is visible */
5803
+ set isVisible(value: boolean);
5771
5804
  protected _createNode(scene: Scene): TransformNode;
5772
5805
  protected _affectMaterial(mesh: AbstractMesh): void;
5773
5806
  private _createBehavior;
@@ -8037,7 +8070,7 @@ declare module BABYLON.GUI {
8037
8070
  private _renderObserver;
8038
8071
  private _resizeObserver;
8039
8072
  private _preKeyboardObserver;
8040
- private _pointerMoveObserver;
8073
+ private _prePointerObserver;
8041
8074
  private _sceneRenderObserver;
8042
8075
  private _pointerObserver;
8043
8076
  private _canvasPointerOutObserver;
@@ -8385,21 +8418,45 @@ declare module BABYLON.GUI {
8385
8418
  * @param serializedObject define the JSON serialized object to restore from
8386
8419
  * @param scaleToSize defines whether to scale to texture to the saved size
8387
8420
  */
8388
- parseContent(serializedObject: any, scaleToSize?: boolean): void;
8421
+ parseSerializedObject(serializedObject: any, scaleToSize?: boolean): void;
8422
+ /**
8423
+ * Recreate the content of the ADT from a JSON object
8424
+ * @param serializedObject define the JSON serialized object to restore from
8425
+ * @param scaleToSize defines whether to scale to texture to the saved size
8426
+ * @deprecated Please use parseSerializedObject instead
8427
+ */
8428
+ parseContent: (serializedObject: any, scaleToSize?: boolean | undefined) => void;
8429
+ /**
8430
+ * Recreate the content of the ADT from a snippet saved by the GUI editor
8431
+ * @param snippetId defines the snippet to load
8432
+ * @param scaleToSize defines whether to scale to texture to the saved size
8433
+ * @param appendToAdt if provided the snippet will be appended to the adt. Otherwise a fullscreen ADT will be created.
8434
+ * @returns a promise that will resolve on success
8435
+ */
8436
+ static ParseFromSnippetAsync(snippetId: string, scaleToSize?: boolean, appendToAdt?: AdvancedDynamicTexture): Promise<AdvancedDynamicTexture>;
8389
8437
  /**
8390
8438
  * Recreate the content of the ADT from a snippet saved by the GUI editor
8391
8439
  * @param snippetId defines the snippet to load
8392
8440
  * @param scaleToSize defines whether to scale to texture to the saved size
8393
8441
  * @returns a promise that will resolve on success
8394
8442
  */
8395
- parseFromSnippetAsync(snippetId: string, scaleToSize?: boolean): Promise<void>;
8443
+ parseFromSnippetAsync(snippetId: string, scaleToSize?: boolean): Promise<AdvancedDynamicTexture>;
8444
+ /**
8445
+ * Recreate the content of the ADT from a url json
8446
+ * @param url defines the url to load
8447
+ * @param scaleToSize defines whether to scale to texture to the saved size
8448
+ * @param appendToAdt if provided the snippet will be appended to the adt. Otherwise a fullscreen ADT will be created.
8449
+ * @returns a promise that will resolve on success
8450
+ */
8451
+ static ParseFromFileAsync(url: string, scaleToSize?: boolean, appendToAdt?: AdvancedDynamicTexture): Promise<AdvancedDynamicTexture>;
8396
8452
  /**
8397
8453
  * Recreate the content of the ADT from a url json
8398
8454
  * @param url defines the url to load
8399
8455
  * @param scaleToSize defines whether to scale to texture to the saved size
8400
8456
  * @returns a promise that will resolve on success
8401
8457
  */
8402
- parseFromURLAsync(url: string, scaleToSize?: boolean): Promise<void>;
8458
+ parseFromURLAsync(url: string, scaleToSize?: boolean): Promise<AdvancedDynamicTexture>;
8459
+ private static _LoadURLContentAsync;
8403
8460
  /**
8404
8461
  * Compares two rectangle based controls for pixel overlap
8405
8462
  * @param control1 The first control to compare
@@ -9034,7 +9091,13 @@ declare module BABYLON.GUI {
9034
9091
  metadata: any;
9035
9092
  /** Gets or sets a boolean indicating if the control can be hit with pointer events */
9036
9093
  isHitTestVisible: boolean;
9037
- /** Gets or sets a boolean indicating if the control can block pointer events */
9094
+ /** Gets or sets a boolean indicating if the control can block pointer events. False by default except on the following controls:
9095
+ * * Button controls (Button, RadioButton, ToggleButton)
9096
+ * * Checkbox
9097
+ * * ColorPicker
9098
+ * * InputText
9099
+ * * Slider
9100
+ */
9038
9101
  isPointerBlocker: boolean;
9039
9102
  /** Gets or sets a boolean indicating if the control can be focusable */
9040
9103
  isFocusInvisible: boolean;
@@ -12024,7 +12087,7 @@ declare module BABYLON.GUI {
12024
12087
  private _connectedInputTexts;
12025
12088
  private _onKeyPressObserver;
12026
12089
  /** Gets the input text control currently attached to the keyboard */
12027
- get connectedInputText(): BABYLON.Nullable<InputText>;
12090
+ get connectedInputText(): BABYLON.Nullable<InputText | InputTextArea>;
12028
12091
  /**
12029
12092
  * Connects the keyboard with an input text control
12030
12093
  *
@@ -12706,13 +12769,13 @@ declare module BABYLON.GUI {
12706
12769
  export class Control3D implements BABYLON.IDisposable, BABYLON.IBehaviorAware<Control3D> {
12707
12770
  /** Defines the control name */
12708
12771
  name?: string | undefined;
12709
- /** @hidden */
12710
- _host: GUI3DManager;
12711
12772
  private _node;
12712
12773
  private _downCount;
12713
12774
  private _enterCount;
12714
12775
  private _downPointerIds;
12715
- private _isVisible;
12776
+ protected _isVisible: boolean;
12777
+ /** @hidden */
12778
+ _host: GUI3DManager;
12716
12779
  /** @hidden */
12717
12780
  _isScaledByManager: boolean;
12718
12781
  /** Gets or sets the control position in world space */
@@ -13326,6 +13389,8 @@ declare module BABYLON.GUI {
13326
13389
  * Gets the slider backplate material used by this control
13327
13390
  */
13328
13391
  get sliderBackplateMaterial(): MRDLBackplateMaterial;
13392
+ /** Sets a boolean indicating if the control is visible */
13393
+ set isVisible(value: boolean);
13329
13394
  protected _createNode(scene: BABYLON.Scene): BABYLON.TransformNode;
13330
13395
  protected _affectMaterial(mesh: BABYLON.AbstractMesh): void;
13331
13396
  private _createBehavior;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "babylonjs-gui",
3
- "version": "5.15.0",
3
+ "version": "5.17.0",
4
4
  "main": "babylon.gui.js",
5
5
  "types": "babylon.gui.module.d.ts",
6
6
  "files": [
@@ -14,7 +14,7 @@
14
14
  "clean": "rimraf dist && rimraf babylon*.*"
15
15
  },
16
16
  "dependencies": {
17
- "babylonjs": "^5.15.0"
17
+ "babylonjs": "^5.17.0"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@dev/build-tools": "1.0.0",