babylonjs-gui 5.39.0 → 5.40.1

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.
@@ -90,6 +90,7 @@ export class AdvancedDynamicTexture extends DynamicTexture {
90
90
  private _pointerObserver;
91
91
  private _canvasPointerOutObserver;
92
92
  private _canvasBlurObserver;
93
+ private _controlAddedObserver;
93
94
  private _background;
94
95
  /** @internal */
95
96
  _rootContainer: Container;
@@ -4346,6 +4347,25 @@ export class Matrix2D {
4346
4347
  */
4347
4348
  static ComposeToRef(tx: number, ty: number, angle: number, scaleX: number, scaleY: number, parentMatrix: Nullable<Matrix2D>, result: Matrix2D): void;
4348
4349
  }
4350
+ /**
4351
+ * Useful math functions
4352
+ */
4353
+ export class MathTools {
4354
+ /**
4355
+ * Default rounding precision for GUI elements. It should be
4356
+ * set to a power of ten, where the exponent means the number
4357
+ * of decimal digits to round to, i.e, 100 means 2 decimal digits,
4358
+ * 1000 means 3 decimal digits, etc. Default is 100 (2 decimal digits).
4359
+ */
4360
+ static DefaultRoundingPrecision: number;
4361
+ /**
4362
+ * Rounds a number to the nearest multiple of a given precision
4363
+ * @param value the value to be rounded
4364
+ * @param precision the multiple to which the value will be rounded. Default is 100 (2 decimal digits)
4365
+ * @returns
4366
+ */
4367
+ static Round(value: number, precision?: number): number;
4368
+ }
4349
4369
 
4350
4370
  }
4351
4371
  declare module "babylonjs-gui/2D/measure" {
@@ -8513,6 +8533,7 @@ declare module BABYLON.GUI {
8513
8533
  private _pointerObserver;
8514
8534
  private _canvasPointerOutObserver;
8515
8535
  private _canvasBlurObserver;
8536
+ private _controlAddedObserver;
8516
8537
  private _background;
8517
8538
  /** @internal */
8518
8539
  _rootContainer: Container;
@@ -12517,6 +12538,25 @@ declare module BABYLON.GUI {
12517
12538
  */
12518
12539
  static ComposeToRef(tx: number, ty: number, angle: number, scaleX: number, scaleY: number, parentMatrix: BABYLON.Nullable<Matrix2D>, result: Matrix2D): void;
12519
12540
  }
12541
+ /**
12542
+ * Useful math functions
12543
+ */
12544
+ export class MathTools {
12545
+ /**
12546
+ * Default rounding precision for GUI elements. It should be
12547
+ * set to a power of ten, where the exponent means the number
12548
+ * of decimal digits to round to, i.e, 100 means 2 decimal digits,
12549
+ * 1000 means 3 decimal digits, etc. Default is 100 (2 decimal digits).
12550
+ */
12551
+ static DefaultRoundingPrecision: number;
12552
+ /**
12553
+ * Rounds a number to the nearest multiple of a given precision
12554
+ * @param value the value to be rounded
12555
+ * @param precision the multiple to which the value will be rounded. Default is 100 (2 decimal digits)
12556
+ * @returns
12557
+ */
12558
+ static Round(value: number, precision?: number): number;
12559
+ }
12520
12560
 
12521
12561
 
12522
12562
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "babylonjs-gui",
3
- "version": "5.39.0",
3
+ "version": "5.40.1",
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.39.0"
17
+ "babylonjs": "^5.40.1"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@dev/build-tools": "1.0.0",