@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,50 @@
|
|
|
1
|
+
import { Control } from "./control.js";
|
|
2
|
+
import { StackPanel } from "./stackPanel.js";
|
|
3
|
+
import { TextBlock } from "./textBlock.js";
|
|
4
|
+
/**
|
|
5
|
+
* Forcing an export so that this code will execute
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
const Name = "Statics";
|
|
9
|
+
export { Name as name };
|
|
10
|
+
/**
|
|
11
|
+
* Creates a stack panel that can be used to render headers
|
|
12
|
+
* @param control defines the control to associate with the header
|
|
13
|
+
* @param text defines the text of the header
|
|
14
|
+
* @param size defines the size of the header
|
|
15
|
+
* @param options defines options used to configure the header
|
|
16
|
+
* @param options.isHorizontal
|
|
17
|
+
* @param options.controlFirst
|
|
18
|
+
* @returns a new StackPanel
|
|
19
|
+
*/
|
|
20
|
+
Control.AddHeader = function (control, text, size, options) {
|
|
21
|
+
const panel = new StackPanel("panel");
|
|
22
|
+
const isHorizontal = options ? options.isHorizontal : true;
|
|
23
|
+
const controlFirst = options ? options.controlFirst : true;
|
|
24
|
+
panel.isVertical = !isHorizontal;
|
|
25
|
+
const header = new TextBlock("header");
|
|
26
|
+
header.text = text;
|
|
27
|
+
header.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;
|
|
28
|
+
if (isHorizontal) {
|
|
29
|
+
header.width = size;
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
header.height = size;
|
|
33
|
+
}
|
|
34
|
+
if (controlFirst) {
|
|
35
|
+
panel.addControl(control);
|
|
36
|
+
panel.addControl(header);
|
|
37
|
+
header.paddingLeft = "5px";
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
panel.addControl(header);
|
|
41
|
+
panel.addControl(control);
|
|
42
|
+
header.paddingRight = "5px";
|
|
43
|
+
}
|
|
44
|
+
header.shadowBlur = control.shadowBlur;
|
|
45
|
+
header.shadowColor = control.shadowColor;
|
|
46
|
+
header.shadowOffsetX = control.shadowOffsetX;
|
|
47
|
+
header.shadowOffsetY = control.shadowOffsetY;
|
|
48
|
+
return panel;
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=statics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"statics.js","sourceRoot":"","sources":["../../../../../dev/gui/src/2D/controls/statics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC;;;GAGG;AACH,MAAM,IAAI,GAAG,SAAS,CAAC;AAEvB,OAAO,EAAE,IAAI,IAAI,IAAI,EAAE,CAAC;AAExB;;;;;;;;;GASG;AACH,OAAO,CAAC,SAAS,GAAG,UAAU,OAAgB,EAAE,IAAY,EAAE,IAAqB,EAAE,OAAyD;IAC1I,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC;IACtC,MAAM,YAAY,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC;IAC3D,MAAM,YAAY,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC;IAE3D,KAAK,CAAC,UAAU,GAAG,CAAC,YAAY,CAAC;IAEjC,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC,QAAQ,CAAC,CAAC;IACvC,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,MAAM,CAAC,uBAAuB,GAAG,OAAO,CAAC,yBAAyB,CAAC;IACnE,IAAI,YAAY,EAAE,CAAC;QACf,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC;IACxB,CAAC;SAAM,CAAC;QACJ,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC;IACzB,CAAC;IAED,IAAI,YAAY,EAAE,CAAC;QACf,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAC1B,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QACzB,MAAM,CAAC,WAAW,GAAG,KAAK,CAAC;IAC/B,CAAC;SAAM,CAAC;QACJ,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QACzB,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAC1B,MAAM,CAAC,YAAY,GAAG,KAAK,CAAC;IAChC,CAAC;IAED,MAAM,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IACvC,MAAM,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;IACzC,MAAM,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC;IAC7C,MAAM,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC;IAE7C,OAAO,KAAK,CAAC;AACjB,CAAC,CAAC","sourcesContent":["import { Control } from \"./control\";\r\nimport { StackPanel } from \"./stackPanel\";\r\nimport { TextBlock } from \"./textBlock\";\r\n\r\n/**\r\n * Forcing an export so that this code will execute\r\n * @internal\r\n */\r\nconst Name = \"Statics\";\r\n\r\nexport { Name as name };\r\n\r\n/**\r\n * Creates a stack panel that can be used to render headers\r\n * @param control defines the control to associate with the header\r\n * @param text defines the text of the header\r\n * @param size defines the size of the header\r\n * @param options defines options used to configure the header\r\n * @param options.isHorizontal\r\n * @param options.controlFirst\r\n * @returns a new StackPanel\r\n */\r\nControl.AddHeader = function (control: Control, text: string, size: string | number, options: { isHorizontal: boolean; controlFirst: boolean }): StackPanel {\r\n const panel = new StackPanel(\"panel\");\r\n const isHorizontal = options ? options.isHorizontal : true;\r\n const controlFirst = options ? options.controlFirst : true;\r\n\r\n panel.isVertical = !isHorizontal;\r\n\r\n const header = new TextBlock(\"header\");\r\n header.text = text;\r\n header.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;\r\n if (isHorizontal) {\r\n header.width = size;\r\n } else {\r\n header.height = size;\r\n }\r\n\r\n if (controlFirst) {\r\n panel.addControl(control);\r\n panel.addControl(header);\r\n header.paddingLeft = \"5px\";\r\n } else {\r\n panel.addControl(header);\r\n panel.addControl(control);\r\n header.paddingRight = \"5px\";\r\n }\r\n\r\n header.shadowBlur = control.shadowBlur;\r\n header.shadowColor = control.shadowColor;\r\n header.shadowOffsetX = control.shadowOffsetX;\r\n header.shadowOffsetY = control.shadowOffsetY;\r\n\r\n return panel;\r\n};\r\n"]}
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { Observable } from "@babylonjs/core/Misc/observable.js";
|
|
2
|
+
import type { Measure } from "../measure.js";
|
|
3
|
+
import { Control } from "./control.js";
|
|
4
|
+
import type { Nullable } from "@babylonjs/core/types.js";
|
|
5
|
+
import type { ICanvasRenderingContext } from "@babylonjs/core/Engines/ICanvas.js";
|
|
6
|
+
/**
|
|
7
|
+
* Enum that determines the text-wrapping mode to use.
|
|
8
|
+
*/
|
|
9
|
+
export declare const enum TextWrapping {
|
|
10
|
+
/**
|
|
11
|
+
* Clip the text when it's larger than Control.width; this is the default mode.
|
|
12
|
+
*/
|
|
13
|
+
Clip = 0,
|
|
14
|
+
/**
|
|
15
|
+
* Wrap the text word-wise, i.e. try to add line-breaks at word boundary to fit within Control.width.
|
|
16
|
+
*/
|
|
17
|
+
WordWrap = 1,
|
|
18
|
+
/**
|
|
19
|
+
* Ellipsize the text, i.e. shrink with trailing … when text is larger than Control.width.
|
|
20
|
+
*/
|
|
21
|
+
Ellipsis = 2,
|
|
22
|
+
/**
|
|
23
|
+
* Wrap the text word-wise and clip the text when the text's height is larger than the Control.height, and shrink the last line with trailing … .
|
|
24
|
+
*/
|
|
25
|
+
WordWrapEllipsis = 3,
|
|
26
|
+
/**
|
|
27
|
+
* Use HTML to wrap the text. This is the only mode that supports east-asian languages.
|
|
28
|
+
*/
|
|
29
|
+
HTML = 4
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Class used to create text block control
|
|
33
|
+
*/
|
|
34
|
+
export declare class TextBlock extends Control {
|
|
35
|
+
/**
|
|
36
|
+
* Defines the name of the control
|
|
37
|
+
*/
|
|
38
|
+
name?: string | undefined;
|
|
39
|
+
private _text;
|
|
40
|
+
private _textWrapping;
|
|
41
|
+
private _textHorizontalAlignment;
|
|
42
|
+
private _textVerticalAlignment;
|
|
43
|
+
private _lines;
|
|
44
|
+
private _resizeToFit;
|
|
45
|
+
private _lineSpacing;
|
|
46
|
+
private _outlineWidth;
|
|
47
|
+
private _outlineColor;
|
|
48
|
+
private _underline;
|
|
49
|
+
private _lineThrough;
|
|
50
|
+
private _wordDivider;
|
|
51
|
+
private _forceResizeWidth;
|
|
52
|
+
private _applyOutlineToUnderline;
|
|
53
|
+
/**
|
|
54
|
+
* An event triggered after the text is changed
|
|
55
|
+
*/
|
|
56
|
+
onTextChangedObservable: Observable<TextBlock>;
|
|
57
|
+
/**
|
|
58
|
+
* An event triggered after the text was broken up into lines
|
|
59
|
+
*/
|
|
60
|
+
onLinesReadyObservable: Observable<TextBlock>;
|
|
61
|
+
/**
|
|
62
|
+
* Function used to split a string into words. By default, a string is split at each space character found
|
|
63
|
+
*/
|
|
64
|
+
wordSplittingFunction: Nullable<(line: string) => string[]>;
|
|
65
|
+
/**
|
|
66
|
+
* This function will be called when a new HTML element is generated to be used for word wrapping.
|
|
67
|
+
* This is only used when wrapping mode HTML is selected.
|
|
68
|
+
* Using this function you can adjust word-break, overflow-wrap, hyphens, or any other CSS properties of the HTML element, language-dependent.
|
|
69
|
+
*/
|
|
70
|
+
adjustWordWrappingHTMLElement: Nullable<(element: HTMLElement) => void>;
|
|
71
|
+
/**
|
|
72
|
+
* Gets or sets a boolean indicating if the HTML element generated for word wrapping should be reused or removed after each wrapping.
|
|
73
|
+
*/
|
|
74
|
+
reuseHTMLForWordWrapping: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Return the line list (you may need to use the onLinesReadyObservable to make sure the list is ready)
|
|
77
|
+
*/
|
|
78
|
+
get lines(): any[];
|
|
79
|
+
/**
|
|
80
|
+
* Gets or sets a boolean indicating that the TextBlock will be resized to fit its content
|
|
81
|
+
|
|
82
|
+
*/
|
|
83
|
+
get resizeToFit(): boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Gets or sets a boolean indicating that the TextBlock will be resized to fit its content
|
|
86
|
+
|
|
87
|
+
*/
|
|
88
|
+
set resizeToFit(value: boolean);
|
|
89
|
+
/**
|
|
90
|
+
* Gets or sets a boolean indicating if text must be wrapped
|
|
91
|
+
*/
|
|
92
|
+
get textWrapping(): TextWrapping | boolean;
|
|
93
|
+
/**
|
|
94
|
+
* Gets or sets a boolean indicating if text must be wrapped
|
|
95
|
+
*/
|
|
96
|
+
set textWrapping(value: TextWrapping | boolean);
|
|
97
|
+
/**
|
|
98
|
+
* Gets or sets text to display
|
|
99
|
+
*/
|
|
100
|
+
get text(): string;
|
|
101
|
+
/**
|
|
102
|
+
* Gets or sets text to display
|
|
103
|
+
*/
|
|
104
|
+
set text(value: string);
|
|
105
|
+
/**
|
|
106
|
+
* Gets or sets text horizontal alignment (BABYLON.GUI.Control.HORIZONTAL_ALIGNMENT_CENTER by default)
|
|
107
|
+
*/
|
|
108
|
+
get textHorizontalAlignment(): number;
|
|
109
|
+
/**
|
|
110
|
+
* Gets or sets text horizontal alignment (BABYLON.GUI.Control.HORIZONTAL_ALIGNMENT_CENTER by default)
|
|
111
|
+
*/
|
|
112
|
+
set textHorizontalAlignment(value: number);
|
|
113
|
+
/**
|
|
114
|
+
* Gets or sets text vertical alignment (BABYLON.GUI.Control.VERTICAL_ALIGNMENT_CENTER by default)
|
|
115
|
+
*/
|
|
116
|
+
get textVerticalAlignment(): number;
|
|
117
|
+
/**
|
|
118
|
+
* Gets or sets text vertical alignment (BABYLON.GUI.Control.VERTICAL_ALIGNMENT_CENTER by default)
|
|
119
|
+
*/
|
|
120
|
+
set textVerticalAlignment(value: number);
|
|
121
|
+
/**
|
|
122
|
+
* Gets or sets line spacing value
|
|
123
|
+
*/
|
|
124
|
+
set lineSpacing(value: string | number);
|
|
125
|
+
/**
|
|
126
|
+
* Gets or sets line spacing value
|
|
127
|
+
*/
|
|
128
|
+
get lineSpacing(): string | number;
|
|
129
|
+
/**
|
|
130
|
+
* Gets or sets outlineWidth of the text to display
|
|
131
|
+
*/
|
|
132
|
+
get outlineWidth(): number;
|
|
133
|
+
/**
|
|
134
|
+
* Gets or sets outlineWidth of the text to display
|
|
135
|
+
*/
|
|
136
|
+
set outlineWidth(value: number);
|
|
137
|
+
/**
|
|
138
|
+
* Gets or sets a boolean indicating that text must have underline
|
|
139
|
+
*/
|
|
140
|
+
get underline(): boolean;
|
|
141
|
+
/**
|
|
142
|
+
* Gets or sets a boolean indicating that text must have underline
|
|
143
|
+
*/
|
|
144
|
+
set underline(value: boolean);
|
|
145
|
+
/**
|
|
146
|
+
* Gets or sets an boolean indicating that text must be crossed out
|
|
147
|
+
*/
|
|
148
|
+
get lineThrough(): boolean;
|
|
149
|
+
/**
|
|
150
|
+
* Gets or sets an boolean indicating that text must be crossed out
|
|
151
|
+
*/
|
|
152
|
+
set lineThrough(value: boolean);
|
|
153
|
+
/**
|
|
154
|
+
* If the outline should be applied to the underline/strike-through too. Has different behavior in Edge/Chrome vs Firefox.
|
|
155
|
+
*/
|
|
156
|
+
get applyOutlineToUnderline(): boolean;
|
|
157
|
+
set applyOutlineToUnderline(value: boolean);
|
|
158
|
+
/**
|
|
159
|
+
* Gets or sets outlineColor of the text to display
|
|
160
|
+
*/
|
|
161
|
+
get outlineColor(): string;
|
|
162
|
+
/**
|
|
163
|
+
* Gets or sets outlineColor of the text to display
|
|
164
|
+
*/
|
|
165
|
+
set outlineColor(value: string);
|
|
166
|
+
/**
|
|
167
|
+
* Gets or sets word divider
|
|
168
|
+
*/
|
|
169
|
+
get wordDivider(): string;
|
|
170
|
+
/**
|
|
171
|
+
* Gets or sets word divider
|
|
172
|
+
*/
|
|
173
|
+
set wordDivider(value: string);
|
|
174
|
+
/**
|
|
175
|
+
* By default, if a text block has text wrapping other than Clip, its width
|
|
176
|
+
* is not resized even if resizeToFit = true. This parameter forces the width
|
|
177
|
+
* to be resized.
|
|
178
|
+
*/
|
|
179
|
+
get forceResizeWidth(): boolean;
|
|
180
|
+
set forceResizeWidth(value: boolean);
|
|
181
|
+
/**
|
|
182
|
+
* Creates a new TextBlock object
|
|
183
|
+
* @param name defines the name of the control
|
|
184
|
+
* @param text defines the text to display (empty string by default)
|
|
185
|
+
*/
|
|
186
|
+
constructor(
|
|
187
|
+
/**
|
|
188
|
+
* Defines the name of the control
|
|
189
|
+
*/
|
|
190
|
+
name?: string | undefined, text?: string);
|
|
191
|
+
protected _getTypeName(): string;
|
|
192
|
+
protected _processMeasures(parentMeasure: Measure, context: ICanvasRenderingContext): void;
|
|
193
|
+
private _drawText;
|
|
194
|
+
private _drawLine;
|
|
195
|
+
/**
|
|
196
|
+
* @internal
|
|
197
|
+
*/
|
|
198
|
+
_draw(context: ICanvasRenderingContext): void;
|
|
199
|
+
protected _applyStates(context: ICanvasRenderingContext): void;
|
|
200
|
+
private _linesTemp;
|
|
201
|
+
protected _breakLines(refWidth: number, refHeight: number, context: ICanvasRenderingContext): object[];
|
|
202
|
+
private _htmlElement;
|
|
203
|
+
protected _parseHTMLText(refWidth: number, refHeight: number, context: ICanvasRenderingContext): string[];
|
|
204
|
+
protected _parseLine(line: string | undefined, context: ICanvasRenderingContext): object;
|
|
205
|
+
private _getCharsToRemove;
|
|
206
|
+
protected _parseLineEllipsis(line: string | undefined, width: number, context: ICanvasRenderingContext): object;
|
|
207
|
+
private _getTextMetricsWidth;
|
|
208
|
+
protected _parseLineWordWrap(line: string | undefined, width: number, context: ICanvasRenderingContext): object[];
|
|
209
|
+
protected _parseLineWordWrapEllipsis(line: string | undefined, width: number, height: number, context: ICanvasRenderingContext): object[];
|
|
210
|
+
protected _renderLines(context: ICanvasRenderingContext): void;
|
|
211
|
+
private _computeHeightForLinesOf;
|
|
212
|
+
isDimensionFullyDefined(dim: "width" | "height"): boolean;
|
|
213
|
+
/**
|
|
214
|
+
* Given a width constraint applied on the text block, find the expected height
|
|
215
|
+
* @returns expected height
|
|
216
|
+
*/
|
|
217
|
+
computeExpectedHeight(): number;
|
|
218
|
+
dispose(): void;
|
|
219
|
+
}
|