babylonjs-gui 5.51.0 → 5.53.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.
- package/babylon.gui.d.ts +23 -1
- package/babylon.gui.js +116 -106
- package/babylon.gui.js.map +1 -1
- package/babylon.gui.min.js +1 -1
- package/babylon.gui.min.js.map +1 -1
- package/babylon.gui.module.d.ts +46 -2
- package/package.json +2 -2
package/babylon.gui.module.d.ts
CHANGED
@@ -5057,17 +5057,37 @@ import { Material } from "babylonjs/Materials/material";
|
|
5057
5057
|
import { Scene } from "babylonjs/scene";
|
5058
5058
|
import { AbstractButton3D } from "babylonjs-gui/3D/controls/abstractButton3D";
|
5059
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
|
+
}
|
5060
5077
|
/**
|
5061
5078
|
* Class used to create a button in 3D
|
5062
5079
|
*/
|
5063
5080
|
export class Button3D extends AbstractButton3D {
|
5064
5081
|
/** @internal */
|
5065
5082
|
protected _currentMaterial: Material;
|
5083
|
+
protected _options: IButton3DCreationOptions;
|
5084
|
+
protected _height: number;
|
5085
|
+
protected _depth: number;
|
5066
5086
|
/**
|
5067
5087
|
* Creates a new button
|
5068
5088
|
* @param name defines the control name
|
5069
5089
|
*/
|
5070
|
-
constructor(name?: string);
|
5090
|
+
constructor(name?: string, options?: IButton3DCreationOptions);
|
5071
5091
|
/**
|
5072
5092
|
* Apply the facade texture (created from the content property).
|
5073
5093
|
* @param facadeTexture defines the AdvancedDynamicTexture to use
|
@@ -5170,11 +5190,13 @@ export class ContentDisplay3D extends Control3D {
|
|
5170
5190
|
private _facadeTexture;
|
5171
5191
|
protected _contentResolution: number;
|
5172
5192
|
protected _contentScaleRatio: number;
|
5193
|
+
protected _contentScaleRatioY?: number;
|
5173
5194
|
/**
|
5174
5195
|
* Gets or sets the GUI 2D content used to display the button's facade
|
5175
5196
|
*/
|
5176
5197
|
get content(): Control;
|
5177
5198
|
set content(value: Control);
|
5199
|
+
protected _setFacadeTextureScaling(): void;
|
5178
5200
|
/**
|
5179
5201
|
* Gets or sets the texture resolution used to render content (512 by default)
|
5180
5202
|
*/
|
@@ -13444,17 +13466,37 @@ declare module BABYLON.GUI {
|
|
13444
13466
|
}
|
13445
13467
|
|
13446
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
|
+
}
|
13447
13486
|
/**
|
13448
13487
|
* Class used to create a button in 3D
|
13449
13488
|
*/
|
13450
13489
|
export class Button3D extends AbstractButton3D {
|
13451
13490
|
/** @internal */
|
13452
13491
|
protected _currentMaterial: BABYLON.Material;
|
13492
|
+
protected _options: IButton3DCreationOptions;
|
13493
|
+
protected _height: number;
|
13494
|
+
protected _depth: number;
|
13453
13495
|
/**
|
13454
13496
|
* Creates a new button
|
13455
13497
|
* @param name defines the control name
|
13456
13498
|
*/
|
13457
|
-
constructor(name?: string);
|
13499
|
+
constructor(name?: string, options?: IButton3DCreationOptions);
|
13458
13500
|
/**
|
13459
13501
|
* Apply the facade texture (created from the content property).
|
13460
13502
|
* @param facadeTexture defines the AdvancedDynamicTexture to use
|
@@ -13548,11 +13590,13 @@ declare module BABYLON.GUI {
|
|
13548
13590
|
private _facadeTexture;
|
13549
13591
|
protected _contentResolution: number;
|
13550
13592
|
protected _contentScaleRatio: number;
|
13593
|
+
protected _contentScaleRatioY?: number;
|
13551
13594
|
/**
|
13552
13595
|
* Gets or sets the GUI 2D content used to display the button's facade
|
13553
13596
|
*/
|
13554
13597
|
get content(): Control;
|
13555
13598
|
set content(value: Control);
|
13599
|
+
protected _setFacadeTextureScaling(): void;
|
13556
13600
|
/**
|
13557
13601
|
* Gets or sets the texture resolution used to render content (512 by default)
|
13558
13602
|
*/
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "babylonjs-gui",
|
3
|
-
"version": "5.
|
3
|
+
"version": "5.53.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.
|
17
|
+
"babylonjs": "^5.53.0"
|
18
18
|
},
|
19
19
|
"devDependencies": {
|
20
20
|
"@dev/build-tools": "1.0.0",
|