@babylonjs/gui 5.0.0-alpha.7 → 5.0.0-beta.2
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/2D/adtInstrumentation.js +1 -1
- package/2D/advancedDynamicTexture.d.ts +165 -125
- package/2D/advancedDynamicTexture.js +342 -181
- package/2D/advancedDynamicTexture.js.map +1 -1
- package/2D/controls/button.d.ts +8 -0
- package/2D/controls/button.js +33 -10
- package/2D/controls/button.js.map +1 -1
- package/2D/controls/checkbox.d.ts +2 -1
- package/2D/controls/checkbox.js +10 -8
- package/2D/controls/checkbox.js.map +1 -1
- package/2D/controls/colorpicker.d.ts +4 -3
- package/2D/controls/colorpicker.js +40 -23
- package/2D/controls/colorpicker.js.map +1 -1
- package/2D/controls/container.d.ts +16 -5
- package/2D/controls/container.js +91 -13
- package/2D/controls/container.js.map +1 -1
- package/2D/controls/control.d.ts +103 -44
- package/2D/controls/control.js +278 -129
- package/2D/controls/control.js.map +1 -1
- package/2D/controls/displayGrid.d.ts +2 -1
- package/2D/controls/displayGrid.js +6 -6
- package/2D/controls/displayGrid.js.map +1 -1
- package/2D/controls/ellipse.d.ts +5 -3
- package/2D/controls/ellipse.js +9 -5
- package/2D/controls/ellipse.js.map +1 -1
- package/2D/controls/focusableButton.d.ts +1 -0
- package/2D/controls/focusableButton.js +9 -6
- package/2D/controls/focusableButton.js.map +1 -1
- package/2D/controls/grid.d.ts +13 -2
- package/2D/controls/grid.js +108 -24
- package/2D/controls/grid.js.map +1 -1
- package/2D/controls/image.d.ts +5 -4
- package/2D/controls/image.js +52 -31
- package/2D/controls/image.js.map +1 -1
- package/2D/controls/index.js +29 -29
- package/2D/controls/inputPassword.js +4 -4
- package/2D/controls/inputPassword.js.map +1 -1
- package/2D/controls/inputText.d.ts +2 -1
- package/2D/controls/inputText.js +40 -14
- package/2D/controls/inputText.js.map +1 -1
- package/2D/controls/line.d.ts +3 -2
- package/2D/controls/line.js +8 -8
- package/2D/controls/line.js.map +1 -1
- package/2D/controls/multiLine.d.ts +4 -3
- package/2D/controls/multiLine.js +6 -6
- package/2D/controls/multiLine.js.map +1 -1
- package/2D/controls/radioButton.d.ts +2 -1
- package/2D/controls/radioButton.js +10 -7
- package/2D/controls/radioButton.js.map +1 -1
- package/2D/controls/rectangle.d.ts +8 -3
- package/2D/controls/rectangle.js +21 -5
- package/2D/controls/rectangle.js.map +1 -1
- package/2D/controls/scrollViewers/scrollViewer.d.ts +3 -2
- package/2D/controls/scrollViewers/scrollViewer.js +9 -9
- package/2D/controls/scrollViewers/scrollViewer.js.map +1 -1
- package/2D/controls/scrollViewers/scrollViewerWindow.d.ts +4 -3
- package/2D/controls/scrollViewers/scrollViewerWindow.js +4 -4
- package/2D/controls/scrollViewers/scrollViewerWindow.js.map +1 -1
- package/2D/controls/selector.js +8 -8
- package/2D/controls/selector.js.map +1 -1
- package/2D/controls/sliders/baseSlider.d.ts +1 -1
- package/2D/controls/sliders/baseSlider.js +12 -10
- package/2D/controls/sliders/baseSlider.js.map +1 -1
- package/2D/controls/sliders/imageBasedSlider.d.ts +10 -1
- package/2D/controls/sliders/imageBasedSlider.js +29 -5
- package/2D/controls/sliders/imageBasedSlider.js.map +1 -1
- package/2D/controls/sliders/imageScrollBar.d.ts +2 -1
- package/2D/controls/sliders/imageScrollBar.js +3 -3
- package/2D/controls/sliders/imageScrollBar.js.map +1 -1
- package/2D/controls/sliders/scrollBar.d.ts +2 -1
- package/2D/controls/sliders/scrollBar.js +3 -3
- package/2D/controls/sliders/scrollBar.js.map +1 -1
- package/2D/controls/sliders/slider.d.ts +2 -1
- package/2D/controls/sliders/slider.js +4 -4
- package/2D/controls/sliders/slider.js.map +1 -1
- package/2D/controls/stackPanel.d.ts +10 -3
- package/2D/controls/stackPanel.js +35 -13
- package/2D/controls/stackPanel.js.map +1 -1
- package/2D/controls/statics.js +3 -3
- package/2D/controls/statics.js.map +1 -1
- package/2D/controls/textBlock.d.ts +16 -9
- package/2D/controls/textBlock.js +75 -34
- package/2D/controls/textBlock.js.map +1 -1
- package/2D/controls/textWrapper.js +2 -2
- package/2D/controls/textWrapper.js.map +1 -1
- package/2D/controls/toggleButton.d.ts +1 -13
- package/2D/controls/toggleButton.js +29 -38
- package/2D/controls/toggleButton.js.map +1 -1
- package/2D/controls/virtualKeyboard.js +5 -5
- package/2D/controls/virtualKeyboard.js.map +1 -1
- package/2D/index.d.ts +1 -1
- package/2D/index.js +9 -9
- package/2D/index.js.map +1 -1
- package/2D/math2D.d.ts +5 -0
- package/2D/math2D.js +14 -2
- package/2D/math2D.js.map +1 -1
- package/2D/measure.js +1 -1
- package/2D/measure.js.map +1 -1
- package/2D/multiLinePoint.js +3 -3
- package/2D/style.js +2 -2
- package/2D/valueAndUnit.d.ts +21 -6
- package/2D/valueAndUnit.js +57 -13
- package/2D/valueAndUnit.js.map +1 -1
- package/2D/xmlLoader.d.ts +17 -3
- package/2D/xmlLoader.js +54 -15
- package/2D/xmlLoader.js.map +1 -1
- package/3D/behaviors/defaultBehavior.d.ts +73 -0
- package/3D/behaviors/defaultBehavior.js +122 -0
- package/3D/behaviors/defaultBehavior.js.map +1 -0
- package/3D/controls/abstractButton3D.d.ts +2 -2
- package/3D/controls/abstractButton3D.js +3 -3
- package/3D/controls/abstractButton3D.js.map +1 -1
- package/3D/controls/button3D.d.ts +0 -24
- package/3D/controls/button3D.js +15 -84
- package/3D/controls/button3D.js.map +1 -1
- package/3D/controls/container3D.js +2 -2
- package/3D/controls/contentDisplay3D.d.ts +30 -0
- package/3D/controls/contentDisplay3D.js +79 -0
- package/3D/controls/contentDisplay3D.js.map +1 -0
- package/3D/controls/control3D.d.ts +10 -7
- package/3D/controls/control3D.js +27 -19
- package/3D/controls/control3D.js.map +1 -1
- package/3D/controls/cylinderPanel.js +5 -5
- package/3D/controls/handMenu.d.ts +28 -0
- package/3D/controls/handMenu.js +48 -0
- package/3D/controls/handMenu.js.map +1 -0
- package/3D/controls/holographicBackplate.d.ts +48 -0
- package/3D/controls/holographicBackplate.js +121 -0
- package/3D/controls/holographicBackplate.js.map +1 -0
- package/3D/controls/holographicButton.d.ts +1 -1
- package/3D/controls/holographicButton.js +35 -31
- package/3D/controls/holographicButton.js.map +1 -1
- package/3D/controls/holographicSlate.d.ts +118 -0
- package/3D/controls/holographicSlate.js +365 -0
- package/3D/controls/holographicSlate.js.map +1 -0
- package/3D/controls/index.d.ts +7 -0
- package/3D/controls/index.js +22 -15
- package/3D/controls/index.js.map +1 -1
- package/3D/controls/meshButton3D.js +2 -2
- package/3D/controls/meshButton3D.js.map +1 -1
- package/3D/controls/nearMenu.d.ts +45 -0
- package/3D/controls/nearMenu.js +111 -0
- package/3D/controls/nearMenu.js.map +1 -0
- package/3D/controls/planePanel.js +3 -3
- package/3D/controls/scatterPanel.js +4 -4
- package/3D/controls/slider3D.d.ts +80 -0
- package/3D/controls/slider3D.js +268 -0
- package/3D/controls/slider3D.js.map +1 -0
- package/3D/controls/spherePanel.js +5 -5
- package/3D/controls/stackPanel3D.js +3 -3
- package/3D/controls/touchButton3D.d.ts +9 -21
- package/3D/controls/touchButton3D.js +52 -224
- package/3D/controls/touchButton3D.js.map +1 -1
- package/3D/controls/touchHolographicButton.d.ts +20 -3
- package/3D/controls/touchHolographicButton.js +137 -67
- package/3D/controls/touchHolographicButton.js.map +1 -1
- package/3D/controls/touchHolographicMenu.d.ts +61 -0
- package/3D/controls/touchHolographicMenu.js +149 -0
- package/3D/controls/touchHolographicMenu.js.map +1 -0
- package/3D/controls/touchMeshButton3D.d.ts +3 -6
- package/3D/controls/touchMeshButton3D.js +6 -14
- package/3D/controls/touchMeshButton3D.js.map +1 -1
- package/3D/controls/touchToggleButton3D.d.ts +35 -0
- package/3D/controls/touchToggleButton3D.js +60 -0
- package/3D/controls/touchToggleButton3D.js.map +1 -0
- package/3D/controls/volumeBasedPanel.d.ts +1 -1
- package/3D/controls/volumeBasedPanel.js +5 -5
- package/3D/controls/volumeBasedPanel.js.map +1 -1
- package/3D/gizmos/gizmoHandle.d.ts +108 -0
- package/3D/gizmos/gizmoHandle.js +210 -0
- package/3D/gizmos/gizmoHandle.js.map +1 -0
- package/3D/gizmos/index.d.ts +2 -0
- package/3D/gizmos/index.js +3 -0
- package/3D/gizmos/index.js.map +1 -0
- package/3D/gizmos/slateGizmo.d.ts +59 -0
- package/3D/gizmos/slateGizmo.js +364 -0
- package/3D/gizmos/slateGizmo.js.map +1 -0
- package/3D/gui3DManager.d.ts +15 -2
- package/3D/gui3DManager.js +62 -41
- package/3D/gui3DManager.js.map +1 -1
- package/3D/index.d.ts +3 -2
- package/3D/index.js +5 -4
- package/3D/index.js.map +1 -1
- package/3D/materials/fluent/fluentMaterial.d.ts +90 -0
- package/3D/materials/fluent/fluentMaterial.js +282 -0
- package/3D/materials/fluent/fluentMaterial.js.map +1 -0
- package/3D/materials/fluent/index.d.ts +1 -0
- package/3D/materials/fluent/index.js +2 -0
- package/3D/materials/fluent/index.js.map +1 -0
- package/3D/materials/{shaders → fluent/shaders}/fluent.fragment.d.ts +0 -0
- package/3D/materials/fluent/shaders/fluent.fragment.js +7 -0
- package/3D/materials/fluent/shaders/fluent.fragment.js.map +1 -0
- package/3D/materials/{shaders → fluent/shaders}/fluent.vertex.d.ts +0 -0
- package/3D/materials/{shaders → fluent/shaders}/fluent.vertex.js +2 -2
- package/3D/materials/fluent/shaders/fluent.vertex.js.map +1 -0
- package/3D/materials/fluentBackplate/fluentBackplateMaterial.d.ts +154 -0
- package/3D/materials/fluentBackplate/fluentBackplateMaterial.js +435 -0
- package/3D/materials/fluentBackplate/fluentBackplateMaterial.js.map +1 -0
- package/3D/materials/fluentBackplate/index.d.ts +1 -0
- package/3D/materials/fluentBackplate/index.js +2 -0
- package/3D/materials/fluentBackplate/index.js.map +1 -0
- package/3D/materials/fluentBackplate/shaders/fluentBackplate.fragment.d.ts +5 -0
- package/3D/materials/fluentBackplate/shaders/fluentBackplate.fragment.js +7 -0
- package/3D/materials/fluentBackplate/shaders/fluentBackplate.fragment.js.map +1 -0
- package/3D/materials/fluentBackplate/shaders/fluentBackplate.vertex.d.ts +5 -0
- package/3D/materials/fluentBackplate/shaders/fluentBackplate.vertex.js +7 -0
- package/3D/materials/fluentBackplate/shaders/fluentBackplate.vertex.js.map +1 -0
- package/3D/materials/fluentButton/fluentButtonMaterial.d.ts +189 -0
- package/3D/materials/fluentButton/fluentButtonMaterial.js +538 -0
- package/3D/materials/fluentButton/fluentButtonMaterial.js.map +1 -0
- package/3D/materials/fluentButton/index.d.ts +1 -0
- package/3D/materials/fluentButton/index.js +2 -0
- package/3D/materials/fluentButton/index.js.map +1 -0
- package/3D/materials/fluentButton/shaders/fluentButton.fragment.d.ts +5 -0
- package/3D/materials/fluentButton/shaders/fluentButton.fragment.js +7 -0
- package/3D/materials/fluentButton/shaders/fluentButton.fragment.js.map +1 -0
- package/3D/materials/fluentButton/shaders/fluentButton.vertex.d.ts +5 -0
- package/3D/materials/fluentButton/shaders/fluentButton.vertex.js +7 -0
- package/3D/materials/fluentButton/shaders/fluentButton.vertex.js.map +1 -0
- package/3D/materials/fluentMaterial.d.ts +2 -88
- package/3D/materials/fluentMaterial.js +2 -277
- package/3D/materials/fluentMaterial.js.map +1 -1
- package/3D/materials/handle/handleMaterial.d.ts +68 -0
- package/3D/materials/handle/handleMaterial.js +127 -0
- package/3D/materials/handle/handleMaterial.js.map +1 -0
- package/3D/materials/handle/index.d.ts +1 -0
- package/3D/materials/handle/index.js +2 -0
- package/3D/materials/handle/index.js.map +1 -0
- package/3D/materials/handle/shaders/handle.fragment.d.ts +5 -0
- package/3D/materials/handle/shaders/handle.fragment.js +7 -0
- package/3D/materials/handle/shaders/handle.fragment.js.map +1 -0
- package/3D/materials/handle/shaders/handle.vertex.d.ts +5 -0
- package/3D/materials/handle/shaders/handle.vertex.js +7 -0
- package/3D/materials/handle/shaders/handle.vertex.js.map +1 -0
- package/3D/materials/index.d.ts +5 -1
- package/3D/materials/index.js +5 -1
- package/3D/materials/index.js.map +1 -1
- package/3D/materials/mrdl/index.d.ts +3 -0
- package/3D/materials/mrdl/index.js +4 -0
- package/3D/materials/mrdl/index.js.map +1 -0
- package/3D/materials/mrdl/mrdlBackplateMaterial.d.ts +147 -0
- package/3D/materials/mrdl/mrdlBackplateMaterial.js +410 -0
- package/3D/materials/mrdl/mrdlBackplateMaterial.js.map +1 -0
- package/3D/materials/mrdl/mrdlSliderBarMaterial.d.ts +333 -0
- package/3D/materials/mrdl/mrdlSliderBarMaterial.js +787 -0
- package/3D/materials/mrdl/mrdlSliderBarMaterial.js.map +1 -0
- package/3D/materials/mrdl/mrdlSliderThumbMaterial.d.ts +333 -0
- package/3D/materials/mrdl/mrdlSliderThumbMaterial.js +787 -0
- package/3D/materials/mrdl/mrdlSliderThumbMaterial.js.map +1 -0
- package/3D/materials/mrdl/shaders/mrdlBackplate.fragment.d.ts +5 -0
- package/3D/materials/mrdl/shaders/mrdlBackplate.fragment.js +7 -0
- package/3D/materials/mrdl/shaders/mrdlBackplate.fragment.js.map +1 -0
- package/3D/materials/mrdl/shaders/mrdlBackplate.vertex.d.ts +5 -0
- package/3D/materials/mrdl/shaders/mrdlBackplate.vertex.js +7 -0
- package/3D/materials/mrdl/shaders/mrdlBackplate.vertex.js.map +1 -0
- package/3D/materials/mrdl/shaders/mrdlSliderBar.fragment.d.ts +5 -0
- package/3D/materials/mrdl/shaders/mrdlSliderBar.fragment.js +7 -0
- package/3D/materials/mrdl/shaders/mrdlSliderBar.fragment.js.map +1 -0
- package/3D/materials/mrdl/shaders/mrdlSliderBar.vertex.d.ts +5 -0
- package/3D/materials/mrdl/shaders/mrdlSliderBar.vertex.js +7 -0
- package/3D/materials/mrdl/shaders/mrdlSliderBar.vertex.js.map +1 -0
- package/3D/materials/mrdl/shaders/mrdlSliderThumb.fragment.d.ts +5 -0
- package/3D/materials/mrdl/shaders/mrdlSliderThumb.fragment.js +7 -0
- package/3D/materials/mrdl/shaders/mrdlSliderThumb.fragment.js.map +1 -0
- package/3D/materials/mrdl/shaders/mrdlSliderThumb.vertex.d.ts +5 -0
- package/3D/materials/mrdl/shaders/mrdlSliderThumb.vertex.js +7 -0
- package/3D/materials/mrdl/shaders/mrdlSliderThumb.vertex.js.map +1 -0
- package/3D/vector3WithInfo.js +1 -1
- package/index.d.ts +2 -2
- package/index.js +2 -2
- package/index.js.map +1 -1
- package/legacy/legacy.js +2 -2
- package/package.json +117 -9
- package/3D/materials/shaders/fluent.fragment.js +0 -7
- package/3D/materials/shaders/fluent.fragment.js.map +0 -1
- package/3D/materials/shaders/fluent.vertex.js.map +0 -1
package/2D/adtInstrumentation.js
CHANGED
|
@@ -8,16 +8,18 @@ import { Layer } from "@babylonjs/core/Layers/layer";
|
|
|
8
8
|
import { Scene } from "@babylonjs/core/scene";
|
|
9
9
|
import { Container } from "./controls/container";
|
|
10
10
|
import { Control } from "./controls/control";
|
|
11
|
-
import { IFocusableControl } from
|
|
11
|
+
import { IFocusableControl } from "./controls/focusableControl";
|
|
12
12
|
import { Style } from "./style";
|
|
13
|
-
import { Viewport } from
|
|
13
|
+
import { Viewport } from "@babylonjs/core/Maths/math.viewport";
|
|
14
14
|
/**
|
|
15
|
-
* Class used to create texture to support 2D GUI elements
|
|
16
|
-
* @see https://doc.babylonjs.com/how_to/gui
|
|
17
|
-
*/
|
|
15
|
+
* Class used to create texture to support 2D GUI elements
|
|
16
|
+
* @see https://doc.babylonjs.com/how_to/gui
|
|
17
|
+
*/
|
|
18
18
|
export declare class AdvancedDynamicTexture extends DynamicTexture {
|
|
19
19
|
/** Define the Uurl to load snippets */
|
|
20
20
|
static SnippetUrl: string;
|
|
21
|
+
/** Indicates if some optimizations can be performed in GUI GPU management (the downside is additional memory/GPU texture memory used) */
|
|
22
|
+
static AllowGPUOptimizations: boolean;
|
|
21
23
|
/** Snippet ID if the content was created from the snippet server */
|
|
22
24
|
snippetId: string;
|
|
23
25
|
private _isDirty;
|
|
@@ -72,139 +74,152 @@ export declare class AdvancedDynamicTexture extends DynamicTexture {
|
|
|
72
74
|
/** Gets the number of render calls made the last time the ADT has been rendered */
|
|
73
75
|
get numRenderCalls(): number;
|
|
74
76
|
/**
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
77
|
+
* Define type to string to ensure compatibility across browsers
|
|
78
|
+
* Safari doesn't support DataTransfer constructor
|
|
79
|
+
*/
|
|
78
80
|
private _clipboardData;
|
|
79
81
|
/**
|
|
80
|
-
|
|
81
|
-
|
|
82
|
+
* Observable event triggered each time an clipboard event is received from the rendering canvas
|
|
83
|
+
*/
|
|
82
84
|
onClipboardObservable: Observable<ClipboardInfo>;
|
|
83
85
|
/**
|
|
84
|
-
|
|
85
|
-
|
|
86
|
+
* Observable event triggered each time a pointer down is intercepted by a control
|
|
87
|
+
*/
|
|
86
88
|
onControlPickedObservable: Observable<Control>;
|
|
87
89
|
/**
|
|
88
|
-
|
|
89
|
-
|
|
90
|
+
* Observable event triggered before layout is evaluated
|
|
91
|
+
*/
|
|
90
92
|
onBeginLayoutObservable: Observable<AdvancedDynamicTexture>;
|
|
91
93
|
/**
|
|
92
|
-
|
|
93
|
-
|
|
94
|
+
* Observable event triggered after the layout was evaluated
|
|
95
|
+
*/
|
|
94
96
|
onEndLayoutObservable: Observable<AdvancedDynamicTexture>;
|
|
95
97
|
/**
|
|
96
|
-
|
|
97
|
-
|
|
98
|
+
* Observable event triggered before the texture is rendered
|
|
99
|
+
*/
|
|
98
100
|
onBeginRenderObservable: Observable<AdvancedDynamicTexture>;
|
|
99
101
|
/**
|
|
100
|
-
|
|
101
|
-
|
|
102
|
+
* Observable event triggered after the texture was rendered
|
|
103
|
+
*/
|
|
102
104
|
onEndRenderObservable: Observable<AdvancedDynamicTexture>;
|
|
103
105
|
/**
|
|
104
|
-
|
|
105
|
-
|
|
106
|
+
* Gets or sets a boolean defining if alpha is stored as premultiplied
|
|
107
|
+
*/
|
|
106
108
|
premulAlpha: boolean;
|
|
107
109
|
/**
|
|
108
110
|
* Gets or sets a boolean indicating that the canvas must be reverted on Y when updating the texture
|
|
109
111
|
*/
|
|
110
112
|
applyYInversionOnUpdate: boolean;
|
|
111
113
|
/**
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
114
|
+
* Gets or sets a number used to scale rendering size (2 means that the texture will be twice bigger).
|
|
115
|
+
* Useful when you want more antialiasing
|
|
116
|
+
*/
|
|
115
117
|
get renderScale(): number;
|
|
116
118
|
set renderScale(value: number);
|
|
117
119
|
/** Gets or sets the background color */
|
|
118
120
|
get background(): string;
|
|
119
121
|
set background(value: string);
|
|
120
122
|
/**
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
* Gets or sets the ideal width used to design controls.
|
|
124
|
+
* The GUI will then rescale everything accordingly
|
|
125
|
+
* @see https://doc.babylonjs.com/how_to/gui#adaptive-scaling
|
|
126
|
+
*/
|
|
125
127
|
get idealWidth(): number;
|
|
126
128
|
set idealWidth(value: number);
|
|
127
129
|
/**
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
130
|
+
* Gets or sets the ideal height used to design controls.
|
|
131
|
+
* The GUI will then rescale everything accordingly
|
|
132
|
+
* @see https://doc.babylonjs.com/how_to/gui#adaptive-scaling
|
|
133
|
+
*/
|
|
132
134
|
get idealHeight(): number;
|
|
133
135
|
set idealHeight(value: number);
|
|
134
136
|
/**
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
137
|
+
* Gets or sets a boolean indicating if the smallest ideal value must be used if idealWidth and idealHeight are both set
|
|
138
|
+
* @see https://doc.babylonjs.com/how_to/gui#adaptive-scaling
|
|
139
|
+
*/
|
|
138
140
|
get useSmallestIdeal(): boolean;
|
|
139
141
|
set useSmallestIdeal(value: boolean);
|
|
140
142
|
/**
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
143
|
+
* Gets or sets a boolean indicating if adaptive scaling must be used
|
|
144
|
+
* @see https://doc.babylonjs.com/how_to/gui#adaptive-scaling
|
|
145
|
+
*/
|
|
144
146
|
get renderAtIdealSize(): boolean;
|
|
145
147
|
set renderAtIdealSize(value: boolean);
|
|
146
148
|
/**
|
|
147
149
|
* Gets the ratio used when in "ideal mode"
|
|
148
|
-
|
|
150
|
+
* @see https://doc.babylonjs.com/how_to/gui#adaptive-scaling
|
|
149
151
|
* */
|
|
150
152
|
get idealRatio(): number;
|
|
151
153
|
/**
|
|
152
|
-
|
|
153
|
-
|
|
154
|
+
* Gets the underlying layer used to render the texture when in fullscreen mode
|
|
155
|
+
*/
|
|
154
156
|
get layer(): Nullable<Layer>;
|
|
155
157
|
/**
|
|
156
|
-
|
|
157
|
-
|
|
158
|
+
* Gets the root container control
|
|
159
|
+
*/
|
|
158
160
|
get rootContainer(): Container;
|
|
159
161
|
/**
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
162
|
+
* Returns an array containing the root container.
|
|
163
|
+
* This is mostly used to let the Inspector introspects the ADT
|
|
164
|
+
* @returns an array containing the rootContainer
|
|
165
|
+
*/
|
|
164
166
|
getChildren(): Array<Container>;
|
|
165
167
|
/**
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
168
|
+
* Will return all controls that are inside this texture
|
|
169
|
+
* @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered
|
|
170
|
+
* @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored
|
|
171
|
+
* @return all child controls
|
|
172
|
+
*/
|
|
171
173
|
getDescendants(directDescendantsOnly?: boolean, predicate?: (control: Control) => boolean): Control[];
|
|
172
174
|
/**
|
|
173
|
-
|
|
174
|
-
|
|
175
|
+
* Will return all controls with the given type name
|
|
176
|
+
* @param typeName defines the type name to search for
|
|
177
|
+
* @returns an array of all controls found
|
|
178
|
+
*/
|
|
179
|
+
getControlsByType(typeName: string): Control[];
|
|
180
|
+
/**
|
|
181
|
+
* Will return the first control with the given name
|
|
182
|
+
* @param name defines the name to search for
|
|
183
|
+
* @return the first control found or null
|
|
184
|
+
*/
|
|
185
|
+
getControlByName(name: string): Nullable<Control>;
|
|
186
|
+
private _getControlByKey;
|
|
187
|
+
/**
|
|
188
|
+
* Gets or sets the current focused control
|
|
189
|
+
*/
|
|
175
190
|
get focusedControl(): Nullable<IFocusableControl>;
|
|
176
191
|
set focusedControl(control: Nullable<IFocusableControl>);
|
|
177
192
|
/**
|
|
178
|
-
|
|
179
|
-
|
|
193
|
+
* Gets or sets a boolean indicating if the texture must be rendered in background or foreground when in fullscreen mode
|
|
194
|
+
*/
|
|
180
195
|
get isForeground(): boolean;
|
|
181
196
|
set isForeground(value: boolean);
|
|
182
197
|
/**
|
|
183
|
-
|
|
184
|
-
|
|
198
|
+
* Gets or set information about clipboardData
|
|
199
|
+
*/
|
|
185
200
|
get clipboardData(): string;
|
|
186
201
|
set clipboardData(value: string);
|
|
187
202
|
/**
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
203
|
+
* Creates a new AdvancedDynamicTexture
|
|
204
|
+
* @param name defines the name of the texture
|
|
205
|
+
* @param width defines the width of the texture
|
|
206
|
+
* @param height defines the height of the texture
|
|
207
|
+
* @param scene defines the hosting scene
|
|
208
|
+
* @param generateMipMaps defines a boolean indicating if mipmaps must be generated (false by default)
|
|
209
|
+
* @param samplingMode defines the texture sampling mode (Texture.NEAREST_SAMPLINGMODE by default)
|
|
210
|
+
* @param invertY defines if the texture needs to be inverted on the y axis during loading (true by default)
|
|
211
|
+
*/
|
|
197
212
|
constructor(name: string, width: number | undefined, height: number | undefined, scene: Nullable<Scene>, generateMipMaps?: boolean, samplingMode?: number, invertY?: boolean);
|
|
198
213
|
/**
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
214
|
+
* Get the current class name of the texture useful for serialization or dynamic coding.
|
|
215
|
+
* @returns "AdvancedDynamicTexture"
|
|
216
|
+
*/
|
|
202
217
|
getClassName(): string;
|
|
203
218
|
/**
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
219
|
+
* Function used to execute a function on all controls
|
|
220
|
+
* @param func defines the function to execute
|
|
221
|
+
* @param container defines the container where controls belong. If null the root container will be used
|
|
222
|
+
*/
|
|
208
223
|
executeOnAllControls(func: (control: Control) => void, container?: Container): void;
|
|
209
224
|
private _useInvalidateRectOptimization;
|
|
210
225
|
/**
|
|
@@ -222,47 +237,55 @@ export declare class AdvancedDynamicTexture extends DynamicTexture {
|
|
|
222
237
|
*/
|
|
223
238
|
invalidateRect(invalidMinX: number, invalidMinY: number, invalidMaxX: number, invalidMaxY: number): void;
|
|
224
239
|
/**
|
|
225
|
-
|
|
226
|
-
|
|
240
|
+
* Marks the texture as dirty forcing a complete update
|
|
241
|
+
*/
|
|
227
242
|
markAsDirty(): void;
|
|
228
243
|
/**
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
244
|
+
* Helper function used to create a new style
|
|
245
|
+
* @returns a new style
|
|
246
|
+
* @see https://doc.babylonjs.com/how_to/gui#styles
|
|
247
|
+
*/
|
|
233
248
|
createStyle(): Style;
|
|
234
249
|
/**
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
250
|
+
* Adds a new control to the root container
|
|
251
|
+
* @param control defines the control to add
|
|
252
|
+
* @returns the current texture
|
|
253
|
+
*/
|
|
239
254
|
addControl(control: Control): AdvancedDynamicTexture;
|
|
240
255
|
/**
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
256
|
+
* Removes a control from the root container
|
|
257
|
+
* @param control defines the control to remove
|
|
258
|
+
* @returns the current texture
|
|
259
|
+
*/
|
|
245
260
|
removeControl(control: Control): AdvancedDynamicTexture;
|
|
246
261
|
/**
|
|
247
|
-
|
|
248
|
-
|
|
262
|
+
* Moves overlapped controls towards a position where it is not overlapping anymore.
|
|
263
|
+
* Please note that this method alters linkOffsetXInPixels and linkOffsetYInPixels.
|
|
264
|
+
* @param overlapGroup the overlap group which will be processed or undefined to process all overlap groups
|
|
265
|
+
* @param deltaStep the step size (speed) to reach the target non overlapping position (default 0.1)
|
|
266
|
+
* @param repelFactor how much is the control repelled by other controls
|
|
267
|
+
*/
|
|
268
|
+
moveToNonOverlappedPosition(overlapGroup?: number | Control[], deltaStep?: number, repelFactor?: number): void;
|
|
269
|
+
/**
|
|
270
|
+
* Release all resources
|
|
271
|
+
*/
|
|
249
272
|
dispose(): void;
|
|
250
273
|
private _onResize;
|
|
251
274
|
/** @hidden */
|
|
252
|
-
_getGlobalViewport(
|
|
275
|
+
_getGlobalViewport(): Viewport;
|
|
253
276
|
/**
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
277
|
+
* Get screen coordinates for a vector3
|
|
278
|
+
* @param position defines the position to project
|
|
279
|
+
* @param worldMatrix defines the world matrix to use
|
|
280
|
+
* @returns the projected position
|
|
281
|
+
*/
|
|
259
282
|
getProjectedPosition(position: Vector3, worldMatrix: Matrix): Vector2;
|
|
260
283
|
/**
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
284
|
+
* Get screen coordinates for a vector3
|
|
285
|
+
* @param position defines the position to project
|
|
286
|
+
* @param worldMatrix defines the world matrix to use
|
|
287
|
+
* @returns the projected position with Z
|
|
288
|
+
*/
|
|
266
289
|
getProjectedPositionWithZ(position: Vector3, worldMatrix: Matrix): Vector3;
|
|
267
290
|
private _checkUpdate;
|
|
268
291
|
private _clearMeasure;
|
|
@@ -287,23 +310,23 @@ export declare class AdvancedDynamicTexture extends DynamicTexture {
|
|
|
287
310
|
/** @hidden */
|
|
288
311
|
private onClipboardPaste;
|
|
289
312
|
/**
|
|
290
|
-
|
|
291
|
-
|
|
313
|
+
* Register the clipboard Events onto the canvas
|
|
314
|
+
*/
|
|
292
315
|
registerClipboardEvents(): void;
|
|
293
316
|
/**
|
|
294
317
|
* Unregister the clipboard Events from the canvas
|
|
295
318
|
*/
|
|
296
319
|
unRegisterClipboardEvents(): void;
|
|
297
320
|
/**
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
321
|
+
* Connect the texture to a hosting mesh to enable interactions
|
|
322
|
+
* @param mesh defines the mesh to attach to
|
|
323
|
+
* @param supportPointerMove defines a boolean indicating if pointer move events must be catched as well
|
|
324
|
+
*/
|
|
302
325
|
attachToMesh(mesh: AbstractMesh, supportPointerMove?: boolean): void;
|
|
303
326
|
/**
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
327
|
+
* Move the focus to a specific control
|
|
328
|
+
* @param control defines the control which will receive the focus
|
|
329
|
+
*/
|
|
307
330
|
moveFocusToControl(control: IFocusableControl): void;
|
|
308
331
|
private _manageFocus;
|
|
309
332
|
private _attachToOnPointerOut;
|
|
@@ -316,14 +339,30 @@ export declare class AdvancedDynamicTexture extends DynamicTexture {
|
|
|
316
339
|
/**
|
|
317
340
|
* Recreate the content of the ADT from a JSON object
|
|
318
341
|
* @param serializedObject define the JSON serialized object to restore from
|
|
342
|
+
* @param scaleToSize defines whether to scale to texture to the saved size
|
|
319
343
|
*/
|
|
320
|
-
parseContent(serializedObject: any): void;
|
|
344
|
+
parseContent(serializedObject: any, scaleToSize?: boolean): void;
|
|
321
345
|
/**
|
|
322
346
|
* Recreate the content of the ADT from a snippet saved by the GUI editor
|
|
323
347
|
* @param snippetId defines the snippet to load
|
|
348
|
+
* @param scaleToSize defines whether to scale to texture to the saved size
|
|
324
349
|
* @returns a promise that will resolve on success
|
|
325
350
|
*/
|
|
326
|
-
parseFromSnippetAsync(snippetId: string): Promise<void>;
|
|
351
|
+
parseFromSnippetAsync(snippetId: string, scaleToSize?: boolean): Promise<void>;
|
|
352
|
+
/**
|
|
353
|
+
* Recreate the content of the ADT from a url json
|
|
354
|
+
* @param url defines the url to load
|
|
355
|
+
* @param scaleToSize defines whether to scale to texture to the saved size
|
|
356
|
+
* @returns a promise that will resolve on success
|
|
357
|
+
*/
|
|
358
|
+
parseFromURLAsync(url: string, scaleToSize?: boolean): Promise<void>;
|
|
359
|
+
/**
|
|
360
|
+
* Compares two rectangle based controls for pixel overlap
|
|
361
|
+
* @param control1 The first control to compare
|
|
362
|
+
* @param control2 The second control to compare
|
|
363
|
+
* @returns true if overlaps, otherwise false
|
|
364
|
+
*/
|
|
365
|
+
private static _Overlaps;
|
|
327
366
|
/**
|
|
328
367
|
* Creates a new AdvancedDynamicTexture in projected mode (ie. attached to a mesh)
|
|
329
368
|
* @param mesh defines the mesh which will receive the texture
|
|
@@ -346,16 +385,17 @@ export declare class AdvancedDynamicTexture extends DynamicTexture {
|
|
|
346
385
|
*/
|
|
347
386
|
static CreateForMeshTexture(mesh: AbstractMesh, width?: number, height?: number, supportPointerMove?: boolean, invertY?: boolean): AdvancedDynamicTexture;
|
|
348
387
|
/**
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
388
|
+
* Creates a new AdvancedDynamicTexture in fullscreen mode.
|
|
389
|
+
* In this mode the texture will rely on a layer for its rendering.
|
|
390
|
+
* This allows it to be treated like any other layer.
|
|
391
|
+
* As such, if you have a multi camera setup, you can set the layerMask on the GUI as well.
|
|
392
|
+
* LayerMask is set through advancedTexture.layer.layerMask
|
|
393
|
+
* @param name defines name for the texture
|
|
394
|
+
* @param foreground defines a boolean indicating if the texture must be rendered in foreground (default is true)
|
|
395
|
+
* @param scene defines the hosting scene
|
|
396
|
+
* @param sampling defines the texture sampling mode (Texture.BILINEAR_SAMPLINGMODE by default)
|
|
397
|
+
* @param adaptiveScaling defines whether to automatically scale root to match hardwarescaling (false by default)
|
|
398
|
+
* @returns a new AdvancedDynamicTexture
|
|
399
|
+
*/
|
|
400
|
+
static CreateFullscreenUI(name: string, foreground?: boolean, scene?: Nullable<Scene>, sampling?: number, adaptiveScaling?: boolean): AdvancedDynamicTexture;
|
|
361
401
|
}
|