babylonjs-gui 5.44.0 → 5.45.1
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 +17 -3
- package/babylon.gui.js +38 -0
- 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 +36 -8
- package/package.json +2 -2
package/babylon.gui.module.d.ts
CHANGED
@@ -81,6 +81,8 @@ export class AdvancedDynamicTexture extends DynamicTexture {
|
|
81
81
|
static AllowGPUOptimizations: boolean;
|
82
82
|
/** Snippet ID if the content was created from the snippet server */
|
83
83
|
snippetId: string;
|
84
|
+
/** Observable that fires when the GUI is ready */
|
85
|
+
onGuiReadyObservable: Observable<AdvancedDynamicTexture>;
|
84
86
|
private _isDirty;
|
85
87
|
private _renderObserver;
|
86
88
|
private _resizeObserver;
|
@@ -543,6 +545,11 @@ export class AdvancedDynamicTexture extends DynamicTexture {
|
|
543
545
|
* @param height the new height
|
544
546
|
*/
|
545
547
|
scaleTo(width: number, height: number): void;
|
548
|
+
private _checkGuiIsReady;
|
549
|
+
/**
|
550
|
+
* Returns true if all the GUI components are ready to render
|
551
|
+
*/
|
552
|
+
guiIsReady(): boolean;
|
546
553
|
}
|
547
554
|
|
548
555
|
}
|
@@ -613,7 +620,7 @@ export class Button extends Rectangle {
|
|
613
620
|
* @internal
|
614
621
|
*/
|
615
622
|
_onPointerDown(target: Control, coordinates: Vector2, pointerId: number, buttonIndex: number, pi: PointerInfoBase): boolean;
|
616
|
-
protected _getRectangleFill(context: ICanvasRenderingContext): string |
|
623
|
+
protected _getRectangleFill(context: ICanvasRenderingContext): string | CanvasGradient;
|
617
624
|
/**
|
618
625
|
* @internal
|
619
626
|
*/
|
@@ -826,7 +833,7 @@ import { Control } from "babylonjs-gui/2D/controls/control";
|
|
826
833
|
import { Measure } from "babylonjs-gui/2D/measure";
|
827
834
|
import { AdvancedDynamicTexture } from "babylonjs-gui/2D/advancedDynamicTexture";
|
828
835
|
import { PointerInfoBase } from "babylonjs/Events/pointerEvents";
|
829
|
-
import {
|
836
|
+
import { ICanvasRenderingContext } from "babylonjs/Engines/ICanvas";
|
830
837
|
import { DynamicTexture } from "babylonjs/Materials/Textures/dynamicTexture";
|
831
838
|
import { Observable } from "babylonjs/Misc/observable";
|
832
839
|
import { BaseGradient } from "babylonjs-gui/2D/controls/gradient/BaseGradient";
|
@@ -944,7 +951,7 @@ export class Container extends Control {
|
|
944
951
|
_offsetTop(offset: number): void;
|
945
952
|
/** @internal */
|
946
953
|
_markAllAsDirty(): void;
|
947
|
-
protected _getBackgroundColor(context: ICanvasRenderingContext): string |
|
954
|
+
protected _getBackgroundColor(context: ICanvasRenderingContext): string | CanvasGradient;
|
948
955
|
/**
|
949
956
|
* @internal
|
950
957
|
*/
|
@@ -988,6 +995,7 @@ export class Container extends Control {
|
|
988
995
|
* @internal
|
989
996
|
*/
|
990
997
|
_parseFromContent(serializedObject: any, host: AdvancedDynamicTexture): void;
|
998
|
+
isReady(): boolean;
|
991
999
|
}
|
992
1000
|
|
993
1001
|
}
|
@@ -1828,6 +1836,11 @@ export class Control implements IAnimatable {
|
|
1828
1836
|
* @internal
|
1829
1837
|
*/
|
1830
1838
|
protected static drawEllipse(x: number, y: number, width: number, height: number, context: ICanvasRenderingContext): void;
|
1839
|
+
/**
|
1840
|
+
* Returns true if the control is ready to be used
|
1841
|
+
* @returns
|
1842
|
+
*/
|
1843
|
+
isReady(): boolean;
|
1831
1844
|
}
|
1832
1845
|
|
1833
1846
|
}
|
@@ -2374,6 +2387,7 @@ export class Image extends Control {
|
|
2374
2387
|
* Gets a boolean indicating that the content is loaded
|
2375
2388
|
*/
|
2376
2389
|
get isLoaded(): boolean;
|
2390
|
+
isReady(): boolean;
|
2377
2391
|
/**
|
2378
2392
|
* Gets or sets a boolean indicating if pointers should only be validated on pixels with alpha > 0.
|
2379
2393
|
* Beware using this as this will consume more memory as the image has to be stored twice
|
@@ -3160,7 +3174,7 @@ export class RadioButton extends Control {
|
|
3160
3174
|
declare module "babylonjs-gui/2D/controls/rectangle" {
|
3161
3175
|
import { Container } from "babylonjs-gui/2D/controls/container";
|
3162
3176
|
import { Measure } from "babylonjs-gui/2D/measure";
|
3163
|
-
import {
|
3177
|
+
import { ICanvasRenderingContext } from "babylonjs/Engines/ICanvas";
|
3164
3178
|
/** Class used to create rectangle container */
|
3165
3179
|
export class Rectangle extends Container {
|
3166
3180
|
name?: string | undefined;
|
@@ -3182,7 +3196,7 @@ export class Rectangle extends Container {
|
|
3182
3196
|
protected _computeAdditionnalOffsetX(): 1 | 0;
|
3183
3197
|
/** @internal */
|
3184
3198
|
protected _computeAdditionnalOffsetY(): 1 | 0;
|
3185
|
-
protected _getRectangleFill(context: ICanvasRenderingContext): string |
|
3199
|
+
protected _getRectangleFill(context: ICanvasRenderingContext): string | CanvasGradient;
|
3186
3200
|
protected _localDraw(context: ICanvasRenderingContext): void;
|
3187
3201
|
protected _additionalProcessing(parentMeasure: Measure, context: ICanvasRenderingContext): void;
|
3188
3202
|
private _drawRoundedRect;
|
@@ -8762,6 +8776,8 @@ declare module BABYLON.GUI {
|
|
8762
8776
|
static AllowGPUOptimizations: boolean;
|
8763
8777
|
/** Snippet ID if the content was created from the snippet server */
|
8764
8778
|
snippetId: string;
|
8779
|
+
/** BABYLON.Observable that fires when the GUI is ready */
|
8780
|
+
onGuiReadyObservable: BABYLON.Observable<AdvancedDynamicTexture>;
|
8765
8781
|
private _isDirty;
|
8766
8782
|
private _renderObserver;
|
8767
8783
|
private _resizeObserver;
|
@@ -9224,6 +9240,11 @@ declare module BABYLON.GUI {
|
|
9224
9240
|
* @param height the new height
|
9225
9241
|
*/
|
9226
9242
|
scaleTo(width: number, height: number): void;
|
9243
|
+
private _checkGuiIsReady;
|
9244
|
+
/**
|
9245
|
+
* Returns true if all the GUI components are ready to render
|
9246
|
+
*/
|
9247
|
+
guiIsReady(): boolean;
|
9227
9248
|
}
|
9228
9249
|
|
9229
9250
|
|
@@ -9284,7 +9305,7 @@ declare module BABYLON.GUI {
|
|
9284
9305
|
* @internal
|
9285
9306
|
*/
|
9286
9307
|
_onPointerDown(target: Control, coordinates: BABYLON.Vector2, pointerId: number, buttonIndex: number, pi: BABYLON.PointerInfoBase): boolean;
|
9287
|
-
protected _getRectangleFill(context: BABYLON.ICanvasRenderingContext): string |
|
9308
|
+
protected _getRectangleFill(context: BABYLON.ICanvasRenderingContext): string | CanvasGradient;
|
9288
9309
|
/**
|
9289
9310
|
* @internal
|
9290
9311
|
*/
|
@@ -9589,7 +9610,7 @@ declare module BABYLON.GUI {
|
|
9589
9610
|
_offsetTop(offset: number): void;
|
9590
9611
|
/** @internal */
|
9591
9612
|
_markAllAsDirty(): void;
|
9592
|
-
protected _getBackgroundColor(context: BABYLON.ICanvasRenderingContext): string |
|
9613
|
+
protected _getBackgroundColor(context: BABYLON.ICanvasRenderingContext): string | CanvasGradient;
|
9593
9614
|
/**
|
9594
9615
|
* @internal
|
9595
9616
|
*/
|
@@ -9633,6 +9654,7 @@ declare module BABYLON.GUI {
|
|
9633
9654
|
* @internal
|
9634
9655
|
*/
|
9635
9656
|
_parseFromContent(serializedObject: any, host: AdvancedDynamicTexture): void;
|
9657
|
+
isReady(): boolean;
|
9636
9658
|
}
|
9637
9659
|
|
9638
9660
|
|
@@ -10455,6 +10477,11 @@ declare module BABYLON.GUI {
|
|
10455
10477
|
* @internal
|
10456
10478
|
*/
|
10457
10479
|
protected static drawEllipse(x: number, y: number, width: number, height: number, context: BABYLON.ICanvasRenderingContext): void;
|
10480
|
+
/**
|
10481
|
+
* Returns true if the control is ready to be used
|
10482
|
+
* @returns
|
10483
|
+
*/
|
10484
|
+
isReady(): boolean;
|
10458
10485
|
}
|
10459
10486
|
|
10460
10487
|
|
@@ -10959,6 +10986,7 @@ declare module BABYLON.GUI {
|
|
10959
10986
|
* Gets a boolean indicating that the content is loaded
|
10960
10987
|
*/
|
10961
10988
|
get isLoaded(): boolean;
|
10989
|
+
isReady(): boolean;
|
10962
10990
|
/**
|
10963
10991
|
* Gets or sets a boolean indicating if pointers should only be validated on pixels with alpha > 0.
|
10964
10992
|
* Beware using this as this will consume more memory as the image has to be stored twice
|
@@ -11681,7 +11709,7 @@ declare module BABYLON.GUI {
|
|
11681
11709
|
protected _computeAdditionnalOffsetX(): 1 | 0;
|
11682
11710
|
/** @internal */
|
11683
11711
|
protected _computeAdditionnalOffsetY(): 1 | 0;
|
11684
|
-
protected _getRectangleFill(context: BABYLON.ICanvasRenderingContext): string |
|
11712
|
+
protected _getRectangleFill(context: BABYLON.ICanvasRenderingContext): string | CanvasGradient;
|
11685
11713
|
protected _localDraw(context: BABYLON.ICanvasRenderingContext): void;
|
11686
11714
|
protected _additionalProcessing(parentMeasure: Measure, context: BABYLON.ICanvasRenderingContext): void;
|
11687
11715
|
private _drawRoundedRect;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "babylonjs-gui",
|
3
|
-
"version": "5.
|
3
|
+
"version": "5.45.1",
|
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.45.1"
|
18
18
|
},
|
19
19
|
"devDependencies": {
|
20
20
|
"@dev/build-tools": "1.0.0",
|