babylonjs-gui 9.23.0 → 9.26.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 +142 -4
- package/babylon.gui.es5.js +4471 -4285
- package/babylon.gui.js +1 -1
- 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 +292 -8
- package/package.json +3 -3
package/babylon.gui.d.ts
CHANGED
|
@@ -3758,9 +3758,11 @@ declare namespace BABYLON.GUI {
|
|
|
3758
3758
|
* Gets value as pixel
|
|
3759
3759
|
* @param host defines the root host
|
|
3760
3760
|
* @param refValue defines the reference value for percentages
|
|
3761
|
+
* @param fontSize defines the computed font size in pixels for em units
|
|
3762
|
+
* @param rootFontSize defines the computed root font size in pixels for rem units
|
|
3761
3763
|
* @returns the value as pixel
|
|
3762
3764
|
*/
|
|
3763
|
-
getValueInPixel(host: AdvancedDynamicTexture, refValue: number): number;
|
|
3765
|
+
getValueInPixel(host: AdvancedDynamicTexture, refValue: number, fontSize?: number, rootFontSize?: number): number;
|
|
3764
3766
|
/**
|
|
3765
3767
|
* Update the current value and unit.
|
|
3766
3768
|
* @param value defines the value to store
|
|
@@ -3770,10 +3772,12 @@ declare namespace BABYLON.GUI {
|
|
|
3770
3772
|
updateInPlace(value: number, unit?: number): ValueAndUnit;
|
|
3771
3773
|
/**
|
|
3772
3774
|
* Gets the value accordingly to its unit
|
|
3773
|
-
* @param host
|
|
3775
|
+
* @param host defines the root host
|
|
3776
|
+
* @param fontSize defines the computed font size in pixels for em units
|
|
3777
|
+
* @param rootFontSize defines the computed root font size in pixels for rem units
|
|
3774
3778
|
* @returns the value
|
|
3775
3779
|
*/
|
|
3776
|
-
getValue(host: AdvancedDynamicTexture): number;
|
|
3780
|
+
getValue(host: AdvancedDynamicTexture, fontSize?: number, rootFontSize?: number): number;
|
|
3777
3781
|
/**
|
|
3778
3782
|
* Gets a string representation of the value
|
|
3779
3783
|
* @param host defines the root host
|
|
@@ -3790,6 +3794,14 @@ declare namespace BABYLON.GUI {
|
|
|
3790
3794
|
private static _Regex;
|
|
3791
3795
|
private static _UNITMODE_PERCENTAGE;
|
|
3792
3796
|
private static _UNITMODE_PIXEL;
|
|
3797
|
+
/**
|
|
3798
|
+
* Font-relative units, resolved against the control's computed font size.
|
|
3799
|
+
*/
|
|
3800
|
+
static readonly UNITMODE_EM = 2;
|
|
3801
|
+
/**
|
|
3802
|
+
* Root-relative units, resolved against the GUI root container's computed font size.
|
|
3803
|
+
*/
|
|
3804
|
+
static readonly UNITMODE_REM = 3;
|
|
3793
3805
|
/** UNITMODE_PERCENTAGE */
|
|
3794
3806
|
static get UNITMODE_PERCENTAGE(): number;
|
|
3795
3807
|
/** UNITMODE_PIXEL */
|
|
@@ -6578,6 +6590,98 @@ declare namespace BABYLON.GUI {
|
|
|
6578
6590
|
*/
|
|
6579
6591
|
|
|
6580
6592
|
|
|
6593
|
+
/**
|
|
6594
|
+
* Main-axis direction and ordering of a FlexPanel.
|
|
6595
|
+
*/
|
|
6596
|
+
export type FlexDirection = "row" | "row-reverse" | "column" | "column-reverse";
|
|
6597
|
+
/**
|
|
6598
|
+
* Whether overflowing items form additional lines, and their cross-axis order.
|
|
6599
|
+
*/
|
|
6600
|
+
export type FlexWrap = "nowrap" | "wrap" | "wrap-reverse";
|
|
6601
|
+
/**
|
|
6602
|
+
* Distribution of spare space along the main axis.
|
|
6603
|
+
*/
|
|
6604
|
+
export type FlexJustification = "flex-start" | "flex-end" | "center" | "space-between" | "space-around" | "space-evenly";
|
|
6605
|
+
/**
|
|
6606
|
+
* Alignment of items within each line. Stretch fills the line's cross-axis size.
|
|
6607
|
+
*/
|
|
6608
|
+
export type FlexAlignment = "flex-start" | "flex-end" | "center" | "stretch";
|
|
6609
|
+
/**
|
|
6610
|
+
* Distribution of lines along the cross axis.
|
|
6611
|
+
*/
|
|
6612
|
+
export type FlexContentAlignment = FlexJustification | "stretch";
|
|
6613
|
+
/**
|
|
6614
|
+
* Arranges controls in flexible rows or columns using their declared width/height as the basis.
|
|
6615
|
+
* Supports wrapping, gaps, alignment and Control.flexGrow/flexShrink without rewriting child properties.
|
|
6616
|
+
* The panel uses its declared size; intrinsic CSS sizing and baseline alignment are not supported.
|
|
6617
|
+
*/
|
|
6618
|
+
export class FlexPanel extends Container {
|
|
6619
|
+
private _items;
|
|
6620
|
+
private _lines;
|
|
6621
|
+
private _boxes;
|
|
6622
|
+
private _gap;
|
|
6623
|
+
private _flexDirection;
|
|
6624
|
+
/**
|
|
6625
|
+
* Gets or sets the main axis and item direction. Defaults to row.
|
|
6626
|
+
*/
|
|
6627
|
+
get flexDirection(): FlexDirection;
|
|
6628
|
+
set flexDirection(value: FlexDirection);
|
|
6629
|
+
private _flexWrap;
|
|
6630
|
+
/**
|
|
6631
|
+
* Gets or sets line wrapping. Defaults to nowrap.
|
|
6632
|
+
*/
|
|
6633
|
+
get flexWrap(): FlexWrap;
|
|
6634
|
+
set flexWrap(value: FlexWrap);
|
|
6635
|
+
private _justifyContent;
|
|
6636
|
+
/**
|
|
6637
|
+
* Gets or sets the distribution of remaining main-axis space after flexing.
|
|
6638
|
+
*/
|
|
6639
|
+
get justifyContent(): FlexJustification;
|
|
6640
|
+
set justifyContent(value: FlexJustification);
|
|
6641
|
+
private _alignItems;
|
|
6642
|
+
/**
|
|
6643
|
+
* Gets or sets cross-axis alignment within each line. Stretch fills the line.
|
|
6644
|
+
*/
|
|
6645
|
+
get alignItems(): FlexAlignment;
|
|
6646
|
+
set alignItems(value: FlexAlignment);
|
|
6647
|
+
private _alignContent;
|
|
6648
|
+
/**
|
|
6649
|
+
* Gets or sets cross-axis line distribution when wrapping is enabled.
|
|
6650
|
+
*/
|
|
6651
|
+
get alignContent(): FlexContentAlignment;
|
|
6652
|
+
set alignContent(value: FlexContentAlignment);
|
|
6653
|
+
/**
|
|
6654
|
+
* Gets or sets the gap between items and lines in px, em, rem, or percent of the main-axis size.
|
|
6655
|
+
*/
|
|
6656
|
+
get gap(): string | number;
|
|
6657
|
+
set gap(value: string | number);
|
|
6658
|
+
/**
|
|
6659
|
+
* Creates a flex layout container.
|
|
6660
|
+
* @param name defines the control name
|
|
6661
|
+
*/
|
|
6662
|
+
constructor(name?: string);
|
|
6663
|
+
protected _getTypeName(): string;
|
|
6664
|
+
/**
|
|
6665
|
+
* Removes a control and releases its cached layout data.
|
|
6666
|
+
* @param control defines the control to remove
|
|
6667
|
+
* @returns the current panel
|
|
6668
|
+
*/
|
|
6669
|
+
removeControl(control: Control): FlexPanel;
|
|
6670
|
+
/** @internal */
|
|
6671
|
+
_getLayoutMeasureForChild(child: Control): Measure | null;
|
|
6672
|
+
private _spacing;
|
|
6673
|
+
private _offset;
|
|
6674
|
+
private _resolveFlexibleLengths;
|
|
6675
|
+
protected _beforeChildLayout(): void;
|
|
6676
|
+
}
|
|
6677
|
+
/**
|
|
6678
|
+
* Registers FlexPanel for serialization. Safe to call repeatedly.
|
|
6679
|
+
*/
|
|
6680
|
+
export function RegisterFlexPanel(): void;
|
|
6681
|
+
|
|
6682
|
+
|
|
6683
|
+
|
|
6684
|
+
|
|
6581
6685
|
/** Class used to create 2D ellipse containers */
|
|
6582
6686
|
export class Ellipse extends Container {
|
|
6583
6687
|
name?: string | undefined;
|
|
@@ -6702,6 +6806,7 @@ declare namespace BABYLON.GUI {
|
|
|
6702
6806
|
private _fontFamily;
|
|
6703
6807
|
private _fontStyle;
|
|
6704
6808
|
private _fontWeight;
|
|
6809
|
+
private static readonly _DefaultFontSize;
|
|
6705
6810
|
private _fontSize;
|
|
6706
6811
|
private _font;
|
|
6707
6812
|
/** @internal */
|
|
@@ -7065,7 +7170,11 @@ declare namespace BABYLON.GUI {
|
|
|
7065
7170
|
/** Gets or sets font size in pixels */
|
|
7066
7171
|
get fontSizeInPixels(): number;
|
|
7067
7172
|
set fontSizeInPixels(value: number);
|
|
7068
|
-
/**
|
|
7173
|
+
/**
|
|
7174
|
+
* Gets or sets the font size in px, percent of parent height, em, or rem.
|
|
7175
|
+
* For font declarations, em uses the parent font and rem uses the GUI root font.
|
|
7176
|
+
* Relative font sizes on the root use the default 18px font, including adaptive scaling.
|
|
7177
|
+
*/
|
|
7069
7178
|
get fontSize(): string | number;
|
|
7070
7179
|
set fontSize(value: string | number);
|
|
7071
7180
|
/** Gets or sets foreground color */
|
|
@@ -7273,6 +7382,18 @@ declare namespace BABYLON.GUI {
|
|
|
7273
7382
|
* @param evt Defines the KeyboardEvent
|
|
7274
7383
|
*/
|
|
7275
7384
|
processKeyboard(evt: BABYLON.IKeyboardEvent): void;
|
|
7385
|
+
private _flexGrow;
|
|
7386
|
+
/**
|
|
7387
|
+
* Gets or sets the nonnegative share of free main-axis space in a FlexPanel.
|
|
7388
|
+
*/
|
|
7389
|
+
get flexGrow(): number;
|
|
7390
|
+
set flexGrow(value: number);
|
|
7391
|
+
private _flexShrink;
|
|
7392
|
+
/**
|
|
7393
|
+
* Gets or sets the nonnegative shrink factor in a FlexPanel, weighted by the declared main-axis size.
|
|
7394
|
+
*/
|
|
7395
|
+
get flexShrink(): number;
|
|
7396
|
+
set flexShrink(value: number);
|
|
7276
7397
|
/**
|
|
7277
7398
|
* Creates a new control
|
|
7278
7399
|
* @param name defines the name of the control
|
|
@@ -7433,6 +7554,14 @@ declare namespace BABYLON.GUI {
|
|
|
7433
7554
|
*/
|
|
7434
7555
|
protected _processMeasures(parentMeasure: Measure, context: BABYLON.ICanvasRenderingContext): void;
|
|
7435
7556
|
protected _evaluateClippingState(parentMeasure: Measure): void;
|
|
7557
|
+
/**
|
|
7558
|
+
* Resolves a GUI dimension using this control's computed font size.
|
|
7559
|
+
* @param value defines the dimension to resolve
|
|
7560
|
+
* @param reference defines the reference size for percentages
|
|
7561
|
+
* @returns the dimension in pixels
|
|
7562
|
+
* @internal
|
|
7563
|
+
*/
|
|
7564
|
+
_getValueInPixel(value: ValueAndUnit, reference: number): number;
|
|
7436
7565
|
/** @internal */
|
|
7437
7566
|
_measure(): void;
|
|
7438
7567
|
/**
|
|
@@ -7753,6 +7882,15 @@ declare namespace BABYLON.GUI {
|
|
|
7753
7882
|
* @internal
|
|
7754
7883
|
*/
|
|
7755
7884
|
_layout(parentMeasure: Measure, context: BABYLON.ICanvasRenderingContext): boolean;
|
|
7885
|
+
/** @internal */
|
|
7886
|
+
protected _beforeChildLayout(): void;
|
|
7887
|
+
/**
|
|
7888
|
+
* Gets an optional parent-controlled layout box, relative to the content origin.
|
|
7889
|
+
* @param _child defines the child to lay out
|
|
7890
|
+
* @returns the layout box, or null for the child's own layout
|
|
7891
|
+
* @internal
|
|
7892
|
+
*/
|
|
7893
|
+
_getLayoutMeasureForChild(_child: Control): BABYLON.Nullable<Measure>;
|
|
7756
7894
|
protected _postMeasure(): void;
|
|
7757
7895
|
private _inverseTransformMatrix;
|
|
7758
7896
|
private _inverseMeasure;
|