babylonjs-gui 7.23.0 → 7.24.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.
@@ -2844,6 +2844,10 @@ export class HolographicSlate extends ContentDisplay3D {
2844
2844
  private _contentViewport;
2845
2845
  private _contentDragBehavior;
2846
2846
  private _defaultBehavior;
2847
+ /**
2848
+ * If true, the content will be scaled to fit the dimensions of the slate
2849
+ */
2850
+ fitContentToDimensions: boolean;
2847
2851
  /**
2848
2852
  * Regroups all mesh behaviors for the slate
2849
2853
  */
@@ -3144,6 +3148,8 @@ export class Control3D implements IDisposable, IBehaviorAware<Control3D> {
3144
3148
  _host: GUI3DManager;
3145
3149
  /** @internal */
3146
3150
  _isScaledByManager: boolean;
3151
+ private _position?;
3152
+ private _scaling?;
3147
3153
  /** Gets or sets the control position in world space */
3148
3154
  get position(): Vector3;
3149
3155
  set position(value: Vector3);
@@ -3305,14 +3311,18 @@ export class Control3D implements IDisposable, IBehaviorAware<Control3D> {
3305
3311
  declare module "babylonjs-gui/3D/controls/contentDisplay3D" {
3306
3312
  import { Control } from "babylonjs-gui/2D/controls/control";
3307
3313
  import { AdvancedDynamicTexture } from "babylonjs-gui/2D/advancedDynamicTexture";
3314
+ import { Nullable } from "babylonjs/types";
3308
3315
  import { Control3D } from "babylonjs-gui/3D/controls/control3D";
3309
3316
  /**
3310
3317
  * The base class for controls that display content
3311
3318
  */
3312
3319
  export class ContentDisplay3D extends Control3D {
3313
3320
  private _content;
3314
- private _facadeTexture;
3315
- protected _contentResolution: number;
3321
+ protected _facadeTexture: Nullable<AdvancedDynamicTexture>;
3322
+ protected _contentResolution: number | {
3323
+ width: number;
3324
+ height: number;
3325
+ };
3316
3326
  protected _contentScaleRatio: number;
3317
3327
  protected _contentScaleRatioY?: number;
3318
3328
  /**
@@ -3324,8 +3334,14 @@ export class ContentDisplay3D extends Control3D {
3324
3334
  /**
3325
3335
  * Gets or sets the texture resolution used to render content (512 by default)
3326
3336
  */
3327
- get contentResolution(): number;
3328
- set contentResolution(value: number);
3337
+ get contentResolution(): number | {
3338
+ width: number;
3339
+ height: number;
3340
+ };
3341
+ set contentResolution(value: number | {
3342
+ width: number;
3343
+ height: number;
3344
+ });
3329
3345
  protected _disposeFacadeTexture(): void;
3330
3346
  protected _resetContent(): void;
3331
3347
  /**
@@ -11429,6 +11445,10 @@ declare module BABYLON.GUI {
11429
11445
  private _contentViewport;
11430
11446
  private _contentDragBehavior;
11431
11447
  private _defaultBehavior;
11448
+ /**
11449
+ * If true, the content will be scaled to fit the dimensions of the slate
11450
+ */
11451
+ fitContentToDimensions: boolean;
11432
11452
  /**
11433
11453
  * Regroups all mesh behaviors for the slate
11434
11454
  */
@@ -11691,6 +11711,8 @@ declare module BABYLON.GUI {
11691
11711
  _host: GUI3DManager;
11692
11712
  /** @internal */
11693
11713
  _isScaledByManager: boolean;
11714
+ private _position?;
11715
+ private _scaling?;
11694
11716
  /** Gets or sets the control position in world space */
11695
11717
  get position(): BABYLON.Vector3;
11696
11718
  set position(value: BABYLON.Vector3);
@@ -11854,8 +11876,11 @@ declare module BABYLON.GUI {
11854
11876
  */
11855
11877
  export class ContentDisplay3D extends Control3D {
11856
11878
  private _content;
11857
- private _facadeTexture;
11858
- protected _contentResolution: number;
11879
+ protected _facadeTexture: BABYLON.Nullable<AdvancedDynamicTexture>;
11880
+ protected _contentResolution: number | {
11881
+ width: number;
11882
+ height: number;
11883
+ };
11859
11884
  protected _contentScaleRatio: number;
11860
11885
  protected _contentScaleRatioY?: number;
11861
11886
  /**
@@ -11867,8 +11892,14 @@ declare module BABYLON.GUI {
11867
11892
  /**
11868
11893
  * Gets or sets the texture resolution used to render content (512 by default)
11869
11894
  */
11870
- get contentResolution(): number;
11871
- set contentResolution(value: number);
11895
+ get contentResolution(): number | {
11896
+ width: number;
11897
+ height: number;
11898
+ };
11899
+ set contentResolution(value: number | {
11900
+ width: number;
11901
+ height: number;
11902
+ });
11872
11903
  protected _disposeFacadeTexture(): void;
11873
11904
  protected _resetContent(): void;
11874
11905
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "babylonjs-gui",
3
- "version": "7.23.0",
3
+ "version": "7.24.0",
4
4
  "main": "babylon.gui.js",
5
5
  "types": "babylon.gui.module.d.ts",
6
6
  "files": [
@@ -15,7 +15,7 @@
15
15
  "test:escheck": "es-check es6 ./babylon.gui.js"
16
16
  },
17
17
  "dependencies": {
18
- "babylonjs": "^7.23.0"
18
+ "babylonjs": "^7.24.0"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@dev/build-tools": "1.0.0",