babylonjs-gui 5.50.1 → 5.52.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.
@@ -971,6 +971,8 @@ export class Container extends Control {
971
971
  */
972
972
  _layout(parentMeasure: Measure, context: ICanvasRenderingContext): boolean;
973
973
  protected _postMeasure(): void;
974
+ private _inverseTransformMatrix;
975
+ private _inverseMeasure;
974
976
  /**
975
977
  * @internal
976
978
  */
@@ -5055,17 +5057,37 @@ import { Material } from "babylonjs/Materials/material";
5055
5057
  import { Scene } from "babylonjs/scene";
5056
5058
  import { AbstractButton3D } from "babylonjs-gui/3D/controls/abstractButton3D";
5057
5059
  import { AdvancedDynamicTexture } from "babylonjs-gui/2D/advancedDynamicTexture";
5060
+ /**
5061
+ * Options used to create a button in 3D
5062
+ */
5063
+ export interface IButton3DCreationOptions {
5064
+ /**
5065
+ * Width of the button. Default: 1
5066
+ */
5067
+ width?: number;
5068
+ /**
5069
+ * Height of the button. Default: 1
5070
+ */
5071
+ height?: number;
5072
+ /**
5073
+ * Depth of the button. Default: 0.08
5074
+ */
5075
+ depth?: number;
5076
+ }
5058
5077
  /**
5059
5078
  * Class used to create a button in 3D
5060
5079
  */
5061
5080
  export class Button3D extends AbstractButton3D {
5062
5081
  /** @internal */
5063
5082
  protected _currentMaterial: Material;
5083
+ protected _options: IButton3DCreationOptions;
5084
+ protected _height: number;
5085
+ protected _depth: number;
5064
5086
  /**
5065
5087
  * Creates a new button
5066
5088
  * @param name defines the control name
5067
5089
  */
5068
- constructor(name?: string);
5090
+ constructor(name?: string, options?: IButton3DCreationOptions);
5069
5091
  /**
5070
5092
  * Apply the facade texture (created from the content property).
5071
5093
  * @param facadeTexture defines the AdvancedDynamicTexture to use
@@ -5168,11 +5190,13 @@ export class ContentDisplay3D extends Control3D {
5168
5190
  private _facadeTexture;
5169
5191
  protected _contentResolution: number;
5170
5192
  protected _contentScaleRatio: number;
5193
+ protected _contentScaleRatioY?: number;
5171
5194
  /**
5172
5195
  * Gets or sets the GUI 2D content used to display the button's facade
5173
5196
  */
5174
5197
  get content(): Control;
5175
5198
  set content(value: Control);
5199
+ protected _setFacadeTextureScaling(): void;
5176
5200
  /**
5177
5201
  * Gets or sets the texture resolution used to render content (512 by default)
5178
5202
  */
@@ -9630,6 +9654,8 @@ declare module BABYLON.GUI {
9630
9654
  */
9631
9655
  _layout(parentMeasure: Measure, context: BABYLON.ICanvasRenderingContext): boolean;
9632
9656
  protected _postMeasure(): void;
9657
+ private _inverseTransformMatrix;
9658
+ private _inverseMeasure;
9633
9659
  /**
9634
9660
  * @internal
9635
9661
  */
@@ -13440,17 +13466,37 @@ declare module BABYLON.GUI {
13440
13466
  }
13441
13467
 
13442
13468
 
13469
+ /**
13470
+ * Options used to create a button in 3D
13471
+ */
13472
+ export interface IButton3DCreationOptions {
13473
+ /**
13474
+ * Width of the button. Default: 1
13475
+ */
13476
+ width?: number;
13477
+ /**
13478
+ * Height of the button. Default: 1
13479
+ */
13480
+ height?: number;
13481
+ /**
13482
+ * Depth of the button. Default: 0.08
13483
+ */
13484
+ depth?: number;
13485
+ }
13443
13486
  /**
13444
13487
  * Class used to create a button in 3D
13445
13488
  */
13446
13489
  export class Button3D extends AbstractButton3D {
13447
13490
  /** @internal */
13448
13491
  protected _currentMaterial: BABYLON.Material;
13492
+ protected _options: IButton3DCreationOptions;
13493
+ protected _height: number;
13494
+ protected _depth: number;
13449
13495
  /**
13450
13496
  * Creates a new button
13451
13497
  * @param name defines the control name
13452
13498
  */
13453
- constructor(name?: string);
13499
+ constructor(name?: string, options?: IButton3DCreationOptions);
13454
13500
  /**
13455
13501
  * Apply the facade texture (created from the content property).
13456
13502
  * @param facadeTexture defines the AdvancedDynamicTexture to use
@@ -13544,11 +13590,13 @@ declare module BABYLON.GUI {
13544
13590
  private _facadeTexture;
13545
13591
  protected _contentResolution: number;
13546
13592
  protected _contentScaleRatio: number;
13593
+ protected _contentScaleRatioY?: number;
13547
13594
  /**
13548
13595
  * Gets or sets the GUI 2D content used to display the button's facade
13549
13596
  */
13550
13597
  get content(): Control;
13551
13598
  set content(value: Control);
13599
+ protected _setFacadeTextureScaling(): void;
13552
13600
  /**
13553
13601
  * Gets or sets the texture resolution used to render content (512 by default)
13554
13602
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "babylonjs-gui",
3
- "version": "5.50.1",
3
+ "version": "5.52.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.50.1"
17
+ "babylonjs": "^5.52.0"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@dev/build-tools": "1.0.0",