babylonjs-gui 5.0.0-beta.11 → 5.0.0-beta.12

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.
@@ -4380,7 +4380,8 @@ declare module "babylonjs-gui/3D/controls/touchButton3D" {
4380
4380
  export class TouchButton3D extends Button3D {
4381
4381
  private _collisionMesh;
4382
4382
  private _collidableFrontDirection;
4383
- protected _isNearPressed: boolean;
4383
+ private _isNearPressed;
4384
+ private _interactionSurfaceHeight;
4384
4385
  private _isToggleButton;
4385
4386
  private _toggleState;
4386
4387
  private _toggleButtonCallback;
@@ -4394,6 +4395,10 @@ declare module "babylonjs-gui/3D/controls/touchButton3D" {
4394
4395
  * @param collisionMesh mesh to track collisions with
4395
4396
  */
4396
4397
  constructor(name?: string, collisionMesh?: Mesh);
4398
+ /**
4399
+ * Whether the current interaction is caused by near interaction or not
4400
+ */
4401
+ get isActiveNearInteraction(): boolean;
4397
4402
  /**
4398
4403
  * Sets the front-facing direction of the button. Pass in Vector3.Zero to allow interactions from any direction
4399
4404
  * @param frontDir the forward direction of the button
@@ -4422,6 +4427,12 @@ declare module "babylonjs-gui/3D/controls/touchButton3D" {
4422
4427
  get isToggled(): boolean;
4423
4428
  protected _onToggle(newState: boolean): void;
4424
4429
  private _isInteractionInFrontOfButton;
4430
+ /**
4431
+ * Get the height of the touchPoint from the collidable part of the button
4432
+ * @param touchPoint the point to compare to the button, in absolute position
4433
+ * @returns the depth of the touch point into the front of the button
4434
+ */
4435
+ getPressDepth(touchPoint: Vector3): number;
4425
4436
  protected _getInteractionHeight(interactionPos: Vector3, basePos: Vector3): number;
4426
4437
  /** @hidden */
4427
4438
  _generatePointerEventType(providedType: number, nearMeshPosition: Vector3, activeInteractionCount: number): number;
@@ -5128,6 +5139,7 @@ declare module "babylonjs-gui/3D/controls/touchHolographicButton" {
5128
5139
  import { FluentButtonMaterial } from "babylonjs-gui/3D/materials/fluentButton/fluentButtonMaterial";
5129
5140
  import { AdvancedDynamicTexture } from "babylonjs-gui/2D/advancedDynamicTexture";
5130
5141
  import { TouchButton3D } from "babylonjs-gui/3D/controls/touchButton3D";
5142
+ import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
5131
5143
  /**
5132
5144
  * Class used to create a holographic button in 3D
5133
5145
  * @since 5.0.0
@@ -5169,6 +5181,10 @@ declare module "babylonjs-gui/3D/controls/touchHolographicButton" {
5169
5181
  */
5170
5182
  set renderingGroupId(id: number);
5171
5183
  get renderingGroupId(): number;
5184
+ /**
5185
+ * Gets the mesh used to render this control
5186
+ */
5187
+ get mesh(): Nullable<AbstractMesh>;
5172
5188
  /**
5173
5189
  * Text to be displayed on the tooltip shown when hovering on the button. When set to null tooltip is disabled. (Default: null)
5174
5190
  */
@@ -5518,6 +5534,7 @@ declare module "babylonjs-gui/3D/gizmos/slateGizmo" {
5518
5534
  * Value we use to offset handles from mesh
5519
5535
  */
5520
5536
  private _margin;
5537
+ private _handleSize;
5521
5538
  private _attachedSlate;
5522
5539
  private _existingSlateScale;
5523
5540
  /**
@@ -5528,10 +5545,6 @@ declare module "babylonjs-gui/3D/gizmos/slateGizmo" {
5528
5545
  * The distance away from the object which the draggable meshes should appear world sized when fixedScreenSize is set to true (default: 10)
5529
5546
  */
5530
5547
  fixedScreenSizeDistanceFactor: number;
5531
- /**
5532
- * Size of the handles (meters in XR)
5533
- */
5534
- handleSize: number;
5535
5548
  /**
5536
5549
  * The slate attached to this gizmo
5537
5550
  */
@@ -5550,6 +5563,7 @@ declare module "babylonjs-gui/3D/gizmos/slateGizmo" {
5550
5563
  */
5551
5564
  updateBoundingBox(): void;
5552
5565
  private _updateHandlesPosition;
5566
+ private _updateHandlesScaling;
5553
5567
  protected _update(): void;
5554
5568
  dispose(): void;
5555
5569
  }
@@ -5753,22 +5767,6 @@ declare module "babylonjs-gui/3D/controls/holographicSlate" {
5753
5767
  */
5754
5768
  static FOLLOW_ICON_FILENAME: string;
5755
5769
  private static DEFAULT_TEXT_RESOLUTION_Y;
5756
- /**
5757
- * 2D dimensions of the slate
5758
- */
5759
- dimensions: Vector2;
5760
- /**
5761
- * Minimum dimensions of the slate
5762
- */
5763
- minDimensions: Vector2;
5764
- /**
5765
- * Default dimensions of the slate
5766
- */
5767
- readonly defaultDimensions: Vector2;
5768
- /**
5769
- * Height of the title bar component
5770
- */
5771
- titleBarHeight: number;
5772
5770
  /**
5773
5771
  * Margin between title bar and contentplate
5774
5772
  */
@@ -5777,7 +5775,10 @@ declare module "babylonjs-gui/3D/controls/holographicSlate" {
5777
5775
  * Origin in local coordinates (top left corner)
5778
5776
  */
5779
5777
  origin: Vector3;
5778
+ private _dimensions;
5779
+ private _titleBarHeight;
5780
5780
  private _titleBarMaterial;
5781
+ private _backMaterial;
5781
5782
  private _contentMaterial;
5782
5783
  private _pickedPointObserver;
5783
5784
  private _positionChangedObserver;
@@ -5795,9 +5796,29 @@ declare module "babylonjs-gui/3D/controls/holographicSlate" {
5795
5796
  protected _titleBar: Mesh;
5796
5797
  protected _titleBarTitle: Mesh;
5797
5798
  protected _contentPlate: Mesh;
5798
- protected _followButton: TouchHolographicButton;
5799
+ protected _backPlate: Mesh;
5800
+ /** @hidden */
5801
+ _followButton: TouchHolographicButton;
5799
5802
  protected _closeButton: TouchHolographicButton;
5800
5803
  protected _contentScaleRatio: number;
5804
+ /**
5805
+ * 2D dimensions of the slate
5806
+ */
5807
+ get dimensions(): Vector2;
5808
+ set dimensions(value: Vector2);
5809
+ /**
5810
+ * Minimum dimensions of the slate
5811
+ */
5812
+ minDimensions: Vector2;
5813
+ /**
5814
+ * Default dimensions of the slate
5815
+ */
5816
+ readonly defaultDimensions: Vector2;
5817
+ /**
5818
+ * Height of the title bar component
5819
+ */
5820
+ get titleBarHeight(): number;
5821
+ set titleBarHeight(value: number);
5801
5822
  /**
5802
5823
  * Rendering ground id of all the meshes
5803
5824
  */
@@ -5838,8 +5859,9 @@ declare module "babylonjs-gui/3D/controls/holographicSlate" {
5838
5859
  _prepareNode(scene: Scene): void;
5839
5860
  /**
5840
5861
  * Resets the aspect and pose of the slate so it is right in front of the active camera, facing towards it.
5862
+ * @param resetAspect Should the slate's dimensions/aspect ratio be reset as well
5841
5863
  */
5842
- resetDefaultAspectAndPose(): void;
5864
+ resetDefaultAspectAndPose(resetAspect?: boolean): void;
5843
5865
  /**
5844
5866
  * Releases all associated resources
5845
5867
  */
@@ -11288,7 +11310,8 @@ declare module BABYLON.GUI {
11288
11310
  export class TouchButton3D extends Button3D {
11289
11311
  private _collisionMesh;
11290
11312
  private _collidableFrontDirection;
11291
- protected _isNearPressed: boolean;
11313
+ private _isNearPressed;
11314
+ private _interactionSurfaceHeight;
11292
11315
  private _isToggleButton;
11293
11316
  private _toggleState;
11294
11317
  private _toggleButtonCallback;
@@ -11302,6 +11325,10 @@ declare module BABYLON.GUI {
11302
11325
  * @param collisionMesh mesh to track collisions with
11303
11326
  */
11304
11327
  constructor(name?: string, collisionMesh?: BABYLON.Mesh);
11328
+ /**
11329
+ * Whether the current interaction is caused by near interaction or not
11330
+ */
11331
+ get isActiveNearInteraction(): boolean;
11305
11332
  /**
11306
11333
  * Sets the front-facing direction of the button. Pass in BABYLON.Vector3.Zero to allow interactions from any direction
11307
11334
  * @param frontDir the forward direction of the button
@@ -11330,6 +11357,12 @@ declare module BABYLON.GUI {
11330
11357
  get isToggled(): boolean;
11331
11358
  protected _onToggle(newState: boolean): void;
11332
11359
  private _isInteractionInFrontOfButton;
11360
+ /**
11361
+ * Get the height of the touchPoint from the collidable part of the button
11362
+ * @param touchPoint the point to compare to the button, in absolute position
11363
+ * @returns the depth of the touch point into the front of the button
11364
+ */
11365
+ getPressDepth(touchPoint: BABYLON.Vector3): number;
11333
11366
  protected _getInteractionHeight(interactionPos: BABYLON.Vector3, basePos: BABYLON.Vector3): number;
11334
11367
  /** @hidden */
11335
11368
  _generatePointerEventType(providedType: number, nearMeshPosition: BABYLON.Vector3, activeInteractionCount: number): number;
@@ -12012,6 +12045,10 @@ declare module BABYLON.GUI {
12012
12045
  */
12013
12046
  set renderingGroupId(id: number);
12014
12047
  get renderingGroupId(): number;
12048
+ /**
12049
+ * Gets the mesh used to render this control
12050
+ */
12051
+ get mesh(): BABYLON.Nullable<BABYLON.AbstractMesh>;
12015
12052
  /**
12016
12053
  * Text to be displayed on the tooltip shown when hovering on the button. When set to null tooltip is disabled. (Default: null)
12017
12054
  */
@@ -12337,6 +12374,7 @@ declare module BABYLON.GUI {
12337
12374
  * Value we use to offset handles from mesh
12338
12375
  */
12339
12376
  private _margin;
12377
+ private _handleSize;
12340
12378
  private _attachedSlate;
12341
12379
  private _existingSlateScale;
12342
12380
  /**
@@ -12347,10 +12385,6 @@ declare module BABYLON.GUI {
12347
12385
  * The distance away from the object which the draggable meshes should appear world sized when fixedScreenSize is set to true (default: 10)
12348
12386
  */
12349
12387
  fixedScreenSizeDistanceFactor: number;
12350
- /**
12351
- * Size of the handles (meters in XR)
12352
- */
12353
- handleSize: number;
12354
12388
  /**
12355
12389
  * The slate attached to this gizmo
12356
12390
  */
@@ -12369,6 +12403,7 @@ declare module BABYLON.GUI {
12369
12403
  */
12370
12404
  updateBoundingBox(): void;
12371
12405
  private _updateHandlesPosition;
12406
+ private _updateHandlesScaling;
12372
12407
  protected _update(): void;
12373
12408
  dispose(): void;
12374
12409
  }
@@ -12550,22 +12585,6 @@ declare module BABYLON.GUI {
12550
12585
  */
12551
12586
  static FOLLOW_ICON_FILENAME: string;
12552
12587
  private static DEFAULT_TEXT_RESOLUTION_Y;
12553
- /**
12554
- * 2D dimensions of the slate
12555
- */
12556
- dimensions: BABYLON.Vector2;
12557
- /**
12558
- * Minimum dimensions of the slate
12559
- */
12560
- minDimensions: BABYLON.Vector2;
12561
- /**
12562
- * Default dimensions of the slate
12563
- */
12564
- readonly defaultDimensions: BABYLON.Vector2;
12565
- /**
12566
- * Height of the title bar component
12567
- */
12568
- titleBarHeight: number;
12569
12588
  /**
12570
12589
  * Margin between title bar and contentplate
12571
12590
  */
@@ -12574,7 +12593,10 @@ declare module BABYLON.GUI {
12574
12593
  * Origin in local coordinates (top left corner)
12575
12594
  */
12576
12595
  origin: BABYLON.Vector3;
12596
+ private _dimensions;
12597
+ private _titleBarHeight;
12577
12598
  private _titleBarMaterial;
12599
+ private _backMaterial;
12578
12600
  private _contentMaterial;
12579
12601
  private _pickedPointObserver;
12580
12602
  private _positionChangedObserver;
@@ -12592,9 +12614,29 @@ declare module BABYLON.GUI {
12592
12614
  protected _titleBar: BABYLON.Mesh;
12593
12615
  protected _titleBarTitle: BABYLON.Mesh;
12594
12616
  protected _contentPlate: BABYLON.Mesh;
12595
- protected _followButton: TouchHolographicButton;
12617
+ protected _backPlate: BABYLON.Mesh;
12618
+ /** @hidden */
12619
+ _followButton: TouchHolographicButton;
12596
12620
  protected _closeButton: TouchHolographicButton;
12597
12621
  protected _contentScaleRatio: number;
12622
+ /**
12623
+ * 2D dimensions of the slate
12624
+ */
12625
+ get dimensions(): BABYLON.Vector2;
12626
+ set dimensions(value: BABYLON.Vector2);
12627
+ /**
12628
+ * Minimum dimensions of the slate
12629
+ */
12630
+ minDimensions: BABYLON.Vector2;
12631
+ /**
12632
+ * Default dimensions of the slate
12633
+ */
12634
+ readonly defaultDimensions: BABYLON.Vector2;
12635
+ /**
12636
+ * Height of the title bar component
12637
+ */
12638
+ get titleBarHeight(): number;
12639
+ set titleBarHeight(value: number);
12598
12640
  /**
12599
12641
  * Rendering ground id of all the meshes
12600
12642
  */
@@ -12635,8 +12677,9 @@ declare module BABYLON.GUI {
12635
12677
  _prepareNode(scene: BABYLON.Scene): void;
12636
12678
  /**
12637
12679
  * Resets the aspect and pose of the slate so it is right in front of the active camera, facing towards it.
12680
+ * @param resetAspect Should the slate's dimensions/aspect ratio be reset as well
12638
12681
  */
12639
- resetDefaultAspectAndPose(): void;
12682
+ resetDefaultAspectAndPose(resetAspect?: boolean): void;
12640
12683
  /**
12641
12684
  * Releases all associated resources
12642
12685
  */
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  },
5
5
  "name": "babylonjs-gui",
6
6
  "description": "The Babylon.js GUI library is an extension you can use to generate interactive user interface. It is build on top of the DynamicTexture.",
7
- "version": "5.0.0-beta.11",
7
+ "version": "5.0.0-beta.12",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -28,7 +28,7 @@
28
28
  ],
29
29
  "license": "Apache-2.0",
30
30
  "dependencies": {
31
- "babylonjs": "5.0.0-beta.11"
31
+ "babylonjs": "5.0.0-beta.12"
32
32
  },
33
33
  "engines": {
34
34
  "node": "*"