@onerjs/gui 8.23.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/2D/FrameGraph/guiTask.d.ts +34 -0
- package/2D/FrameGraph/guiTask.js +62 -0
- package/2D/FrameGraph/guiTask.js.map +1 -0
- package/2D/FrameGraph/renderGraphGUIBlock.d.ts +43 -0
- package/2D/FrameGraph/renderGraphGUIBlock.js +66 -0
- package/2D/FrameGraph/renderGraphGUIBlock.js.map +1 -0
- package/2D/adtInstrumentation.d.ts +52 -0
- package/2D/adtInstrumentation.js +107 -0
- package/2D/adtInstrumentation.js.map +1 -0
- package/2D/advancedDynamicTexture.d.ts +548 -0
- package/2D/advancedDynamicTexture.js +1522 -0
- package/2D/advancedDynamicTexture.js.map +1 -0
- package/2D/controls/button.d.ts +109 -0
- package/2D/controls/button.js +246 -0
- package/2D/controls/button.js.map +1 -0
- package/2D/controls/checkbox.d.ts +53 -0
- package/2D/controls/checkbox.js +164 -0
- package/2D/controls/checkbox.js.map +1 -0
- package/2D/controls/colorpicker.d.ts +101 -0
- package/2D/controls/colorpicker.js +1396 -0
- package/2D/controls/colorpicker.js.map +1 -0
- package/2D/controls/container.d.ts +179 -0
- package/2D/controls/container.js +616 -0
- package/2D/controls/container.js.map +1 -0
- package/2D/controls/control.d.ts +943 -0
- package/2D/controls/control.js +2460 -0
- package/2D/controls/control.js.map +1 -0
- package/2D/controls/displayGrid.d.ts +53 -0
- package/2D/controls/displayGrid.js +202 -0
- package/2D/controls/displayGrid.js.map +1 -0
- package/2D/controls/ellipse.d.ts +25 -0
- package/2D/controls/ellipse.js +93 -0
- package/2D/controls/ellipse.js.map +1 -0
- package/2D/controls/focusableButton.d.ts +17 -0
- package/2D/controls/focusableButton.js +25 -0
- package/2D/controls/focusableButton.js.map +1 -0
- package/2D/controls/focusableControl.d.ts +43 -0
- package/2D/controls/focusableControl.js +2 -0
- package/2D/controls/focusableControl.js.map +1 -0
- package/2D/controls/gradient/BaseGradient.d.ts +69 -0
- package/2D/controls/gradient/BaseGradient.js +84 -0
- package/2D/controls/gradient/BaseGradient.js.map +1 -0
- package/2D/controls/gradient/LinearGradient.d.ts +45 -0
- package/2D/controls/gradient/LinearGradient.js +73 -0
- package/2D/controls/gradient/LinearGradient.js.map +1 -0
- package/2D/controls/gradient/RadialGradient.d.ts +53 -0
- package/2D/controls/gradient/RadialGradient.js +89 -0
- package/2D/controls/gradient/RadialGradient.js.map +1 -0
- package/2D/controls/grid.d.ts +151 -0
- package/2D/controls/grid.js +528 -0
- package/2D/controls/grid.js.map +1 -0
- package/2D/controls/image.d.ts +228 -0
- package/2D/controls/image.js +915 -0
- package/2D/controls/image.js.map +1 -0
- package/2D/controls/index.d.ts +34 -0
- package/2D/controls/index.js +35 -0
- package/2D/controls/index.js.map +1 -0
- package/2D/controls/inputPassword.d.ts +9 -0
- package/2D/controls/inputPassword.js +22 -0
- package/2D/controls/inputPassword.js.map +1 -0
- package/2D/controls/inputText.d.ts +197 -0
- package/2D/controls/inputText.js +1035 -0
- package/2D/controls/inputText.js.map +1 -0
- package/2D/controls/inputTextArea.d.ts +142 -0
- package/2D/controls/inputTextArea.js +1025 -0
- package/2D/controls/inputTextArea.js.map +1 -0
- package/2D/controls/line.d.ts +73 -0
- package/2D/controls/line.js +227 -0
- package/2D/controls/line.js.map +1 -0
- package/2D/controls/multiLine.d.ts +75 -0
- package/2D/controls/multiLine.js +237 -0
- package/2D/controls/multiLine.js.map +1 -0
- package/2D/controls/radioButton.d.ts +49 -0
- package/2D/controls/radioButton.js +185 -0
- package/2D/controls/radioButton.js.map +1 -0
- package/2D/controls/rectangle.d.ts +43 -0
- package/2D/controls/rectangle.js +204 -0
- package/2D/controls/rectangle.js.map +1 -0
- package/2D/controls/scrollViewers/scrollViewer.d.ts +178 -0
- package/2D/controls/scrollViewers/scrollViewer.js +587 -0
- package/2D/controls/scrollViewers/scrollViewer.js.map +1 -0
- package/2D/controls/scrollViewers/scrollViewerWindow.d.ts +51 -0
- package/2D/controls/scrollViewers/scrollViewerWindow.js +254 -0
- package/2D/controls/scrollViewers/scrollViewerWindow.js.map +1 -0
- package/2D/controls/selector.d.ts +237 -0
- package/2D/controls/selector.js +579 -0
- package/2D/controls/selector.js.map +1 -0
- package/2D/controls/sliders/baseSlider.d.ts +80 -0
- package/2D/controls/sliders/baseSlider.js +299 -0
- package/2D/controls/sliders/baseSlider.js.map +1 -0
- package/2D/controls/sliders/imageBasedSlider.d.ts +47 -0
- package/2D/controls/sliders/imageBasedSlider.js +168 -0
- package/2D/controls/sliders/imageBasedSlider.js.map +1 -0
- package/2D/controls/sliders/imageScrollBar.d.ts +67 -0
- package/2D/controls/sliders/imageScrollBar.js +248 -0
- package/2D/controls/sliders/imageScrollBar.js.map +1 -0
- package/2D/controls/sliders/scrollBar.d.ts +50 -0
- package/2D/controls/sliders/scrollBar.js +175 -0
- package/2D/controls/sliders/scrollBar.js.map +1 -0
- package/2D/controls/sliders/slider.d.ts +46 -0
- package/2D/controls/sliders/slider.js +281 -0
- package/2D/controls/sliders/slider.js.map +1 -0
- package/2D/controls/stackPanel.d.ts +64 -0
- package/2D/controls/stackPanel.js +244 -0
- package/2D/controls/stackPanel.js.map +1 -0
- package/2D/controls/statics.d.ts +6 -0
- package/2D/controls/statics.js +50 -0
- package/2D/controls/statics.js.map +1 -0
- package/2D/controls/textBlock.d.ts +219 -0
- package/2D/controls/textBlock.js +670 -0
- package/2D/controls/textBlock.js.map +1 -0
- package/2D/controls/textWrapper.d.ts +13 -0
- package/2D/controls/textWrapper.js +88 -0
- package/2D/controls/textWrapper.js.map +1 -0
- package/2D/controls/toggleButton.d.ts +93 -0
- package/2D/controls/toggleButton.js +229 -0
- package/2D/controls/toggleButton.js.map +1 -0
- package/2D/controls/virtualKeyboard.d.ts +102 -0
- package/2D/controls/virtualKeyboard.js +275 -0
- package/2D/controls/virtualKeyboard.js.map +1 -0
- package/2D/index.d.ts +11 -0
- package/2D/index.js +13 -0
- package/2D/index.js.map +1 -0
- package/2D/math2D.d.ts +136 -0
- package/2D/math2D.js +235 -0
- package/2D/math2D.js.map +1 -0
- package/2D/measure.d.ts +77 -0
- package/2D/measure.js +138 -0
- package/2D/measure.js.map +1 -0
- package/2D/multiLinePoint.d.ts +47 -0
- package/2D/multiLinePoint.js +110 -0
- package/2D/multiLinePoint.js.map +1 -0
- package/2D/style.d.ts +46 -0
- package/2D/style.js +80 -0
- package/2D/style.js.map +1 -0
- package/2D/valueAndUnit.d.ts +89 -0
- package/2D/valueAndUnit.js +194 -0
- package/2D/valueAndUnit.js.map +1 -0
- package/2D/xmlLoader.d.ts +60 -0
- package/2D/xmlLoader.js +348 -0
- package/2D/xmlLoader.js.map +1 -0
- package/3D/behaviors/defaultBehavior.d.ts +73 -0
- package/3D/behaviors/defaultBehavior.js +103 -0
- package/3D/behaviors/defaultBehavior.js.map +1 -0
- package/3D/controls/MRTK3/touchHolographicButton.d.ts +220 -0
- package/3D/controls/MRTK3/touchHolographicButton.js +868 -0
- package/3D/controls/MRTK3/touchHolographicButton.js.map +1 -0
- package/3D/controls/abstractButton3D.d.ts +15 -0
- package/3D/controls/abstractButton3D.js +22 -0
- package/3D/controls/abstractButton3D.js.map +1 -0
- package/3D/controls/button3D.d.ts +51 -0
- package/3D/controls/button3D.js +98 -0
- package/3D/controls/button3D.js.map +1 -0
- package/3D/controls/container3D.d.ts +72 -0
- package/3D/controls/container3D.js +126 -0
- package/3D/controls/container3D.js.map +1 -0
- package/3D/controls/contentDisplay3D.d.ts +42 -0
- package/3D/controls/contentDisplay3D.js +81 -0
- package/3D/controls/contentDisplay3D.js.map +1 -0
- package/3D/controls/control3D.d.ts +183 -0
- package/3D/controls/control3D.js +401 -0
- package/3D/controls/control3D.js.map +1 -0
- package/3D/controls/cylinderPanel.d.ts +17 -0
- package/3D/controls/cylinderPanel.js +57 -0
- package/3D/controls/cylinderPanel.js.map +1 -0
- package/3D/controls/handMenu.d.ts +28 -0
- package/3D/controls/handMenu.js +39 -0
- package/3D/controls/handMenu.js.map +1 -0
- package/3D/controls/holographicBackplate.d.ts +49 -0
- package/3D/controls/holographicBackplate.js +104 -0
- package/3D/controls/holographicBackplate.js.map +1 -0
- package/3D/controls/holographicButton.d.ts +84 -0
- package/3D/controls/holographicButton.js +300 -0
- package/3D/controls/holographicButton.js.map +1 -0
- package/3D/controls/holographicSlate.d.ts +134 -0
- package/3D/controls/holographicSlate.js +413 -0
- package/3D/controls/holographicSlate.js.map +1 -0
- package/3D/controls/index.d.ts +22 -0
- package/3D/controls/index.js +24 -0
- package/3D/controls/index.js.map +1 -0
- package/3D/controls/meshButton3D.d.ts +21 -0
- package/3D/controls/meshButton3D.js +58 -0
- package/3D/controls/meshButton3D.js.map +1 -0
- package/3D/controls/nearMenu.d.ts +44 -0
- package/3D/controls/nearMenu.js +103 -0
- package/3D/controls/nearMenu.js.map +1 -0
- package/3D/controls/planePanel.d.ts +9 -0
- package/3D/controls/planePanel.js +30 -0
- package/3D/controls/planePanel.js.map +1 -0
- package/3D/controls/scatterPanel.d.ts +18 -0
- package/3D/controls/scatterPanel.js +98 -0
- package/3D/controls/scatterPanel.js.map +1 -0
- package/3D/controls/slider3D.d.ts +95 -0
- package/3D/controls/slider3D.js +256 -0
- package/3D/controls/slider3D.js.map +1 -0
- package/3D/controls/spherePanel.d.ts +17 -0
- package/3D/controls/spherePanel.js +58 -0
- package/3D/controls/spherePanel.js.map +1 -0
- package/3D/controls/stackPanel3D.d.ts +22 -0
- package/3D/controls/stackPanel3D.js +95 -0
- package/3D/controls/stackPanel3D.js.map +1 -0
- package/3D/controls/touchButton3D.d.ts +77 -0
- package/3D/controls/touchButton3D.js +205 -0
- package/3D/controls/touchButton3D.js.map +1 -0
- package/3D/controls/touchHolographicButton.d.ts +110 -0
- package/3D/controls/touchHolographicButton.js +400 -0
- package/3D/controls/touchHolographicButton.js.map +1 -0
- package/3D/controls/touchHolographicMenu.d.ts +61 -0
- package/3D/controls/touchHolographicMenu.js +139 -0
- package/3D/controls/touchHolographicMenu.js.map +1 -0
- package/3D/controls/touchMeshButton3D.d.ts +21 -0
- package/3D/controls/touchMeshButton3D.js +58 -0
- package/3D/controls/touchMeshButton3D.js.map +1 -0
- package/3D/controls/volumeBasedPanel.d.ts +53 -0
- package/3D/controls/volumeBasedPanel.js +158 -0
- package/3D/controls/volumeBasedPanel.js.map +1 -0
- package/3D/gizmos/gizmoHandle.d.ts +108 -0
- package/3D/gizmos/gizmoHandle.js +175 -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 +57 -0
- package/3D/gizmos/slateGizmo.js +353 -0
- package/3D/gizmos/slateGizmo.js.map +1 -0
- package/3D/gui3DManager.d.ts +94 -0
- package/3D/gui3DManager.js +233 -0
- package/3D/gui3DManager.js.map +1 -0
- package/3D/index.d.ts +5 -0
- package/3D/index.js +7 -0
- package/3D/index.js.map +1 -0
- package/3D/materials/fluent/fluentMaterial.d.ts +91 -0
- package/3D/materials/fluent/fluentMaterial.js +286 -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/fluent/shaders/fluent.fragment.d.ts +5 -0
- package/3D/materials/fluent/shaders/fluent.fragment.js +41 -0
- package/3D/materials/fluent/shaders/fluent.fragment.js.map +1 -0
- package/3D/materials/fluent/shaders/fluent.vertex.d.ts +5 -0
- package/3D/materials/fluent/shaders/fluent.vertex.js +40 -0
- package/3D/materials/fluent/shaders/fluent.vertex.js.map +1 -0
- package/3D/materials/fluentBackplate/fluentBackplateMaterial.d.ts +155 -0
- package/3D/materials/fluentBackplate/fluentBackplateMaterial.js +466 -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 +60 -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 +127 -0
- package/3D/materials/fluentBackplate/shaders/fluentBackplate.vertex.js.map +1 -0
- package/3D/materials/fluentButton/fluentButtonMaterial.d.ts +190 -0
- package/3D/materials/fluentButton/fluentButtonMaterial.js +536 -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 +57 -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 +162 -0
- package/3D/materials/fluentButton/shaders/fluentButton.vertex.js.map +1 -0
- package/3D/materials/fluentMaterial.d.ts +4 -0
- package/3D/materials/fluentMaterial.js +5 -0
- package/3D/materials/fluentMaterial.js.map +1 -0
- package/3D/materials/handle/handleMaterial.d.ts +68 -0
- package/3D/materials/handle/handleMaterial.js +114 -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 +11 -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 +11 -0
- package/3D/materials/handle/shaders/handle.vertex.js.map +1 -0
- package/3D/materials/index.d.ts +5 -0
- package/3D/materials/index.js +7 -0
- package/3D/materials/index.js.map +1 -0
- 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/mrdlBackglowMaterial.d.ts +87 -0
- package/3D/materials/mrdl/mrdlBackglowMaterial.js +302 -0
- package/3D/materials/mrdl/mrdlBackglowMaterial.js.map +1 -0
- package/3D/materials/mrdl/mrdlBackplateMaterial.d.ts +148 -0
- package/3D/materials/mrdl/mrdlBackplateMaterial.js +433 -0
- package/3D/materials/mrdl/mrdlBackplateMaterial.js.map +1 -0
- package/3D/materials/mrdl/mrdlFrontplateMaterial.d.ts +186 -0
- package/3D/materials/mrdl/mrdlFrontplateMaterial.js +532 -0
- package/3D/materials/mrdl/mrdlFrontplateMaterial.js.map +1 -0
- package/3D/materials/mrdl/mrdlInnerquadMaterial.d.ts +56 -0
- package/3D/materials/mrdl/mrdlInnerquadMaterial.js +230 -0
- package/3D/materials/mrdl/mrdlInnerquadMaterial.js.map +1 -0
- package/3D/materials/mrdl/mrdlSliderBarMaterial.d.ts +337 -0
- package/3D/materials/mrdl/mrdlSliderBarMaterial.js +855 -0
- package/3D/materials/mrdl/mrdlSliderBarMaterial.js.map +1 -0
- package/3D/materials/mrdl/mrdlSliderThumbMaterial.d.ts +337 -0
- package/3D/materials/mrdl/mrdlSliderThumbMaterial.js +855 -0
- package/3D/materials/mrdl/mrdlSliderThumbMaterial.js.map +1 -0
- package/3D/materials/mrdl/shaders/mrdlBackglow.fragment.d.ts +5 -0
- package/3D/materials/mrdl/shaders/mrdlBackglow.fragment.js +25 -0
- package/3D/materials/mrdl/shaders/mrdlBackglow.fragment.js.map +1 -0
- package/3D/materials/mrdl/shaders/mrdlBackglow.vertex.d.ts +5 -0
- package/3D/materials/mrdl/shaders/mrdlBackglow.vertex.js +12 -0
- package/3D/materials/mrdl/shaders/mrdlBackglow.vertex.js.map +1 -0
- package/3D/materials/mrdl/shaders/mrdlBackplate.fragment.d.ts +5 -0
- package/3D/materials/mrdl/shaders/mrdlBackplate.fragment.js +88 -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 +96 -0
- package/3D/materials/mrdl/shaders/mrdlBackplate.vertex.js.map +1 -0
- package/3D/materials/mrdl/shaders/mrdlFrontplate.fragment.d.ts +5 -0
- package/3D/materials/mrdl/shaders/mrdlFrontplate.fragment.js +48 -0
- package/3D/materials/mrdl/shaders/mrdlFrontplate.fragment.js.map +1 -0
- package/3D/materials/mrdl/shaders/mrdlFrontplate.vertex.d.ts +5 -0
- package/3D/materials/mrdl/shaders/mrdlFrontplate.vertex.js +158 -0
- package/3D/materials/mrdl/shaders/mrdlFrontplate.vertex.js.map +1 -0
- package/3D/materials/mrdl/shaders/mrdlInnerquad.fragment.d.ts +5 -0
- package/3D/materials/mrdl/shaders/mrdlInnerquad.fragment.js +27 -0
- package/3D/materials/mrdl/shaders/mrdlInnerquad.fragment.js.map +1 -0
- package/3D/materials/mrdl/shaders/mrdlInnerquad.vertex.d.ts +5 -0
- package/3D/materials/mrdl/shaders/mrdlInnerquad.vertex.js +13 -0
- package/3D/materials/mrdl/shaders/mrdlInnerquad.vertex.js.map +1 -0
- package/3D/materials/mrdl/shaders/mrdlSliderBar.fragment.d.ts +5 -0
- package/3D/materials/mrdl/shaders/mrdlSliderBar.fragment.js +236 -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 +137 -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 +236 -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 +137 -0
- package/3D/materials/mrdl/shaders/mrdlSliderThumb.vertex.js.map +1 -0
- package/3D/vector3WithInfo.d.ts +16 -0
- package/3D/vector3WithInfo.js +18 -0
- package/3D/vector3WithInfo.js.map +1 -0
- package/index.d.ts +2 -0
- package/index.js +4 -0
- package/index.js.map +1 -0
- package/legacy/legacy.d.ts +1 -0
- package/legacy/legacy.js +17 -0
- package/legacy/legacy.js.map +1 -0
- package/license.md +71 -0
- package/package.json +47 -0
- package/readme.md +31 -0
|
@@ -0,0 +1,548 @@
|
|
|
1
|
+
import type { Nullable } from "@babylonjs/core/types.js";
|
|
2
|
+
import { Observable } from "@babylonjs/core/Misc/observable.js";
|
|
3
|
+
import type { Matrix } from "@babylonjs/core/Maths/math.vector.js";
|
|
4
|
+
import { Vector2, Vector3 } from "@babylonjs/core/Maths/math.vector.js";
|
|
5
|
+
import type { PointerInfoPre } from "@babylonjs/core/Events/pointerEvents.js";
|
|
6
|
+
import { ClipboardInfo } from "@babylonjs/core/Events/clipboardEvents.js";
|
|
7
|
+
import type { Camera } from "@babylonjs/core/Cameras/camera.js";
|
|
8
|
+
import type { IDynamicTextureOptions } from "@babylonjs/core/Materials/Textures/dynamicTexture.js";
|
|
9
|
+
import { DynamicTexture } from "@babylonjs/core/Materials/Textures/dynamicTexture.js";
|
|
10
|
+
import type { AbstractMesh } from "@babylonjs/core/Meshes/abstractMesh.js";
|
|
11
|
+
import { Layer } from "@babylonjs/core/Layers/layer.js";
|
|
12
|
+
import type { Scene } from "@babylonjs/core/scene.js";
|
|
13
|
+
import { Container } from "./controls/container.js";
|
|
14
|
+
import { Control } from "./controls/control.js";
|
|
15
|
+
import { Style } from "./style.js";
|
|
16
|
+
import { Viewport } from "@babylonjs/core/Maths/math.viewport.js";
|
|
17
|
+
/**
|
|
18
|
+
* Interface used to define options to create an AdvancedDynamicTexture
|
|
19
|
+
*/
|
|
20
|
+
export interface IAdvancedDynamicTextureOptions extends IDynamicTextureOptions {
|
|
21
|
+
/**
|
|
22
|
+
* Indicates whether the ADT will be used autonomously. In this mode:
|
|
23
|
+
* - _checkUpdate() is not called
|
|
24
|
+
* - the layer is not rendered (so, the ADT is not visible)
|
|
25
|
+
* It's up to the user to perform the required calls manually to update the ADT.
|
|
26
|
+
*/
|
|
27
|
+
useStandalone?: boolean;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Class used to create texture to support 2D GUI elements
|
|
31
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui
|
|
32
|
+
*/
|
|
33
|
+
export declare class AdvancedDynamicTexture extends DynamicTexture {
|
|
34
|
+
/** Define the url to load snippets */
|
|
35
|
+
static SnippetUrl: string;
|
|
36
|
+
/** Indicates if some optimizations can be performed in GUI GPU management (the downside is additional memory/GPU texture memory used) */
|
|
37
|
+
static AllowGPUOptimizations: boolean;
|
|
38
|
+
/** Indicates whether the ADT is used autonomously */
|
|
39
|
+
readonly useStandalone: boolean;
|
|
40
|
+
/** Snippet ID if the content was created from the snippet server */
|
|
41
|
+
snippetId: string;
|
|
42
|
+
/** Observable that fires when the GUI is ready */
|
|
43
|
+
onGuiReadyObservable: Observable<AdvancedDynamicTexture>;
|
|
44
|
+
private _isDirty;
|
|
45
|
+
private _renderObserver;
|
|
46
|
+
private _resizeObserver;
|
|
47
|
+
private _preKeyboardObserver;
|
|
48
|
+
private _prePointerObserver;
|
|
49
|
+
private _sceneRenderObserver;
|
|
50
|
+
private _pointerObserver;
|
|
51
|
+
private _canvasPointerOutObserver;
|
|
52
|
+
private _canvasBlurObserver;
|
|
53
|
+
private _controlAddedObserver;
|
|
54
|
+
private _controlRemovedObserver;
|
|
55
|
+
private _background;
|
|
56
|
+
/** @internal */
|
|
57
|
+
_rootContainer: Container;
|
|
58
|
+
/** @internal */
|
|
59
|
+
_lastPickedControl: Control;
|
|
60
|
+
/** @internal */
|
|
61
|
+
_lastControlOver: {
|
|
62
|
+
[pointerId: number]: Control;
|
|
63
|
+
};
|
|
64
|
+
/** @internal */
|
|
65
|
+
_lastControlDown: {
|
|
66
|
+
[pointerId: number]: Control;
|
|
67
|
+
};
|
|
68
|
+
/** @internal */
|
|
69
|
+
_capturingControl: {
|
|
70
|
+
[pointerId: number]: Control;
|
|
71
|
+
};
|
|
72
|
+
/** @internal */
|
|
73
|
+
_shouldBlockPointer: boolean;
|
|
74
|
+
/** @internal */
|
|
75
|
+
_layerToDispose: Nullable<Layer>;
|
|
76
|
+
/** @internal */
|
|
77
|
+
_linkedControls: Control[];
|
|
78
|
+
/** @internal */
|
|
79
|
+
_isFullscreen: boolean;
|
|
80
|
+
private _fullscreenViewport;
|
|
81
|
+
private _idealWidth;
|
|
82
|
+
private _idealHeight;
|
|
83
|
+
private _useSmallestIdeal;
|
|
84
|
+
private _renderAtIdealSize;
|
|
85
|
+
private _focusedControl;
|
|
86
|
+
private _blockNextFocusCheck;
|
|
87
|
+
private _renderScale;
|
|
88
|
+
private _rootElement;
|
|
89
|
+
private _cursorChanged;
|
|
90
|
+
private _defaultMousePointerId;
|
|
91
|
+
private _rootChildrenHaveChanged;
|
|
92
|
+
private _adjustToEngineHardwareScalingLevel;
|
|
93
|
+
/** @internal */
|
|
94
|
+
_capturedPointerIds: Set<number>;
|
|
95
|
+
/** @internal */
|
|
96
|
+
_numLayoutCalls: number;
|
|
97
|
+
/** Gets the number of layout calls made the last time the ADT has been rendered */
|
|
98
|
+
get numLayoutCalls(): number;
|
|
99
|
+
/** @internal */
|
|
100
|
+
_numRenderCalls: number;
|
|
101
|
+
/** Gets the number of render calls made the last time the ADT has been rendered */
|
|
102
|
+
get numRenderCalls(): number;
|
|
103
|
+
/**
|
|
104
|
+
* Define type to string to ensure compatibility across browsers
|
|
105
|
+
* Safari doesn't support DataTransfer constructor
|
|
106
|
+
*/
|
|
107
|
+
private _clipboardData;
|
|
108
|
+
/**
|
|
109
|
+
* Observable event triggered each time an clipboard event is received from the rendering canvas
|
|
110
|
+
*/
|
|
111
|
+
onClipboardObservable: Observable<ClipboardInfo>;
|
|
112
|
+
/**
|
|
113
|
+
* Observable event triggered each time a pointer down is intercepted by a control
|
|
114
|
+
*/
|
|
115
|
+
onControlPickedObservable: Observable<Control>;
|
|
116
|
+
/**
|
|
117
|
+
* Observable event triggered before layout is evaluated
|
|
118
|
+
*/
|
|
119
|
+
onBeginLayoutObservable: Observable<AdvancedDynamicTexture>;
|
|
120
|
+
/**
|
|
121
|
+
* Observable event triggered after the layout was evaluated
|
|
122
|
+
*/
|
|
123
|
+
onEndLayoutObservable: Observable<AdvancedDynamicTexture>;
|
|
124
|
+
/**
|
|
125
|
+
* Observable event triggered before the texture is rendered
|
|
126
|
+
*/
|
|
127
|
+
onBeginRenderObservable: Observable<AdvancedDynamicTexture>;
|
|
128
|
+
/**
|
|
129
|
+
* Observable event triggered after the texture was rendered
|
|
130
|
+
*/
|
|
131
|
+
onEndRenderObservable: Observable<AdvancedDynamicTexture>;
|
|
132
|
+
/**
|
|
133
|
+
* Gets or sets a boolean defining if alpha is stored as premultiplied
|
|
134
|
+
*/
|
|
135
|
+
premulAlpha: boolean;
|
|
136
|
+
/**
|
|
137
|
+
* Gets or sets a boolean indicating that the canvas must be reverted on Y when updating the texture
|
|
138
|
+
*/
|
|
139
|
+
applyYInversionOnUpdate: boolean;
|
|
140
|
+
/**
|
|
141
|
+
* A boolean indicating whether or not the elements can be navigated to using the tab key.
|
|
142
|
+
* Defaults to false.
|
|
143
|
+
*/
|
|
144
|
+
disableTabNavigation: boolean;
|
|
145
|
+
/**
|
|
146
|
+
* A boolean indicating whether controls can be picked/clicked on or not. Defaults to false.
|
|
147
|
+
*/
|
|
148
|
+
disablePicking: boolean;
|
|
149
|
+
/**
|
|
150
|
+
* If set to true, the POINTERTAP event type will be used for "click", instead of POINTERUP
|
|
151
|
+
*/
|
|
152
|
+
usePointerTapForClickEvent: boolean;
|
|
153
|
+
/**
|
|
154
|
+
* If set to true, the renderScale will be adjusted automatically to the engine's hardware scaling
|
|
155
|
+
* If this is set to true, manually setting the renderScale will be ignored
|
|
156
|
+
* This is useful when the engine's hardware scaling is set to a value other than 1
|
|
157
|
+
*/
|
|
158
|
+
get adjustToEngineHardwareScalingLevel(): boolean;
|
|
159
|
+
set adjustToEngineHardwareScalingLevel(value: boolean);
|
|
160
|
+
/**
|
|
161
|
+
* Gets or sets a number used to scale rendering size (2 means that the texture will be twice bigger).
|
|
162
|
+
* Useful when you want more antialiasing
|
|
163
|
+
*/
|
|
164
|
+
get renderScale(): number;
|
|
165
|
+
set renderScale(value: number);
|
|
166
|
+
/** Gets or sets the background color */
|
|
167
|
+
get background(): string;
|
|
168
|
+
set background(value: string);
|
|
169
|
+
/**
|
|
170
|
+
* Gets or sets the ideal width used to design controls.
|
|
171
|
+
* The GUI will then rescale everything accordingly
|
|
172
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#adaptive-scaling
|
|
173
|
+
*/
|
|
174
|
+
get idealWidth(): number;
|
|
175
|
+
set idealWidth(value: number);
|
|
176
|
+
/**
|
|
177
|
+
* Gets or sets the ideal height used to design controls.
|
|
178
|
+
* The GUI will then rescale everything accordingly
|
|
179
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#adaptive-scaling
|
|
180
|
+
*/
|
|
181
|
+
get idealHeight(): number;
|
|
182
|
+
set idealHeight(value: number);
|
|
183
|
+
/**
|
|
184
|
+
* Gets or sets a boolean indicating if the smallest ideal value must be used if idealWidth and idealHeight are both set
|
|
185
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#adaptive-scaling
|
|
186
|
+
*/
|
|
187
|
+
get useSmallestIdeal(): boolean;
|
|
188
|
+
set useSmallestIdeal(value: boolean);
|
|
189
|
+
/**
|
|
190
|
+
* Gets or sets a boolean indicating if adaptive scaling must be used
|
|
191
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#adaptive-scaling
|
|
192
|
+
*/
|
|
193
|
+
get renderAtIdealSize(): boolean;
|
|
194
|
+
set renderAtIdealSize(value: boolean);
|
|
195
|
+
/**
|
|
196
|
+
* Gets the ratio used when in "ideal mode"
|
|
197
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#adaptive-scaling
|
|
198
|
+
* */
|
|
199
|
+
get idealRatio(): number;
|
|
200
|
+
/**
|
|
201
|
+
* Gets the underlying layer used to render the texture when in fullscreen mode
|
|
202
|
+
*/
|
|
203
|
+
get layer(): Nullable<Layer>;
|
|
204
|
+
/**
|
|
205
|
+
* Gets the root container control
|
|
206
|
+
*/
|
|
207
|
+
get rootContainer(): Container;
|
|
208
|
+
/**
|
|
209
|
+
* Returns an array containing the root container.
|
|
210
|
+
* This is mostly used to let the Inspector introspects the ADT
|
|
211
|
+
* @returns an array containing the rootContainer
|
|
212
|
+
*/
|
|
213
|
+
getChildren(): Array<Container>;
|
|
214
|
+
/**
|
|
215
|
+
* Will return all controls that are inside this texture
|
|
216
|
+
* @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
|
|
217
|
+
* @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
|
|
218
|
+
* @returns all child controls
|
|
219
|
+
*/
|
|
220
|
+
getDescendants(directDescendantsOnly?: boolean, predicate?: (control: Control) => boolean): Control[];
|
|
221
|
+
/**
|
|
222
|
+
* Will return all controls with the given type name
|
|
223
|
+
* @param typeName defines the type name to search for
|
|
224
|
+
* @returns an array of all controls found
|
|
225
|
+
*/
|
|
226
|
+
getControlsByType(typeName: string): Control[];
|
|
227
|
+
/**
|
|
228
|
+
* Will return the first control with the given name
|
|
229
|
+
* @param name defines the name to search for
|
|
230
|
+
* @returns the first control found or null
|
|
231
|
+
*/
|
|
232
|
+
getControlByName(name: string): Nullable<Control>;
|
|
233
|
+
private _getControlByKey;
|
|
234
|
+
/**
|
|
235
|
+
* Gets or sets the current focused control
|
|
236
|
+
*/
|
|
237
|
+
get focusedControl(): Nullable<Control>;
|
|
238
|
+
set focusedControl(control: Nullable<Control>);
|
|
239
|
+
/**
|
|
240
|
+
* Gets or sets a boolean indicating if the texture must be rendered in background or foreground when in fullscreen mode
|
|
241
|
+
*/
|
|
242
|
+
get isForeground(): boolean;
|
|
243
|
+
set isForeground(value: boolean);
|
|
244
|
+
/**
|
|
245
|
+
* Gets or set information about clipboardData
|
|
246
|
+
*/
|
|
247
|
+
get clipboardData(): string;
|
|
248
|
+
set clipboardData(value: string);
|
|
249
|
+
/**
|
|
250
|
+
* If this is set, even when a control is pointer blocker, some events can still be passed through to the scene.
|
|
251
|
+
* Options from values are PointerEventTypes
|
|
252
|
+
* POINTERDOWN, POINTERUP, POINTERMOVE, POINTERWHEEL, POINTERPICK, POINTERTAP, POINTERDOUBLETAP
|
|
253
|
+
*/
|
|
254
|
+
skipBlockEvents: number;
|
|
255
|
+
/**
|
|
256
|
+
* If set to true, every scene render will trigger a pointer event for the GUI
|
|
257
|
+
* if it is linked to a mesh or has controls linked to a mesh. This will allow
|
|
258
|
+
* you to catch the pointer moving around the GUI due to camera or mesh movements,
|
|
259
|
+
* but it has a performance cost.
|
|
260
|
+
*/
|
|
261
|
+
checkPointerEveryFrame: boolean;
|
|
262
|
+
/**
|
|
263
|
+
* Creates a new AdvancedDynamicTexture
|
|
264
|
+
* @param name defines the name of the texture
|
|
265
|
+
* @param options The options to be used when constructing the ADT
|
|
266
|
+
*/
|
|
267
|
+
constructor(name: string, options?: IAdvancedDynamicTextureOptions);
|
|
268
|
+
constructor(name: string, width?: number, height?: number, scene?: Nullable<Scene>, generateMipMaps?: boolean, samplingMode?: number, invertY?: boolean);
|
|
269
|
+
/**
|
|
270
|
+
* Get the current class name of the texture useful for serialization or dynamic coding.
|
|
271
|
+
* @returns "AdvancedDynamicTexture"
|
|
272
|
+
*/
|
|
273
|
+
getClassName(): string;
|
|
274
|
+
/**
|
|
275
|
+
* Function used to execute a function on all controls
|
|
276
|
+
* @param func defines the function to execute
|
|
277
|
+
* @param container defines the container where controls belong. If null the root container will be used
|
|
278
|
+
*/
|
|
279
|
+
executeOnAllControls(func: (control: Control) => void, container?: Container): void;
|
|
280
|
+
private _useInvalidateRectOptimization;
|
|
281
|
+
/**
|
|
282
|
+
* Gets or sets a boolean indicating if the InvalidateRect optimization should be turned on
|
|
283
|
+
*/
|
|
284
|
+
get useInvalidateRectOptimization(): boolean;
|
|
285
|
+
set useInvalidateRectOptimization(value: boolean);
|
|
286
|
+
private _invalidatedRectangle;
|
|
287
|
+
/**
|
|
288
|
+
* Invalidates a rectangle area on the gui texture
|
|
289
|
+
* @param invalidMinX left most position of the rectangle to invalidate in the texture
|
|
290
|
+
* @param invalidMinY top most position of the rectangle to invalidate in the texture
|
|
291
|
+
* @param invalidMaxX right most position of the rectangle to invalidate in the texture
|
|
292
|
+
* @param invalidMaxY bottom most position of the rectangle to invalidate in the texture
|
|
293
|
+
*/
|
|
294
|
+
invalidateRect(invalidMinX: number, invalidMinY: number, invalidMaxX: number, invalidMaxY: number): void;
|
|
295
|
+
/**
|
|
296
|
+
* Marks the texture as dirty forcing a complete update
|
|
297
|
+
*/
|
|
298
|
+
markAsDirty(): void;
|
|
299
|
+
/**
|
|
300
|
+
* Helper function used to create a new style
|
|
301
|
+
* @returns a new style
|
|
302
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#styles
|
|
303
|
+
*/
|
|
304
|
+
createStyle(): Style;
|
|
305
|
+
/**
|
|
306
|
+
* Adds a new control to the root container
|
|
307
|
+
* @param control defines the control to add
|
|
308
|
+
* @returns the current texture
|
|
309
|
+
*/
|
|
310
|
+
addControl(control: Control): AdvancedDynamicTexture;
|
|
311
|
+
/**
|
|
312
|
+
* Removes a control from the root container
|
|
313
|
+
* @param control defines the control to remove
|
|
314
|
+
* @returns the current texture
|
|
315
|
+
*/
|
|
316
|
+
removeControl(control: Control): AdvancedDynamicTexture;
|
|
317
|
+
/**
|
|
318
|
+
* Moves overlapped controls towards a position where it is not overlapping anymore.
|
|
319
|
+
* Please note that this method alters linkOffsetXInPixels and linkOffsetYInPixels.
|
|
320
|
+
* @param overlapGroup the overlap group which will be processed or undefined to process all overlap groups
|
|
321
|
+
* @param deltaStep the step size (speed) to reach the target non overlapping position (default 0.1)
|
|
322
|
+
* @param repelFactor how much is the control repelled by other controls
|
|
323
|
+
*/
|
|
324
|
+
moveToNonOverlappedPosition(overlapGroup?: number | Control[], deltaStep?: number, repelFactor?: number): void;
|
|
325
|
+
/**
|
|
326
|
+
* Release all resources
|
|
327
|
+
*/
|
|
328
|
+
dispose(): void;
|
|
329
|
+
private _alreadyRegisteredForRender;
|
|
330
|
+
private _onResize;
|
|
331
|
+
/** @internal */
|
|
332
|
+
_getGlobalViewport(): Viewport;
|
|
333
|
+
/**
|
|
334
|
+
* Get screen coordinates for a vector3
|
|
335
|
+
* @param position defines the position to project
|
|
336
|
+
* @param worldMatrix defines the world matrix to use
|
|
337
|
+
* @returns the projected position
|
|
338
|
+
*/
|
|
339
|
+
getProjectedPosition(position: Vector3, worldMatrix: Matrix): Vector2;
|
|
340
|
+
/**
|
|
341
|
+
* Get screen coordinates for a vector3
|
|
342
|
+
* @param position defines the position to project
|
|
343
|
+
* @param worldMatrix defines the world matrix to use
|
|
344
|
+
* @returns the projected position with Z
|
|
345
|
+
*/
|
|
346
|
+
getProjectedPositionWithZ(position: Vector3, worldMatrix: Matrix): Vector3;
|
|
347
|
+
/** @internal */
|
|
348
|
+
_checkUpdate(camera: Nullable<Camera>, skipUpdate?: boolean): void;
|
|
349
|
+
private _clearMeasure;
|
|
350
|
+
private _render;
|
|
351
|
+
/**
|
|
352
|
+
* @internal
|
|
353
|
+
*/
|
|
354
|
+
_changeCursor(cursor: string): void;
|
|
355
|
+
/**
|
|
356
|
+
* @internal
|
|
357
|
+
*/
|
|
358
|
+
_registerLastControlDown(control: Control, pointerId: number): void;
|
|
359
|
+
private _doPicking;
|
|
360
|
+
/**
|
|
361
|
+
* @internal
|
|
362
|
+
*/
|
|
363
|
+
_cleanControlAfterRemovalFromList(list: {
|
|
364
|
+
[pointerId: number]: Control;
|
|
365
|
+
}, control: Control): void;
|
|
366
|
+
/**
|
|
367
|
+
* @internal
|
|
368
|
+
*/
|
|
369
|
+
_cleanControlAfterRemoval(control: Control): void;
|
|
370
|
+
/**
|
|
371
|
+
* This function will run a pointer event on this ADT and will trigger any pointer events on any controls
|
|
372
|
+
* This will work on a fullscreen ADT only. For mesh based ADT, simulate pointer events using the scene directly.
|
|
373
|
+
* @param x pointer X on the canvas for the picking
|
|
374
|
+
* @param y pointer Y on the canvas for the picking
|
|
375
|
+
* @param pi optional pointer information
|
|
376
|
+
*/
|
|
377
|
+
pick(x: number, y: number, pi?: Nullable<PointerInfoPre>): void;
|
|
378
|
+
private _translateToPicking;
|
|
379
|
+
/** Attach to all scene events required to support pointer events */
|
|
380
|
+
attach(): void;
|
|
381
|
+
private _focusProperties;
|
|
382
|
+
private _focusNextElement;
|
|
383
|
+
/**
|
|
384
|
+
* @internal
|
|
385
|
+
*/
|
|
386
|
+
private _onClipboardCopy;
|
|
387
|
+
/**
|
|
388
|
+
* @internal
|
|
389
|
+
*/
|
|
390
|
+
private _onClipboardCut;
|
|
391
|
+
/**
|
|
392
|
+
* @internal
|
|
393
|
+
*/
|
|
394
|
+
private _onClipboardPaste;
|
|
395
|
+
/**
|
|
396
|
+
* Register the clipboard Events onto the canvas
|
|
397
|
+
*/
|
|
398
|
+
registerClipboardEvents(): void;
|
|
399
|
+
/**
|
|
400
|
+
* Unregister the clipboard Events from the canvas
|
|
401
|
+
*/
|
|
402
|
+
unRegisterClipboardEvents(): void;
|
|
403
|
+
/**
|
|
404
|
+
* Transform uvs from mesh space to texture space, taking the texture into account
|
|
405
|
+
* @param uv the uvs in mesh space
|
|
406
|
+
* @returns the uvs in texture space
|
|
407
|
+
*/
|
|
408
|
+
private _transformUvs;
|
|
409
|
+
/**
|
|
410
|
+
* Connect the texture to a hosting mesh to enable interactions
|
|
411
|
+
* @param mesh defines the mesh to attach to
|
|
412
|
+
* @param supportPointerMove defines a boolean indicating if pointer move events must be catched as well
|
|
413
|
+
*/
|
|
414
|
+
attachToMesh(mesh: AbstractMesh, supportPointerMove?: boolean): void;
|
|
415
|
+
/**
|
|
416
|
+
* Move the focus to a specific control
|
|
417
|
+
* @param control defines the control which will receive the focus
|
|
418
|
+
*/
|
|
419
|
+
moveFocusToControl(control: Control): void;
|
|
420
|
+
private _manageFocus;
|
|
421
|
+
private _attachPickingToSceneRender;
|
|
422
|
+
private _attachToOnPointerOut;
|
|
423
|
+
private _attachToOnBlur;
|
|
424
|
+
/**
|
|
425
|
+
* Serializes the entire GUI system
|
|
426
|
+
* @returns an object with the JSON serialized data
|
|
427
|
+
*/
|
|
428
|
+
serializeContent(): any;
|
|
429
|
+
/**
|
|
430
|
+
* Recreate the content of the ADT from a JSON object
|
|
431
|
+
* @param serializedObject define the JSON serialized object to restore from
|
|
432
|
+
* @param scaleToSize defines whether to scale to texture to the saved size
|
|
433
|
+
* @param urlRewriter defines an url rewriter to update urls before sending them to the controls
|
|
434
|
+
*/
|
|
435
|
+
parseSerializedObject(serializedObject: any, scaleToSize?: boolean, urlRewriter?: (url: string) => string): void;
|
|
436
|
+
/**
|
|
437
|
+
* Clones the ADT. If no mesh is defined, the GUI will be considered as a fullscreen GUI
|
|
438
|
+
* @param newName defines the name of the new ADT
|
|
439
|
+
* @param attachToMesh defines if the new ADT should be attached to a mesh
|
|
440
|
+
* @returns the clone of the ADT
|
|
441
|
+
*/
|
|
442
|
+
clone(newName?: string, attachToMesh?: AbstractMesh): AdvancedDynamicTexture;
|
|
443
|
+
/**
|
|
444
|
+
* Recreate the content of the ADT from a JSON object
|
|
445
|
+
* @param serializedObject define the JSON serialized object to restore from
|
|
446
|
+
* @param scaleToSize defines whether to scale to texture to the saved size
|
|
447
|
+
* @param urlRewriter defines an url rewriter to update urls before sending them to the controls
|
|
448
|
+
* @deprecated Please use parseSerializedObject instead
|
|
449
|
+
*/
|
|
450
|
+
parseContent: (serializedObject: any, scaleToSize?: boolean, urlRewriter?: (url: string) => string) => void;
|
|
451
|
+
/**
|
|
452
|
+
* Recreate the content of the ADT from a snippet saved by the GUI editor
|
|
453
|
+
* @param snippetId defines the snippet to load
|
|
454
|
+
* @param scaleToSize defines whether to scale to texture to the saved size
|
|
455
|
+
* @param appendToAdt if provided the snippet will be appended to the adt. Otherwise a fullscreen ADT will be created.
|
|
456
|
+
* @param urlRewriter defines an url rewriter to update urls before sending them to the controls
|
|
457
|
+
* @returns a promise that will resolve on success
|
|
458
|
+
*/
|
|
459
|
+
static ParseFromSnippetAsync(snippetId: string, scaleToSize?: boolean, appendToAdt?: AdvancedDynamicTexture, urlRewriter?: (url: string) => string): Promise<AdvancedDynamicTexture>;
|
|
460
|
+
/**
|
|
461
|
+
* Recreate the content of the ADT from a snippet saved by the GUI editor
|
|
462
|
+
* @param snippetId defines the snippet to load
|
|
463
|
+
* @param scaleToSize defines whether to scale to texture to the saved size
|
|
464
|
+
* @param urlRewriter defines an url rewriter to update urls before sending them to the controls
|
|
465
|
+
* @returns a promise that will resolve on success
|
|
466
|
+
*/
|
|
467
|
+
parseFromSnippetAsync(snippetId: string, scaleToSize?: boolean, urlRewriter?: (url: string) => string): Promise<AdvancedDynamicTexture>;
|
|
468
|
+
/**
|
|
469
|
+
* Recreate the content of the ADT from a url json
|
|
470
|
+
* @param url defines the url to load
|
|
471
|
+
* @param scaleToSize defines whether to scale to texture to the saved size
|
|
472
|
+
* @param appendToAdt if provided the snippet will be appended to the adt. Otherwise a fullscreen ADT will be created.
|
|
473
|
+
* @param urlRewriter defines an url rewriter to update urls before sending them to the controls
|
|
474
|
+
* @returns a promise that will resolve on success
|
|
475
|
+
*/
|
|
476
|
+
static ParseFromFileAsync(url: string, scaleToSize?: boolean, appendToAdt?: AdvancedDynamicTexture, urlRewriter?: (url: string) => string): Promise<AdvancedDynamicTexture>;
|
|
477
|
+
/**
|
|
478
|
+
* Recreate the content of the ADT from a url json
|
|
479
|
+
* @param url defines the url to load
|
|
480
|
+
* @param scaleToSize defines whether to scale to texture to the saved size
|
|
481
|
+
* @param urlRewriter defines an url rewriter to update urls before sending them to the controls
|
|
482
|
+
* @returns a promise that will resolve on success
|
|
483
|
+
*/
|
|
484
|
+
parseFromURLAsync(url: string, scaleToSize?: boolean, urlRewriter?: (url: string) => string): Promise<AdvancedDynamicTexture>;
|
|
485
|
+
private static _LoadURLContentAsync;
|
|
486
|
+
/**
|
|
487
|
+
* Compares two rectangle based controls for pixel overlap
|
|
488
|
+
* @param control1 The first control to compare
|
|
489
|
+
* @param control2 The second control to compare
|
|
490
|
+
* @returns true if overlaps, otherwise false
|
|
491
|
+
*/
|
|
492
|
+
private static _Overlaps;
|
|
493
|
+
/**
|
|
494
|
+
* Creates a new AdvancedDynamicTexture in projected mode (ie. attached to a mesh)
|
|
495
|
+
* @param mesh defines the mesh which will receive the texture
|
|
496
|
+
* @param width defines the texture width (1024 by default)
|
|
497
|
+
* @param height defines the texture height (1024 by default)
|
|
498
|
+
* @param supportPointerMove defines a boolean indicating if the texture must capture move events (true by default)
|
|
499
|
+
* @param onlyAlphaTesting defines a boolean indicating that alpha blending will not be used (only alpha testing) (false by default)
|
|
500
|
+
* @param invertY defines if the texture needs to be inverted on the y axis during loading (true by default)
|
|
501
|
+
* @param materialSetupCallback defines a custom way of creating and setting up the material on the mesh
|
|
502
|
+
* @param sampling defines the texture sampling mode (Texture.TRILINEAR_SAMPLINGMODE by default)
|
|
503
|
+
* @returns a new AdvancedDynamicTexture
|
|
504
|
+
*/
|
|
505
|
+
static CreateForMesh(mesh: AbstractMesh, width?: number, height?: number, supportPointerMove?: boolean, onlyAlphaTesting?: boolean, invertY?: boolean, materialSetupCallback?: (mesh: AbstractMesh, uniqueId: string, texture: AdvancedDynamicTexture, onlyAlphaTesting: boolean) => void, sampling?: number): AdvancedDynamicTexture;
|
|
506
|
+
private static _CreateMaterial;
|
|
507
|
+
/**
|
|
508
|
+
* Creates a new AdvancedDynamicTexture in projected mode (ie. attached to a mesh) BUT do not create a new material for the mesh. You will be responsible for connecting the texture
|
|
509
|
+
* @param mesh defines the mesh which will receive the texture
|
|
510
|
+
* @param width defines the texture width (1024 by default)
|
|
511
|
+
* @param height defines the texture height (1024 by default)
|
|
512
|
+
* @param supportPointerMove defines a boolean indicating if the texture must capture move events (true by default)
|
|
513
|
+
* @param invertY defines if the texture needs to be inverted on the y axis during loading (true by default)
|
|
514
|
+
* @param sampling defines the texture sampling mode (Texture.TRILINEAR_SAMPLINGMODE by default)
|
|
515
|
+
* @returns a new AdvancedDynamicTexture
|
|
516
|
+
*/
|
|
517
|
+
static CreateForMeshTexture(mesh: AbstractMesh, width?: number, height?: number, supportPointerMove?: boolean, invertY?: boolean, sampling?: number): AdvancedDynamicTexture;
|
|
518
|
+
/**
|
|
519
|
+
* Creates a new AdvancedDynamicTexture in fullscreen mode.
|
|
520
|
+
* In this mode the texture will rely on a layer for its rendering.
|
|
521
|
+
* This allows it to be treated like any other layer.
|
|
522
|
+
* As such, if you have a multi camera setup, you can set the layerMask on the GUI as well.
|
|
523
|
+
* LayerMask is set through advancedTexture.layer.layerMask
|
|
524
|
+
* @param name defines name for the texture
|
|
525
|
+
* @param foreground defines a boolean indicating if the texture must be rendered in foreground (default is true)
|
|
526
|
+
* @param sceneOrOptions defines the hosting scene or options (IAdvancedDynamicTextureOptions)
|
|
527
|
+
* @param sampling defines the texture sampling mode (Texture.BILINEAR_SAMPLINGMODE by default)
|
|
528
|
+
* @param adaptiveScaling defines whether to automatically scale root to match hardwarescaling (false by default)
|
|
529
|
+
* @returns a new AdvancedDynamicTexture
|
|
530
|
+
*/
|
|
531
|
+
static CreateFullscreenUI(name: string, foreground?: boolean, sceneOrOptions?: Nullable<Scene> | IAdvancedDynamicTextureOptions, sampling?: number, adaptiveScaling?: boolean): AdvancedDynamicTexture;
|
|
532
|
+
/**
|
|
533
|
+
* Scales the texture
|
|
534
|
+
* @param ratio the scale factor to apply to both width and height
|
|
535
|
+
*/
|
|
536
|
+
scale(ratio: number): void;
|
|
537
|
+
/**
|
|
538
|
+
* Resizes the texture
|
|
539
|
+
* @param width the new width
|
|
540
|
+
* @param height the new height
|
|
541
|
+
*/
|
|
542
|
+
scaleTo(width: number, height: number): void;
|
|
543
|
+
private _checkGuiIsReady;
|
|
544
|
+
/**
|
|
545
|
+
* @returns true if all the GUI components are ready to render
|
|
546
|
+
*/
|
|
547
|
+
guiIsReady(): boolean;
|
|
548
|
+
}
|