babylonjs-gui 5.16.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>;
443
458
  /**
444
459
  * Recreate the content of the ADT from a url json
445
460
  * @param url defines the url to load
446
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.
447
463
  * @returns a promise that will resolve on success
448
464
  */
449
- parseFromURLAsync(url: string, scaleToSize?: boolean): Promise<void>;
465
+ static ParseFromFileAsync(url: string, scaleToSize?: boolean, appendToAdt?: AdvancedDynamicTexture): Promise<AdvancedDynamicTexture>;
466
+ /**
467
+ * Recreate the content of the ADT from a url json
468
+ * @param url defines the url to load
469
+ * @param scaleToSize defines whether to scale to texture to the saved size
470
+ * @returns a promise that will resolve on success
471
+ */
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;
@@ -8040,7 +8070,7 @@ declare module BABYLON.GUI {
8040
8070
  private _renderObserver;
8041
8071
  private _resizeObserver;
8042
8072
  private _preKeyboardObserver;
8043
- private _pointerMoveObserver;
8073
+ private _prePointerObserver;
8044
8074
  private _sceneRenderObserver;
8045
8075
  private _pointerObserver;
8046
8076
  private _canvasPointerOutObserver;
@@ -8388,21 +8418,45 @@ declare module BABYLON.GUI {
8388
8418
  * @param serializedObject define the JSON serialized object to restore from
8389
8419
  * @param scaleToSize defines whether to scale to texture to the saved size
8390
8420
  */
8391
- 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>;
8392
8437
  /**
8393
8438
  * Recreate the content of the ADT from a snippet saved by the GUI editor
8394
8439
  * @param snippetId defines the snippet to load
8395
8440
  * @param scaleToSize defines whether to scale to texture to the saved size
8396
8441
  * @returns a promise that will resolve on success
8397
8442
  */
8398
- parseFromSnippetAsync(snippetId: string, scaleToSize?: boolean): Promise<void>;
8443
+ parseFromSnippetAsync(snippetId: string, scaleToSize?: boolean): Promise<AdvancedDynamicTexture>;
8399
8444
  /**
8400
8445
  * Recreate the content of the ADT from a url json
8401
8446
  * @param url defines the url to load
8402
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.
8403
8449
  * @returns a promise that will resolve on success
8404
8450
  */
8405
- parseFromURLAsync(url: string, scaleToSize?: boolean): Promise<void>;
8451
+ static ParseFromFileAsync(url: string, scaleToSize?: boolean, appendToAdt?: AdvancedDynamicTexture): Promise<AdvancedDynamicTexture>;
8452
+ /**
8453
+ * Recreate the content of the ADT from a url json
8454
+ * @param url defines the url to load
8455
+ * @param scaleToSize defines whether to scale to texture to the saved size
8456
+ * @returns a promise that will resolve on success
8457
+ */
8458
+ parseFromURLAsync(url: string, scaleToSize?: boolean): Promise<AdvancedDynamicTexture>;
8459
+ private static _LoadURLContentAsync;
8406
8460
  /**
8407
8461
  * Compares two rectangle based controls for pixel overlap
8408
8462
  * @param control1 The first control to compare
@@ -9037,7 +9091,13 @@ declare module BABYLON.GUI {
9037
9091
  metadata: any;
9038
9092
  /** Gets or sets a boolean indicating if the control can be hit with pointer events */
9039
9093
  isHitTestVisible: boolean;
9040
- /** 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
+ */
9041
9101
  isPointerBlocker: boolean;
9042
9102
  /** Gets or sets a boolean indicating if the control can be focusable */
9043
9103
  isFocusInvisible: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "babylonjs-gui",
3
- "version": "5.16.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.16.0"
17
+ "babylonjs": "^5.17.0"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@dev/build-tools": "1.0.0",