babylonjs-gui 5.0.0-beta.3 → 5.0.0-beta.4

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.
@@ -1298,6 +1298,15 @@ declare module "babylonjs-gui/2D/controls/control" {
1298
1298
  * @returns the ascendant or null if not found
1299
1299
  */
1300
1300
  getAscendantOfClass(className: string): Nullable<Control>;
1301
+ /**
1302
+ * Mark control element as dirty
1303
+ * @param force force non visible elements to be marked too
1304
+ */
1305
+ markAsDirty(force: false): void;
1306
+ /**
1307
+ * Mark the element and its children as dirty
1308
+ */
1309
+ markAllAsDirty(): void;
1301
1310
  /** @hidden */
1302
1311
  _resetFontCache(): void;
1303
1312
  /**
@@ -4348,6 +4357,7 @@ declare module "babylonjs-gui/3D/controls/touchButton3D" {
4348
4357
  import { Mesh } from "babylonjs/Meshes/mesh";
4349
4358
  import { TransformNode } from "babylonjs/Meshes/transformNode";
4350
4359
  import { Scene } from "babylonjs/scene";
4360
+ import { Observable } from "babylonjs/Misc/observable";
4351
4361
  import { Button3D } from "babylonjs-gui/3D/controls/button3D";
4352
4362
  /**
4353
4363
  * Class used to create a touchable button in 3D
@@ -4356,6 +4366,13 @@ declare module "babylonjs-gui/3D/controls/touchButton3D" {
4356
4366
  private _collisionMesh;
4357
4367
  private _collidableFrontDirection;
4358
4368
  protected _isNearPressed: boolean;
4369
+ private _isToggleButton;
4370
+ private _toggleState;
4371
+ private _toggleButtonCallback;
4372
+ /**
4373
+ * An event triggered when the button is toggled. Only fired if 'isToggleButton' is true
4374
+ */
4375
+ onToggleObservable: Observable<boolean>;
4359
4376
  /**
4360
4377
  * Creates a new touchable button
4361
4378
  * @param name defines the control name
@@ -4376,6 +4393,19 @@ declare module "babylonjs-gui/3D/controls/touchButton3D" {
4376
4393
  * @param collisionMesh the new collision mesh for the button
4377
4394
  */
4378
4395
  set collisionMesh(collisionMesh: Mesh);
4396
+ /**
4397
+ * Setter for if this TouchButton3D should be treated as a toggle button
4398
+ * @param value If this TouchHolographicButton should act like a toggle button
4399
+ */
4400
+ set isToggleButton(value: boolean);
4401
+ get isToggleButton(): boolean;
4402
+ /**
4403
+ * A public entrypoint to set the toggle state of the TouchHolographicButton. Only works if 'isToggleButton' is true
4404
+ * @param newState The new state to set the TouchHolographicButton's toggle state to
4405
+ */
4406
+ set isToggled(newState: boolean);
4407
+ get isToggled(): boolean;
4408
+ protected _onToggle(newState: boolean): void;
4379
4409
  private _isInteractionInFrontOfButton;
4380
4410
  protected _getInteractionHeight(interactionPos: Vector3, basePos: Vector3): number;
4381
4411
  /** @hidden */
@@ -5079,6 +5109,7 @@ declare module "babylonjs-gui/3D/controls/touchHolographicButton" {
5079
5109
  import { TransformNode } from "babylonjs/Meshes/transformNode";
5080
5110
  import { Mesh } from "babylonjs/Meshes/mesh";
5081
5111
  import { Scene } from "babylonjs/scene";
5112
+ import { FluentMaterial } from "babylonjs-gui/3D/materials/fluent/fluentMaterial";
5082
5113
  import { FluentButtonMaterial } from "babylonjs-gui/3D/materials/fluentButton/fluentButtonMaterial";
5083
5114
  import { AdvancedDynamicTexture } from "babylonjs-gui/2D/advancedDynamicTexture";
5084
5115
  import { TouchButton3D } from "babylonjs-gui/3D/controls/touchButton3D";
@@ -5109,6 +5140,8 @@ declare module "babylonjs-gui/3D/controls/touchHolographicButton" {
5109
5140
  private _pointerHoverObserver;
5110
5141
  private _frontPlateDepth;
5111
5142
  private _backPlateDepth;
5143
+ private _backplateColor;
5144
+ private _backplateToggledColor;
5112
5145
  private _tooltipFade;
5113
5146
  private _tooltipTextBlock;
5114
5147
  private _tooltipTexture;
@@ -5139,7 +5172,7 @@ declare module "babylonjs-gui/3D/controls/touchHolographicButton" {
5139
5172
  /**
5140
5173
  * Gets the back material used by this button
5141
5174
  */
5142
- get backMaterial(): StandardMaterial;
5175
+ get backMaterial(): FluentMaterial;
5143
5176
  /**
5144
5177
  * Gets the front material used by this button
5145
5178
  */
@@ -5168,6 +5201,7 @@ declare module "babylonjs-gui/3D/controls/touchHolographicButton" {
5168
5201
  private _createBackMaterial;
5169
5202
  private _createFrontMaterial;
5170
5203
  private _createPlateMaterial;
5204
+ protected _onToggle(newState: boolean): void;
5171
5205
  protected _affectMaterial(mesh: Mesh): void;
5172
5206
  /**
5173
5207
  * Releases all associated resources
@@ -5931,7 +5965,6 @@ declare module "babylonjs-gui/3D/controls/nearMenu" {
5931
5965
  */
5932
5966
  private static PIN_ICON_FILENAME;
5933
5967
  private _pinButton;
5934
- private _pinMaterial;
5935
5968
  private _dragObserver;
5936
5969
  private _defaultBehavior;
5937
5970
  /**
@@ -6999,43 +7032,6 @@ declare module "babylonjs-gui/3D/controls/touchMeshButton3D" {
6999
7032
  protected _affectMaterial(mesh: AbstractMesh): void;
7000
7033
  }
7001
7034
  }
7002
- declare module "babylonjs-gui/3D/controls/touchToggleButton3D" {
7003
- import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
7004
- import { Mesh } from "babylonjs/Meshes/mesh";
7005
- import { Observable } from "babylonjs/Misc/observable";
7006
- import { Scene } from "babylonjs/scene";
7007
- import { TransformNode } from "babylonjs/Meshes/transformNode";
7008
- import { Vector3 } from "babylonjs/Maths/math.vector";
7009
- import { TouchButton3D } from "babylonjs-gui/3D/controls/touchButton3D";
7010
- /**
7011
- * Class used as base class for touch-enabled toggleable buttons
7012
- */
7013
- export class TouchToggleButton3D extends TouchButton3D {
7014
- private _isPressed;
7015
- /**
7016
- * An event triggered when the button is toggled on
7017
- */
7018
- onToggleOnObservable: Observable<Vector3>;
7019
- /**
7020
- * An event triggered when the button is toggled off
7021
- */
7022
- onToggleOffObservable: Observable<Vector3>;
7023
- /**
7024
- * Creates a new button
7025
- * @param name defines the control name
7026
- * @param collisionMesh defines the mesh to track near interactions with
7027
- */
7028
- constructor(name?: string, collisionMesh?: Mesh);
7029
- private _onToggle;
7030
- protected _getTypeName(): string;
7031
- protected _createNode(scene: Scene): TransformNode;
7032
- protected _affectMaterial(mesh: AbstractMesh): void;
7033
- /**
7034
- * Releases all associated resources
7035
- */
7036
- dispose(): void;
7037
- }
7038
- }
7039
7035
  declare module "babylonjs-gui/3D/controls/holographicBackplate" {
7040
7036
  import { TransformNode } from "babylonjs/Meshes/transformNode";
7041
7037
  import { Mesh } from "babylonjs/Meshes/mesh";
@@ -7106,7 +7102,6 @@ declare module "babylonjs-gui/3D/controls/index" {
7106
7102
  export * from "babylonjs-gui/3D/controls/touchMeshButton3D";
7107
7103
  export * from "babylonjs-gui/3D/controls/touchHolographicButton";
7108
7104
  export * from "babylonjs-gui/3D/controls/touchHolographicMenu";
7109
- export * from "babylonjs-gui/3D/controls/touchToggleButton3D";
7110
7105
  export * from "babylonjs-gui/3D/controls/volumeBasedPanel";
7111
7106
  export * from "babylonjs-gui/3D/controls/holographicBackplate";
7112
7107
  }
@@ -8423,6 +8418,15 @@ declare module BABYLON.GUI {
8423
8418
  * @returns the ascendant or null if not found
8424
8419
  */
8425
8420
  getAscendantOfClass(className: string): BABYLON.Nullable<Control>;
8421
+ /**
8422
+ * Mark control element as dirty
8423
+ * @param force force non visible elements to be marked too
8424
+ */
8425
+ markAsDirty(force: false): void;
8426
+ /**
8427
+ * Mark the element and its children as dirty
8428
+ */
8429
+ markAllAsDirty(): void;
8426
8430
  /** @hidden */
8427
8431
  _resetFontCache(): void;
8428
8432
  /**
@@ -11254,6 +11258,13 @@ declare module BABYLON.GUI {
11254
11258
  private _collisionMesh;
11255
11259
  private _collidableFrontDirection;
11256
11260
  protected _isNearPressed: boolean;
11261
+ private _isToggleButton;
11262
+ private _toggleState;
11263
+ private _toggleButtonCallback;
11264
+ /**
11265
+ * An event triggered when the button is toggled. Only fired if 'isToggleButton' is true
11266
+ */
11267
+ onToggleObservable: BABYLON.Observable<boolean>;
11257
11268
  /**
11258
11269
  * Creates a new touchable button
11259
11270
  * @param name defines the control name
@@ -11274,6 +11285,19 @@ declare module BABYLON.GUI {
11274
11285
  * @param collisionMesh the new collision mesh for the button
11275
11286
  */
11276
11287
  set collisionMesh(collisionMesh: BABYLON.Mesh);
11288
+ /**
11289
+ * Setter for if this TouchButton3D should be treated as a toggle button
11290
+ * @param value If this TouchHolographicButton should act like a toggle button
11291
+ */
11292
+ set isToggleButton(value: boolean);
11293
+ get isToggleButton(): boolean;
11294
+ /**
11295
+ * A public entrypoint to set the toggle state of the TouchHolographicButton. Only works if 'isToggleButton' is true
11296
+ * @param newState The new state to set the TouchHolographicButton's toggle state to
11297
+ */
11298
+ set isToggled(newState: boolean);
11299
+ get isToggled(): boolean;
11300
+ protected _onToggle(newState: boolean): void;
11277
11301
  private _isInteractionInFrontOfButton;
11278
11302
  protected _getInteractionHeight(interactionPos: BABYLON.Vector3, basePos: BABYLON.Vector3): number;
11279
11303
  /** @hidden */
@@ -11943,6 +11967,8 @@ declare module BABYLON.GUI {
11943
11967
  private _pointerHoverObserver;
11944
11968
  private _frontPlateDepth;
11945
11969
  private _backPlateDepth;
11970
+ private _backplateColor;
11971
+ private _backplateToggledColor;
11946
11972
  private _tooltipFade;
11947
11973
  private _tooltipTextBlock;
11948
11974
  private _tooltipTexture;
@@ -11973,7 +11999,7 @@ declare module BABYLON.GUI {
11973
11999
  /**
11974
12000
  * Gets the back material used by this button
11975
12001
  */
11976
- get backMaterial(): BABYLON.StandardMaterial;
12002
+ get backMaterial(): FluentMaterial;
11977
12003
  /**
11978
12004
  * Gets the front material used by this button
11979
12005
  */
@@ -12002,6 +12028,7 @@ declare module BABYLON.GUI {
12002
12028
  private _createBackMaterial;
12003
12029
  private _createFrontMaterial;
12004
12030
  private _createPlateMaterial;
12031
+ protected _onToggle(newState: boolean): void;
12005
12032
  protected _affectMaterial(mesh: BABYLON.Mesh): void;
12006
12033
  /**
12007
12034
  * Releases all associated resources
@@ -12693,7 +12720,6 @@ declare module BABYLON.GUI {
12693
12720
  */
12694
12721
  private static PIN_ICON_FILENAME;
12695
12722
  private _pinButton;
12696
- private _pinMaterial;
12697
12723
  private _dragObserver;
12698
12724
  private _defaultBehavior;
12699
12725
  /**
@@ -13697,36 +13723,6 @@ declare module BABYLON.GUI {
13697
13723
  protected _affectMaterial(mesh: BABYLON.AbstractMesh): void;
13698
13724
  }
13699
13725
  }
13700
- declare module BABYLON.GUI {
13701
- /**
13702
- * Class used as base class for touch-enabled toggleable buttons
13703
- */
13704
- export class TouchToggleButton3D extends TouchButton3D {
13705
- private _isPressed;
13706
- /**
13707
- * An event triggered when the button is toggled on
13708
- */
13709
- onToggleOnObservable: BABYLON.Observable<BABYLON.Vector3>;
13710
- /**
13711
- * An event triggered when the button is toggled off
13712
- */
13713
- onToggleOffObservable: BABYLON.Observable<BABYLON.Vector3>;
13714
- /**
13715
- * Creates a new button
13716
- * @param name defines the control name
13717
- * @param collisionMesh defines the mesh to track near interactions with
13718
- */
13719
- constructor(name?: string, collisionMesh?: BABYLON.Mesh);
13720
- private _onToggle;
13721
- protected _getTypeName(): string;
13722
- protected _createNode(scene: BABYLON.Scene): BABYLON.TransformNode;
13723
- protected _affectMaterial(mesh: BABYLON.AbstractMesh): void;
13724
- /**
13725
- * Releases all associated resources
13726
- */
13727
- dispose(): void;
13728
- }
13729
- }
13730
13726
  declare module BABYLON.GUI {
13731
13727
  /**
13732
13728
  * Class used to create a holographic backplate in 3D
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.3",
7
+ "version": "5.0.0-beta.4",
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.3"
31
+ "babylonjs": "5.0.0-beta.4"
32
32
  },
33
33
  "engines": {
34
34
  "node": "*"