|
@@ -386,6 +386,14 @@ declare module "babylonjs-gui/2D/advancedDynamicTexture" {
|
|
|
private _renderScale;
|
|
|
private _rootElement;
|
|
|
private _cursorChanged;
|
|
|
+ /** @hidden */
|
|
|
+ _numLayoutCalls: number;
|
|
|
+ /** Gets the number of layout calls made the last time the ADT has been rendered */
|
|
|
+ get numLayoutCalls(): number;
|
|
|
+ /** @hidden */
|
|
|
+ _numRenderCalls: number;
|
|
|
+ /** Gets the number of render calls made the last time the ADT has been rendered */
|
|
|
+ get numRenderCalls(): number;
|
|
|
/**
|
|
|
* Define type to string to ensure compatibility across browsers
|
|
|
* Safari doesn't support DataTransfer constructor
|
|
@@ -455,6 +463,11 @@ declare module "babylonjs-gui/2D/advancedDynamicTexture" {
|
|
|
get renderAtIdealSize(): boolean;
|
|
|
set renderAtIdealSize(value: boolean);
|
|
|
/**
|
|
|
+ * Gets the ratio used when in "ideal mode"
|
|
|
+ * @see http://doc.babylonjs.com/how_to/gui#adaptive-scaling
|
|
|
+ * */
|
|
|
+ get idealRatio(): number;
|
|
|
+ /**
|
|
|
* Gets the underlying layer used to render the texture when in fullscreen mode
|
|
|
*/
|
|
|
get layer(): Nullable<Layer>;
|
|
@@ -731,6 +744,8 @@ declare module "babylonjs-gui/2D/controls/control" {
|
|
|
/** @hidden */
|
|
|
protected _rebuildLayout: boolean;
|
|
|
/** @hidden */
|
|
|
+ _customData: any;
|
|
|
+ /** @hidden */
|
|
|
_isClipped: boolean;
|
|
|
/** @hidden */
|
|
|
_automaticSize: boolean;
|
|
@@ -1260,7 +1275,7 @@ declare module "babylonjs-gui/2D/controls/container" {
|
|
|
export class Container extends Control {
|
|
|
name?: string | undefined;
|
|
|
/** @hidden */
|
|
|
- protected _children: Control[];
|
|
|
+ _children: Control[];
|
|
|
/** @hidden */
|
|
|
protected _measureForChildren: Measure;
|
|
|
/** @hidden */
|
|
@@ -2978,6 +2993,24 @@ declare module "babylonjs-gui/2D/controls/scrollViewers/scrollViewerWindow" {
|
|
|
export class _ScrollViewerWindow extends Container {
|
|
|
parentClientWidth: number;
|
|
|
parentClientHeight: number;
|
|
|
+ private _freezeControls;
|
|
|
+ private _parentMeasure;
|
|
|
+ private _oldLeft;
|
|
|
+ private _oldTop;
|
|
|
+ get freezeControls(): boolean;
|
|
|
+ set freezeControls(value: boolean);
|
|
|
+ private _bucketWidth;
|
|
|
+ private _bucketHeight;
|
|
|
+ private _buckets;
|
|
|
+ private _bucketLen;
|
|
|
+ get bucketWidth(): number;
|
|
|
+ get bucketHeight(): number;
|
|
|
+ setBucketSizes(width: number, height: number): void;
|
|
|
+ private _useBuckets;
|
|
|
+ private _makeBuckets;
|
|
|
+ private _dispatchInBuckets;
|
|
|
+ private _updateMeasures;
|
|
|
+ private _updateChildrenMeasures;
|
|
|
/**
|
|
|
* Creates a new ScrollViewerWindow
|
|
|
* @param name of ScrollViewerWindow
|
|
@@ -2986,6 +3019,12 @@ declare module "babylonjs-gui/2D/controls/scrollViewers/scrollViewerWindow" {
|
|
|
protected _getTypeName(): string;
|
|
|
/** @hidden */
|
|
|
protected _additionalProcessing(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
|
|
|
+ /** @hidden */
|
|
|
+ _layout(parentMeasure: Measure, context: CanvasRenderingContext2D): boolean;
|
|
|
+ private _scrollChildren;
|
|
|
+ private _scrollChildrenWithBuckets;
|
|
|
+ /** @hidden */
|
|
|
+ _draw(context: CanvasRenderingContext2D, invalidatedRectangle?: Measure): void;
|
|
|
protected _postMeasure(): void;
|
|
|
}
|
|
|
}
|
|
@@ -3107,8 +3146,6 @@ declare module "babylonjs-gui/2D/controls/scrollViewers/scrollViewer" {
|
|
|
private _barImage;
|
|
|
private _barBackgroundImage;
|
|
|
private _barSize;
|
|
|
- private _endLeft;
|
|
|
- private _endTop;
|
|
|
private _window;
|
|
|
private _pointerIsOver;
|
|
|
private _wheelPrecision;
|
|
@@ -3143,6 +3180,41 @@ declare module "babylonjs-gui/2D/controls/scrollViewers/scrollViewer" {
|
|
|
get children(): Control[];
|
|
|
_flagDescendantsAsMatrixDirty(): void;
|
|
|
/**
|
|
|
+ * Freezes or unfreezes the controls in the window.
|
|
|
+ * When controls are frozen, the scroll viewer can render a lot more quickly but updates to positions/sizes of controls
|
|
|
+ * are not taken into account. If you want to change positions/sizes, unfreeze, perform the changes then freeze again
|
|
|
+ */
|
|
|
+ get freezeControls(): boolean;
|
|
|
+ set freezeControls(value: boolean);
|
|
|
+ /** Gets the bucket width */
|
|
|
+ get bucketWidth(): number;
|
|
|
+ /** Gets the bucket height */
|
|
|
+ get bucketHeight(): number;
|
|
|
+ /**
|
|
|
+ * Sets the bucket sizes.
|
|
|
+ * When freezeControls is true, setting a non-zero bucket size will improve performances by updating only
|
|
|
+ * controls that are visible. The bucket sizes is used to subdivide (internally) the window area to smaller areas into which
|
|
|
+ * controls are dispatched. So, the size should be roughly equals to the mean size of all the controls of
|
|
|
+ * the window. To disable the usage of buckets, sets either width or height (or both) to 0.
|
|
|
+ * Please note that using this option will raise the memory usage (the higher the bucket sizes, the less memory
|
|
|
+ * used), that's why it is not enabled by default.
|
|
|
+ * @param width width of the bucket
|
|
|
+ * @param height height of the bucket
|
|
|
+ */
|
|
|
+ setBucketSizes(width: number, height: number): void;
|
|
|
+ private _forceHorizontalBar;
|
|
|
+ private _forceVerticalBar;
|
|
|
+ /**
|
|
|
+ * Forces the horizontal scroll bar to be displayed
|
|
|
+ */
|
|
|
+ get forceHorizontalBar(): boolean;
|
|
|
+ set forceHorizontalBar(value: boolean);
|
|
|
+ /**
|
|
|
+ * Forces the vertical scroll bar to be displayed
|
|
|
+ */
|
|
|
+ get forceVerticalBar(): boolean;
|
|
|
+ set forceVerticalBar(value: boolean);
|
|
|
+ /**
|
|
|
* Creates a new ScrollViewer
|
|
|
* @param name of ScrollViewer
|
|
|
*/
|
|
@@ -3186,6 +3258,7 @@ declare module "babylonjs-gui/2D/controls/scrollViewers/scrollViewer" {
|
|
|
/** Gets or sets the bar background image */
|
|
|
get barImage(): Image;
|
|
|
set barImage(value: Image);
|
|
|
+ private _setWindowPosition;
|
|
|
/** @hidden */
|
|
|
private _updateScroller;
|
|
|
_link(host: AdvancedDynamicTexture): void;
|
|
@@ -4614,6 +4687,14 @@ declare module BABYLON.GUI {
|
|
|
private _renderScale;
|
|
|
private _rootElement;
|
|
|
private _cursorChanged;
|
|
|
+ /** @hidden */
|
|
|
+ _numLayoutCalls: number;
|
|
|
+ /** Gets the number of layout calls made the last time the ADT has been rendered */
|
|
|
+ get numLayoutCalls(): number;
|
|
|
+ /** @hidden */
|
|
|
+ _numRenderCalls: number;
|
|
|
+ /** Gets the number of render calls made the last time the ADT has been rendered */
|
|
|
+ get numRenderCalls(): number;
|
|
|
/**
|
|
|
* Define type to string to ensure compatibility across browsers
|
|
|
* Safari doesn't support DataTransfer constructor
|
|
@@ -4683,6 +4764,11 @@ declare module BABYLON.GUI {
|
|
|
get renderAtIdealSize(): boolean;
|
|
|
set renderAtIdealSize(value: boolean);
|
|
|
/**
|
|
|
+ * Gets the ratio used when in "ideal mode"
|
|
|
+ * @see http://doc.babylonjs.com/how_to/gui#adaptive-scaling
|
|
|
+ * */
|
|
|
+ get idealRatio(): number;
|
|
|
+ /**
|
|
|
* Gets the underlying layer used to render the texture when in fullscreen mode
|
|
|
*/
|
|
|
get layer(): BABYLON.Nullable<BABYLON.Layer>;
|
|
@@ -4948,6 +5034,8 @@ declare module BABYLON.GUI {
|
|
|
/** @hidden */
|
|
|
protected _rebuildLayout: boolean;
|
|
|
/** @hidden */
|
|
|
+ _customData: any;
|
|
|
+ /** @hidden */
|
|
|
_isClipped: boolean;
|
|
|
/** @hidden */
|
|
|
_automaticSize: boolean;
|
|
@@ -5473,7 +5561,7 @@ declare module BABYLON.GUI {
|
|
|
export class Container extends Control {
|
|
|
name?: string | undefined;
|
|
|
/** @hidden */
|
|
|
- protected _children: Control[];
|
|
|
+ _children: Control[];
|
|
|
/** @hidden */
|
|
|
protected _measureForChildren: Measure;
|
|
|
/** @hidden */
|
|
@@ -7114,6 +7202,24 @@ declare module BABYLON.GUI {
|
|
|
export class _ScrollViewerWindow extends Container {
|
|
|
parentClientWidth: number;
|
|
|
parentClientHeight: number;
|
|
|
+ private _freezeControls;
|
|
|
+ private _parentMeasure;
|
|
|
+ private _oldLeft;
|
|
|
+ private _oldTop;
|
|
|
+ get freezeControls(): boolean;
|
|
|
+ set freezeControls(value: boolean);
|
|
|
+ private _bucketWidth;
|
|
|
+ private _bucketHeight;
|
|
|
+ private _buckets;
|
|
|
+ private _bucketLen;
|
|
|
+ get bucketWidth(): number;
|
|
|
+ get bucketHeight(): number;
|
|
|
+ setBucketSizes(width: number, height: number): void;
|
|
|
+ private _useBuckets;
|
|
|
+ private _makeBuckets;
|
|
|
+ private _dispatchInBuckets;
|
|
|
+ private _updateMeasures;
|
|
|
+ private _updateChildrenMeasures;
|
|
|
/**
|
|
|
* Creates a new ScrollViewerWindow
|
|
|
* @param name of ScrollViewerWindow
|
|
@@ -7122,6 +7228,12 @@ declare module BABYLON.GUI {
|
|
|
protected _getTypeName(): string;
|
|
|
/** @hidden */
|
|
|
protected _additionalProcessing(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
|
|
|
+ /** @hidden */
|
|
|
+ _layout(parentMeasure: Measure, context: CanvasRenderingContext2D): boolean;
|
|
|
+ private _scrollChildren;
|
|
|
+ private _scrollChildrenWithBuckets;
|
|
|
+ /** @hidden */
|
|
|
+ _draw(context: CanvasRenderingContext2D, invalidatedRectangle?: Measure): void;
|
|
|
protected _postMeasure(): void;
|
|
|
}
|
|
|
}
|
|
@@ -7227,8 +7339,6 @@ declare module BABYLON.GUI {
|
|
|
private _barImage;
|
|
|
private _barBackgroundImage;
|
|
|
private _barSize;
|
|
|
- private _endLeft;
|
|
|
- private _endTop;
|
|
|
private _window;
|
|
|
private _pointerIsOver;
|
|
|
private _wheelPrecision;
|
|
@@ -7263,6 +7373,41 @@ declare module BABYLON.GUI {
|
|
|
get children(): Control[];
|
|
|
_flagDescendantsAsMatrixDirty(): void;
|
|
|
/**
|
|
|
+ * Freezes or unfreezes the controls in the window.
|
|
|
+ * When controls are frozen, the scroll viewer can render a lot more quickly but updates to positions/sizes of controls
|
|
|
+ * are not taken into account. If you want to change positions/sizes, unfreeze, perform the changes then freeze again
|
|
|
+ */
|
|
|
+ get freezeControls(): boolean;
|
|
|
+ set freezeControls(value: boolean);
|
|
|
+ /** Gets the bucket width */
|
|
|
+ get bucketWidth(): number;
|
|
|
+ /** Gets the bucket height */
|
|
|
+ get bucketHeight(): number;
|
|
|
+ /**
|
|
|
+ * Sets the bucket sizes.
|
|
|
+ * When freezeControls is true, setting a non-zero bucket size will improve performances by updating only
|
|
|
+ * controls that are visible. The bucket sizes is used to subdivide (internally) the window area to smaller areas into which
|
|
|
+ * controls are dispatched. So, the size should be roughly equals to the mean size of all the controls of
|
|
|
+ * the window. To disable the usage of buckets, sets either width or height (or both) to 0.
|
|
|
+ * Please note that using this option will raise the memory usage (the higher the bucket sizes, the less memory
|
|
|
+ * used), that's why it is not enabled by default.
|
|
|
+ * @param width width of the bucket
|
|
|
+ * @param height height of the bucket
|
|
|
+ */
|
|
|
+ setBucketSizes(width: number, height: number): void;
|
|
|
+ private _forceHorizontalBar;
|
|
|
+ private _forceVerticalBar;
|
|
|
+ /**
|
|
|
+ * Forces the horizontal scroll bar to be displayed
|
|
|
+ */
|
|
|
+ get forceHorizontalBar(): boolean;
|
|
|
+ set forceHorizontalBar(value: boolean);
|
|
|
+ /**
|
|
|
+ * Forces the vertical scroll bar to be displayed
|
|
|
+ */
|
|
|
+ get forceVerticalBar(): boolean;
|
|
|
+ set forceVerticalBar(value: boolean);
|
|
|
+ /**
|
|
|
* Creates a new ScrollViewer
|
|
|
* @param name of ScrollViewer
|
|
|
*/
|
|
@@ -7306,6 +7451,7 @@ declare module BABYLON.GUI {
|
|
|
/** Gets or sets the bar background image */
|
|
|
get barImage(): Image;
|
|
|
set barImage(value: Image);
|
|
|
+ private _setWindowPosition;
|
|
|
/** @hidden */
|
|
|
private _updateScroller;
|
|
|
_link(host: AdvancedDynamicTexture): void;
|