babylonjs-gui 5.40.1 → 5.42.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.
@@ -1050,7 +1050,7 @@ export class Control implements IAnimatable {
1050
1050
  /** @internal */
1051
1051
  _prevCurrentMeasureTransformedIntoGlobalSpace: Measure;
1052
1052
  /** @internal */
1053
- protected _cachedParentMeasure: Measure;
1053
+ _cachedParentMeasure: Measure;
1054
1054
  private _descendantsOnlyPadding;
1055
1055
  private _paddingLeft;
1056
1056
  private _paddingRight;
@@ -1634,7 +1634,7 @@ export class Control implements IAnimatable {
1634
1634
  /** @internal */
1635
1635
  protected _computeAdditionnalOffsetY(): number;
1636
1636
  /** @internal */
1637
- protected invalidateRect(): void;
1637
+ invalidateRect(): void;
1638
1638
  /**
1639
1639
  * @internal
1640
1640
  */
@@ -2167,6 +2167,10 @@ export class Image extends Control {
2167
2167
  private _populateNinePatchSlicesFromImage;
2168
2168
  private _detectPointerOnOpaqueOnly;
2169
2169
  private _imageDataCache;
2170
+ static SourceImgCache: Map<string, {
2171
+ img: IImage;
2172
+ timesUsed: number;
2173
+ }>;
2170
2174
  /**
2171
2175
  * Observable notified when the content is loaded
2172
2176
  */
@@ -2273,6 +2277,11 @@ export class Image extends Control {
2273
2277
  * Gets the image source url
2274
2278
  */
2275
2279
  get source(): Nullable<string>;
2280
+ /**
2281
+ * Resets the internal Image Element cache. Can reduce memory usage.
2282
+ */
2283
+ static ResetImageCache(): void;
2284
+ private _removeCacheUsage;
2276
2285
  /**
2277
2286
  * Gets or sets image source url
2278
2287
  */
@@ -2583,6 +2592,10 @@ export class InputText extends Control implements IFocusableControl {
2583
2592
  _onPointerMove(target: Control, coordinates: Vector2, pointerId: number, pi: PointerInfoBase): void;
2584
2593
  _onPointerUp(target: Control, coordinates: Vector2, pointerId: number, buttonIndex: number, notifyClick: boolean): void;
2585
2594
  protected _beforeRenderText(textWrapper: TextWrapper): TextWrapper;
2595
+ /** @internal */
2596
+ private set isTextHighlightOn(value);
2597
+ /** @internal */
2598
+ private get isTextHighlightOn();
2586
2599
  dispose(): void;
2587
2600
  }
2588
2601
 
@@ -2691,14 +2704,13 @@ export class InputTextArea extends InputText {
2691
2704
  * @internal
2692
2705
  */
2693
2706
  protected _preMeasure(parentMeasure: Measure, context: ICanvasRenderingContext): void;
2707
+ private _computeScroll;
2694
2708
  /**
2695
2709
  * Processing of child after the parent measurement update
2696
2710
  *
2697
- * @param parentMeasure The parent measure
2698
- * @param context The rendering canvas
2699
2711
  * @internal
2700
2712
  */
2701
- protected _additionalProcessing(parentMeasure: Measure, context: ICanvasRenderingContext): void;
2713
+ protected _additionalProcessing(): void;
2702
2714
  private _drawText;
2703
2715
  /**
2704
2716
  * Copy the text in the clipboard
@@ -2754,16 +2766,21 @@ declare module "babylonjs-gui/2D/controls/line" {
2754
2766
  import { Vector3 } from "babylonjs/Maths/math.vector";
2755
2767
  import { Scene } from "babylonjs/scene";
2756
2768
  import { Control } from "babylonjs-gui/2D/controls/control";
2769
+ import { ValueAndUnit } from "babylonjs-gui/2D/valueAndUnit";
2757
2770
  import { Measure } from "babylonjs-gui/2D/measure";
2758
2771
  import { ICanvasRenderingContext } from "babylonjs/Engines/ICanvas";
2759
2772
  /** Class used to render 2D lines */
2760
2773
  export class Line extends Control {
2761
2774
  name?: string | undefined;
2762
2775
  private _lineWidth;
2763
- private _x1;
2764
- private _y1;
2765
- private _x2;
2766
- private _y2;
2776
+ /** @internal */
2777
+ _x1: ValueAndUnit;
2778
+ /** @internal */
2779
+ _y1: ValueAndUnit;
2780
+ /** @internal */
2781
+ _x2: ValueAndUnit;
2782
+ /** @internal */
2783
+ _y2: ValueAndUnit;
2767
2784
  private _dash;
2768
2785
  private _connectedControl;
2769
2786
  private _connectedControlDirtyObserver;
@@ -2792,8 +2809,10 @@ export class Line extends Control {
2792
2809
  set horizontalAlignment(value: number);
2793
2810
  /** Gets or sets vertical alignment */
2794
2811
  set verticalAlignment(value: number);
2795
- private get _effectiveX2();
2796
- private get _effectiveY2();
2812
+ /** @internal */
2813
+ get _effectiveX2(): number;
2814
+ /** @internal */
2815
+ get _effectiveY2(): number;
2797
2816
  /**
2798
2817
  * Creates a new Line
2799
2818
  * @param name defines the control name
@@ -9442,7 +9461,7 @@ declare module BABYLON.GUI {
9442
9461
  /** @internal */
9443
9462
  _prevCurrentMeasureTransformedIntoGlobalSpace: Measure;
9444
9463
  /** @internal */
9445
- protected _cachedParentMeasure: Measure;
9464
+ _cachedParentMeasure: Measure;
9446
9465
  private _descendantsOnlyPadding;
9447
9466
  private _paddingLeft;
9448
9467
  private _paddingRight;
@@ -10026,7 +10045,7 @@ declare module BABYLON.GUI {
10026
10045
  /** @internal */
10027
10046
  protected _computeAdditionnalOffsetY(): number;
10028
10047
  /** @internal */
10029
- protected invalidateRect(): void;
10048
+ invalidateRect(): void;
10030
10049
  /**
10031
10050
  * @internal
10032
10051
  */
@@ -10525,6 +10544,10 @@ declare module BABYLON.GUI {
10525
10544
  private _populateNinePatchSlicesFromImage;
10526
10545
  private _detectPointerOnOpaqueOnly;
10527
10546
  private _imageDataCache;
10547
+ static SourceImgCache: Map<string, {
10548
+ img: BABYLON.IImage;
10549
+ timesUsed: number;
10550
+ }>;
10528
10551
  /**
10529
10552
  * BABYLON.Observable notified when the content is loaded
10530
10553
  */
@@ -10631,6 +10654,11 @@ declare module BABYLON.GUI {
10631
10654
  * Gets the image source url
10632
10655
  */
10633
10656
  get source(): BABYLON.Nullable<string>;
10657
+ /**
10658
+ * Resets the internal Image Element cache. Can reduce memory usage.
10659
+ */
10660
+ static ResetImageCache(): void;
10661
+ private _removeCacheUsage;
10634
10662
  /**
10635
10663
  * Gets or sets image source url
10636
10664
  */
@@ -10892,6 +10920,10 @@ declare module BABYLON.GUI {
10892
10920
  _onPointerMove(target: Control, coordinates: BABYLON.Vector2, pointerId: number, pi: BABYLON.PointerInfoBase): void;
10893
10921
  _onPointerUp(target: Control, coordinates: BABYLON.Vector2, pointerId: number, buttonIndex: number, notifyClick: boolean): void;
10894
10922
  protected _beforeRenderText(textWrapper: TextWrapper): TextWrapper;
10923
+ /** @internal */
10924
+ private set isTextHighlightOn(value);
10925
+ /** @internal */
10926
+ private get isTextHighlightOn();
10895
10927
  dispose(): void;
10896
10928
  }
10897
10929
 
@@ -10989,14 +11021,13 @@ declare module BABYLON.GUI {
10989
11021
  * @internal
10990
11022
  */
10991
11023
  protected _preMeasure(parentMeasure: Measure, context: BABYLON.ICanvasRenderingContext): void;
11024
+ private _computeScroll;
10992
11025
  /**
10993
11026
  * Processing of child after the parent measurement update
10994
11027
  *
10995
- * @param parentMeasure The parent measure
10996
- * @param context The rendering canvas
10997
11028
  * @internal
10998
11029
  */
10999
- protected _additionalProcessing(parentMeasure: Measure, context: BABYLON.ICanvasRenderingContext): void;
11030
+ protected _additionalProcessing(): void;
11000
11031
  private _drawText;
11001
11032
  /**
11002
11033
  * Copy the text in the clipboard
@@ -11052,10 +11083,14 @@ declare module BABYLON.GUI {
11052
11083
  export class Line extends Control {
11053
11084
  name?: string | undefined;
11054
11085
  private _lineWidth;
11055
- private _x1;
11056
- private _y1;
11057
- private _x2;
11058
- private _y2;
11086
+ /** @internal */
11087
+ _x1: ValueAndUnit;
11088
+ /** @internal */
11089
+ _y1: ValueAndUnit;
11090
+ /** @internal */
11091
+ _x2: ValueAndUnit;
11092
+ /** @internal */
11093
+ _y2: ValueAndUnit;
11059
11094
  private _dash;
11060
11095
  private _connectedControl;
11061
11096
  private _connectedControlDirtyObserver;
@@ -11084,8 +11119,10 @@ declare module BABYLON.GUI {
11084
11119
  set horizontalAlignment(value: number);
11085
11120
  /** Gets or sets vertical alignment */
11086
11121
  set verticalAlignment(value: number);
11087
- private get _effectiveX2();
11088
- private get _effectiveY2();
11122
+ /** @internal */
11123
+ get _effectiveX2(): number;
11124
+ /** @internal */
11125
+ get _effectiveY2(): number;
11089
11126
  /**
11090
11127
  * Creates a new Line
11091
11128
  * @param name defines the control name
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "babylonjs-gui",
3
- "version": "5.40.1",
3
+ "version": "5.42.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.40.1"
17
+ "babylonjs": "^5.42.0"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@dev/build-tools": "1.0.0",