babylonjs-gui 7.32.0 → 7.32.3
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 +95 -9
- package/babylon.gui.js +252 -28
- package/babylon.gui.min.js +1 -1
- package/babylon.gui.min.js.map +1 -1
- package/babylon.gui.module.d.ts +206 -18
- package/package.json +2 -2
package/babylon.gui.module.d.ts
CHANGED
@@ -4279,6 +4279,8 @@ export * from "babylonjs-gui/2D/adtInstrumentation";
|
|
4279
4279
|
export * from "babylonjs-gui/2D/math2D";
|
4280
4280
|
export * from "babylonjs-gui/2D/measure";
|
4281
4281
|
export * from "babylonjs-gui/2D/multiLinePoint";
|
4282
|
+
export * from "babylonjs-gui/2D/FrameGraph/guiTask";
|
4283
|
+
export * from "babylonjs-gui/2D/FrameGraph/renderGraphGUIBlock";
|
4282
4284
|
export * from "babylonjs-gui/2D/style";
|
4283
4285
|
export * from "babylonjs-gui/2D/valueAndUnit";
|
4284
4286
|
export * from "babylonjs-gui/2D/xmlLoader";
|
@@ -4291,6 +4293,8 @@ import { Matrix } from "babylonjs/Maths/math.vector";
|
|
4291
4293
|
import { Vector2, Vector3 } from "babylonjs/Maths/math.vector";
|
4292
4294
|
import { PointerInfoPre } from "babylonjs/Events/pointerEvents";
|
4293
4295
|
import { ClipboardInfo } from "babylonjs/Events/clipboardEvents";
|
4296
|
+
import { Camera } from "babylonjs/Cameras/camera";
|
4297
|
+
import { IDynamicTextureOptions } from "babylonjs/Materials/Textures/dynamicTexture";
|
4294
4298
|
import { DynamicTexture } from "babylonjs/Materials/Textures/dynamicTexture";
|
4295
4299
|
import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
|
4296
4300
|
import { Layer } from "babylonjs/Layers/layer";
|
@@ -4299,6 +4303,18 @@ import { Container } from "babylonjs-gui/2D/controls/container";
|
|
4299
4303
|
import { Control } from "babylonjs-gui/2D/controls/control";
|
4300
4304
|
import { Style } from "babylonjs-gui/2D/style";
|
4301
4305
|
import { Viewport } from "babylonjs/Maths/math.viewport";
|
4306
|
+
/**
|
4307
|
+
* Interface used to define options to create an AdvancedDynamicTexture
|
4308
|
+
*/
|
4309
|
+
export interface IAdvancedDynamicTextureOptions extends IDynamicTextureOptions {
|
4310
|
+
/**
|
4311
|
+
* Indicates whether the ADT will be used autonomously. In this mode:
|
4312
|
+
* - _checkUpdate() is not called
|
4313
|
+
* - the layer is not rendered (so, the ADT is not visible)
|
4314
|
+
* It's up to the user to perform the required calls manually to update the ADT.
|
4315
|
+
*/
|
4316
|
+
useStandalone?: boolean;
|
4317
|
+
}
|
4302
4318
|
/**
|
4303
4319
|
* Class used to create texture to support 2D GUI elements
|
4304
4320
|
* @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui
|
@@ -4308,6 +4324,8 @@ export class AdvancedDynamicTexture extends DynamicTexture {
|
|
4308
4324
|
static SnippetUrl: string;
|
4309
4325
|
/** Indicates if some optimizations can be performed in GUI GPU management (the downside is additional memory/GPU texture memory used) */
|
4310
4326
|
static AllowGPUOptimizations: boolean;
|
4327
|
+
/** Indicates whether the ADT is used autonomously */
|
4328
|
+
readonly useStandalone: boolean;
|
4311
4329
|
/** Snippet ID if the content was created from the snippet server */
|
4312
4330
|
snippetId: string;
|
4313
4331
|
/** Observable that fires when the GUI is ready */
|
@@ -4412,6 +4430,10 @@ export class AdvancedDynamicTexture extends DynamicTexture {
|
|
4412
4430
|
* Defaults to false.
|
4413
4431
|
*/
|
4414
4432
|
disableTabNavigation: boolean;
|
4433
|
+
/**
|
4434
|
+
* A boolean indicating whether controls can be picked/clicked on or not. Defaults to false.
|
4435
|
+
*/
|
4436
|
+
disablePicking: boolean;
|
4415
4437
|
/**
|
4416
4438
|
* If set to true, the POINTERTAP event type will be used for "click", instead of POINTERUP
|
4417
4439
|
*/
|
@@ -4521,13 +4543,9 @@ export class AdvancedDynamicTexture extends DynamicTexture {
|
|
4521
4543
|
/**
|
4522
4544
|
* Creates a new AdvancedDynamicTexture
|
4523
4545
|
* @param name defines the name of the texture
|
4524
|
-
* @param
|
4525
|
-
* @param height defines the height of the texture
|
4526
|
-
* @param scene defines the hosting scene
|
4527
|
-
* @param generateMipMaps defines a boolean indicating if mipmaps must be generated (false by default)
|
4528
|
-
* @param samplingMode defines the texture sampling mode (Texture.NEAREST_SAMPLINGMODE by default)
|
4529
|
-
* @param invertY defines if the texture needs to be inverted on the y axis during loading (true by default)
|
4546
|
+
* @param options The options to be used when constructing the ADT
|
4530
4547
|
*/
|
4548
|
+
constructor(name: string, options?: IAdvancedDynamicTextureOptions);
|
4531
4549
|
constructor(name: string, width?: number, height?: number, scene?: Nullable<Scene>, generateMipMaps?: boolean, samplingMode?: number, invertY?: boolean);
|
4532
4550
|
/**
|
4533
4551
|
* Get the current class name of the texture useful for serialization or dynamic coding.
|
@@ -4606,7 +4624,8 @@ export class AdvancedDynamicTexture extends DynamicTexture {
|
|
4606
4624
|
* @returns the projected position with Z
|
4607
4625
|
*/
|
4608
4626
|
getProjectedPositionWithZ(position: Vector3, worldMatrix: Matrix): Vector3;
|
4609
|
-
|
4627
|
+
/** @internal */
|
4628
|
+
_checkUpdate(camera: Nullable<Camera>, skipUpdate?: boolean): void;
|
4610
4629
|
private _clearMeasure;
|
4611
4630
|
private _render;
|
4612
4631
|
/**
|
@@ -4784,12 +4803,12 @@ export class AdvancedDynamicTexture extends DynamicTexture {
|
|
4784
4803
|
* LayerMask is set through advancedTexture.layer.layerMask
|
4785
4804
|
* @param name defines name for the texture
|
4786
4805
|
* @param foreground defines a boolean indicating if the texture must be rendered in foreground (default is true)
|
4787
|
-
* @param
|
4806
|
+
* @param sceneOrOptions defines the hosting scene or options (IAdvancedDynamicTextureOptions)
|
4788
4807
|
* @param sampling defines the texture sampling mode (Texture.BILINEAR_SAMPLINGMODE by default)
|
4789
4808
|
* @param adaptiveScaling defines whether to automatically scale root to match hardwarescaling (false by default)
|
4790
4809
|
* @returns a new AdvancedDynamicTexture
|
4791
4810
|
*/
|
4792
|
-
static CreateFullscreenUI(name: string, foreground?: boolean,
|
4811
|
+
static CreateFullscreenUI(name: string, foreground?: boolean, sceneOrOptions?: Nullable<Scene> | IAdvancedDynamicTextureOptions, sampling?: number, adaptiveScaling?: boolean): AdvancedDynamicTexture;
|
4793
4812
|
/**
|
4794
4813
|
* Scales the texture
|
4795
4814
|
* @param ratio the scale factor to apply to both width and height
|
@@ -8909,6 +8928,89 @@ export abstract class BaseGradient {
|
|
8909
8928
|
parse(serializationObject: any): void;
|
8910
8929
|
}
|
8911
8930
|
|
8931
|
+
}
|
8932
|
+
declare module "babylonjs-gui/2D/FrameGraph/renderGraphGUIBlock" {
|
8933
|
+
import { NodeRenderGraphBlock } from "babylonjs/FrameGraph/Node/nodeRenderGraphBlock";
|
8934
|
+
import { AdvancedDynamicTexture } from "babylonjs-gui/2D/advancedDynamicTexture";
|
8935
|
+
import { Scene } from "babylonjs/scene";
|
8936
|
+
import { NodeRenderGraphConnectionPoint } from "babylonjs/FrameGraph/Node/nodeRenderGraphBlockConnectionPoint";
|
8937
|
+
import { NodeRenderGraphBuildState } from "babylonjs/FrameGraph/Node/nodeRenderGraphBuildState";
|
8938
|
+
import { FrameGraphGUITask } from "babylonjs-gui/2D/FrameGraph/guiTask";
|
8939
|
+
import { FrameGraph } from "babylonjs/FrameGraph/frameGraph";
|
8940
|
+
/**
|
8941
|
+
* Block that implements a fullscreen GUI for render graph
|
8942
|
+
*/
|
8943
|
+
export class NodeRenderGraphGUIBlock extends NodeRenderGraphBlock {
|
8944
|
+
protected _frameGraphTask: FrameGraphGUITask;
|
8945
|
+
protected _gui: AdvancedDynamicTexture;
|
8946
|
+
/**
|
8947
|
+
* Gets the frame graph task associated with this block
|
8948
|
+
*/
|
8949
|
+
get task(): FrameGraphGUITask;
|
8950
|
+
/**
|
8951
|
+
* Gets the GUI texture used by this block
|
8952
|
+
*/
|
8953
|
+
get gui(): AdvancedDynamicTexture;
|
8954
|
+
/**
|
8955
|
+
* Create a new NodeRenderGraphGUIBlock
|
8956
|
+
* @param name defines the block name
|
8957
|
+
* @param frameGraph defines the hosting frame graph
|
8958
|
+
* @param scene defines the hosting scene
|
8959
|
+
*/
|
8960
|
+
constructor(name: string, frameGraph: FrameGraph, scene: Scene);
|
8961
|
+
/**
|
8962
|
+
* Gets the current class name
|
8963
|
+
* @returns the class name
|
8964
|
+
*/
|
8965
|
+
getClassName(): string;
|
8966
|
+
/**
|
8967
|
+
* Gets the destination input component
|
8968
|
+
*/
|
8969
|
+
get destination(): NodeRenderGraphConnectionPoint;
|
8970
|
+
/**
|
8971
|
+
* Gets the output component
|
8972
|
+
*/
|
8973
|
+
get output(): NodeRenderGraphConnectionPoint;
|
8974
|
+
protected _buildBlock(state: NodeRenderGraphBuildState): void;
|
8975
|
+
}
|
8976
|
+
|
8977
|
+
}
|
8978
|
+
declare module "babylonjs-gui/2D/FrameGraph/guiTask" {
|
8979
|
+
import { FrameGraphTextureHandle, FrameGraph } from "babylonjs/index";
|
8980
|
+
import { AdvancedDynamicTexture } from "babylonjs-gui/2D/advancedDynamicTexture";
|
8981
|
+
import { FrameGraphTask } from "babylonjs/FrameGraph/frameGraphTask";
|
8982
|
+
/**
|
8983
|
+
* Task that renders a GUI texture.
|
8984
|
+
*/
|
8985
|
+
export class FrameGraphGUITask extends FrameGraphTask {
|
8986
|
+
/**
|
8987
|
+
* The destination texture to render the GUI to.
|
8988
|
+
*/
|
8989
|
+
destinationTexture: FrameGraphTextureHandle;
|
8990
|
+
/**
|
8991
|
+
* The output texture of the task.
|
8992
|
+
* This is the same texture as the destination texture, but the handles are different!
|
8993
|
+
*/
|
8994
|
+
readonly outputTexture: FrameGraphTextureHandle;
|
8995
|
+
get disabled(): boolean;
|
8996
|
+
set disabled(value: boolean);
|
8997
|
+
/**
|
8998
|
+
* Gets the underlying advanced dynamic texture.
|
8999
|
+
*/
|
9000
|
+
get gui(): AdvancedDynamicTexture;
|
9001
|
+
protected _adt: AdvancedDynamicTexture;
|
9002
|
+
/**
|
9003
|
+
* Constructs a new GUI task.
|
9004
|
+
* @param name Name of the task
|
9005
|
+
* @param frameGraph Frame graph the task belongs to
|
9006
|
+
* @param adt The GUI texture. If not provided, a new fullscreen GUI will be created.
|
9007
|
+
*/
|
9008
|
+
constructor(name: string, frameGraph: FrameGraph, adt?: AdvancedDynamicTexture);
|
9009
|
+
isReady(): boolean;
|
9010
|
+
record(): void;
|
9011
|
+
dispose(): void;
|
9012
|
+
}
|
9013
|
+
|
8912
9014
|
}
|
8913
9015
|
declare module "babylonjs-gui/legacy/legacy" {
|
8914
9016
|
export * from "babylonjs-gui/index";
|
@@ -12773,6 +12875,18 @@ declare module BABYLON.GUI {
|
|
12773
12875
|
|
12774
12876
|
|
12775
12877
|
|
12878
|
+
/**
|
12879
|
+
* Interface used to define options to create an AdvancedDynamicTexture
|
12880
|
+
*/
|
12881
|
+
export interface IAdvancedDynamicTextureOptions extends BABYLON.IDynamicTextureOptions {
|
12882
|
+
/**
|
12883
|
+
* Indicates whether the ADT will be used autonomously. In this mode:
|
12884
|
+
* - _checkUpdate() is not called
|
12885
|
+
* - the layer is not rendered (so, the ADT is not visible)
|
12886
|
+
* It's up to the user to perform the required calls manually to update the ADT.
|
12887
|
+
*/
|
12888
|
+
useStandalone?: boolean;
|
12889
|
+
}
|
12776
12890
|
/**
|
12777
12891
|
* Class used to create texture to support 2D GUI elements
|
12778
12892
|
* @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui
|
@@ -12782,6 +12896,8 @@ declare module BABYLON.GUI {
|
|
12782
12896
|
static SnippetUrl: string;
|
12783
12897
|
/** Indicates if some optimizations can be performed in GUI GPU management (the downside is additional memory/GPU texture memory used) */
|
12784
12898
|
static AllowGPUOptimizations: boolean;
|
12899
|
+
/** Indicates whether the ADT is used autonomously */
|
12900
|
+
readonly useStandalone: boolean;
|
12785
12901
|
/** Snippet ID if the content was created from the snippet server */
|
12786
12902
|
snippetId: string;
|
12787
12903
|
/** BABYLON.Observable that fires when the GUI is ready */
|
@@ -12886,6 +13002,10 @@ declare module BABYLON.GUI {
|
|
12886
13002
|
* Defaults to false.
|
12887
13003
|
*/
|
12888
13004
|
disableTabNavigation: boolean;
|
13005
|
+
/**
|
13006
|
+
* A boolean indicating whether controls can be picked/clicked on or not. Defaults to false.
|
13007
|
+
*/
|
13008
|
+
disablePicking: boolean;
|
12889
13009
|
/**
|
12890
13010
|
* If set to true, the POINTERTAP event type will be used for "click", instead of POINTERUP
|
12891
13011
|
*/
|
@@ -12995,13 +13115,9 @@ declare module BABYLON.GUI {
|
|
12995
13115
|
/**
|
12996
13116
|
* Creates a new AdvancedDynamicTexture
|
12997
13117
|
* @param name defines the name of the texture
|
12998
|
-
* @param
|
12999
|
-
* @param height defines the height of the texture
|
13000
|
-
* @param scene defines the hosting scene
|
13001
|
-
* @param generateMipMaps defines a boolean indicating if mipmaps must be generated (false by default)
|
13002
|
-
* @param samplingMode defines the texture sampling mode (Texture.NEAREST_SAMPLINGMODE by default)
|
13003
|
-
* @param invertY defines if the texture needs to be inverted on the y axis during loading (true by default)
|
13118
|
+
* @param options The options to be used when constructing the ADT
|
13004
13119
|
*/
|
13120
|
+
constructor(name: string, options?: IAdvancedDynamicTextureOptions);
|
13005
13121
|
constructor(name: string, width?: number, height?: number, scene?: BABYLON.Nullable<BABYLON.Scene>, generateMipMaps?: boolean, samplingMode?: number, invertY?: boolean);
|
13006
13122
|
/**
|
13007
13123
|
* Get the current class name of the texture useful for serialization or dynamic coding.
|
@@ -13080,7 +13196,8 @@ declare module BABYLON.GUI {
|
|
13080
13196
|
* @returns the projected position with Z
|
13081
13197
|
*/
|
13082
13198
|
getProjectedPositionWithZ(position: BABYLON.Vector3, worldMatrix: BABYLON.Matrix): BABYLON.Vector3;
|
13083
|
-
|
13199
|
+
/** @internal */
|
13200
|
+
_checkUpdate(camera: BABYLON.Nullable<BABYLON.Camera>, skipUpdate?: boolean): void;
|
13084
13201
|
private _clearMeasure;
|
13085
13202
|
private _render;
|
13086
13203
|
/**
|
@@ -13258,12 +13375,12 @@ declare module BABYLON.GUI {
|
|
13258
13375
|
* LayerMask is set through advancedTexture.layer.layerMask
|
13259
13376
|
* @param name defines name for the texture
|
13260
13377
|
* @param foreground defines a boolean indicating if the texture must be rendered in foreground (default is true)
|
13261
|
-
* @param
|
13378
|
+
* @param sceneOrOptions defines the hosting scene or options (IAdvancedDynamicTextureOptions)
|
13262
13379
|
* @param sampling defines the texture sampling mode (Texture.BILINEAR_SAMPLINGMODE by default)
|
13263
13380
|
* @param adaptiveScaling defines whether to automatically scale root to match hardwarescaling (false by default)
|
13264
13381
|
* @returns a new AdvancedDynamicTexture
|
13265
13382
|
*/
|
13266
|
-
static CreateFullscreenUI(name: string, foreground?: boolean,
|
13383
|
+
static CreateFullscreenUI(name: string, foreground?: boolean, sceneOrOptions?: BABYLON.Nullable<BABYLON.Scene> | IAdvancedDynamicTextureOptions, sampling?: number, adaptiveScaling?: boolean): AdvancedDynamicTexture;
|
13267
13384
|
/**
|
13268
13385
|
* Scales the texture
|
13269
13386
|
* @param ratio the scale factor to apply to both width and height
|
@@ -17119,6 +17236,77 @@ declare module BABYLON.GUI {
|
|
17119
17236
|
}
|
17120
17237
|
|
17121
17238
|
|
17239
|
+
/**
|
17240
|
+
* Block that implements a fullscreen GUI for render graph
|
17241
|
+
*/
|
17242
|
+
export class NodeRenderGraphGUIBlock extends BABYLON.NodeRenderGraphBlock {
|
17243
|
+
protected _frameGraphTask: FrameGraphGUITask;
|
17244
|
+
protected _gui: AdvancedDynamicTexture;
|
17245
|
+
/**
|
17246
|
+
* Gets the frame graph task associated with this block
|
17247
|
+
*/
|
17248
|
+
get task(): FrameGraphGUITask;
|
17249
|
+
/**
|
17250
|
+
* Gets the GUI texture used by this block
|
17251
|
+
*/
|
17252
|
+
get gui(): AdvancedDynamicTexture;
|
17253
|
+
/**
|
17254
|
+
* Create a new NodeRenderGraphGUIBlock
|
17255
|
+
* @param name defines the block name
|
17256
|
+
* @param frameGraph defines the hosting frame graph
|
17257
|
+
* @param scene defines the hosting scene
|
17258
|
+
*/
|
17259
|
+
constructor(name: string, frameGraph: BABYLON.FrameGraph, scene: BABYLON.Scene);
|
17260
|
+
/**
|
17261
|
+
* Gets the current class name
|
17262
|
+
* @returns the class name
|
17263
|
+
*/
|
17264
|
+
getClassName(): string;
|
17265
|
+
/**
|
17266
|
+
* Gets the destination input component
|
17267
|
+
*/
|
17268
|
+
get destination(): BABYLON.NodeRenderGraphConnectionPoint;
|
17269
|
+
/**
|
17270
|
+
* Gets the output component
|
17271
|
+
*/
|
17272
|
+
get output(): BABYLON.NodeRenderGraphConnectionPoint;
|
17273
|
+
protected _buildBlock(state: BABYLON.NodeRenderGraphBuildState): void;
|
17274
|
+
}
|
17275
|
+
|
17276
|
+
|
17277
|
+
/**
|
17278
|
+
* Task that renders a GUI texture.
|
17279
|
+
*/
|
17280
|
+
export class FrameGraphGUITask extends BABYLON.FrameGraphTask {
|
17281
|
+
/**
|
17282
|
+
* The destination texture to render the GUI to.
|
17283
|
+
*/
|
17284
|
+
destinationTexture: BABYLON.FrameGraphTextureHandle;
|
17285
|
+
/**
|
17286
|
+
* The output texture of the task.
|
17287
|
+
* This is the same texture as the destination texture, but the handles are different!
|
17288
|
+
*/
|
17289
|
+
readonly outputTexture: BABYLON.FrameGraphTextureHandle;
|
17290
|
+
get disabled(): boolean;
|
17291
|
+
set disabled(value: boolean);
|
17292
|
+
/**
|
17293
|
+
* Gets the underlying advanced dynamic texture.
|
17294
|
+
*/
|
17295
|
+
get gui(): AdvancedDynamicTexture;
|
17296
|
+
protected _adt: AdvancedDynamicTexture;
|
17297
|
+
/**
|
17298
|
+
* Constructs a new GUI task.
|
17299
|
+
* @param name Name of the task
|
17300
|
+
* @param frameGraph Frame graph the task belongs to
|
17301
|
+
* @param adt The GUI texture. If not provided, a new fullscreen GUI will be created.
|
17302
|
+
*/
|
17303
|
+
constructor(name: string, frameGraph: BABYLON.FrameGraph, adt?: AdvancedDynamicTexture);
|
17304
|
+
isReady(): boolean;
|
17305
|
+
record(): void;
|
17306
|
+
dispose(): void;
|
17307
|
+
}
|
17308
|
+
|
17309
|
+
|
17122
17310
|
|
17123
17311
|
}
|
17124
17312
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "babylonjs-gui",
|
3
|
-
"version": "7.32.
|
3
|
+
"version": "7.32.3",
|
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.32.
|
18
|
+
"babylonjs": "^7.32.3"
|
19
19
|
},
|
20
20
|
"devDependencies": {
|
21
21
|
"@dev/build-tools": "1.0.0",
|