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EAAOlB,EAAQhR,WACf4R,EAAW,CACb,QACA,iBACA,iBACA,WACA,gBACA,wBACA,eACA,uBACA,oBACA,qBACA,uBACA,wBACA,kBACA,iBACA,iBACA,kBACA,cACA,YACA,qBACA,WACA,aACA,cACA,cACA,eACA,eACA,gBACA,eACA,kBACA,iBACA,UACA,cACA,kBACA,iBACA,kBACA,mBACA,yBACA,UACA,SACA,aACA,cACA,cACA,qBACA,gBACA,kBACA,mBACA,mBACA,kBACA,uBACA,sBACA,qBACA,eACA,cACA,iBACA,oBACA,qBACA,iBACA,gBACA,mBACA,oBACA,0BACA,2BACA,UACA,mBACA,qBACA,kBACA,gBACA,kBACA,yBACA,oBACA,0BACA,wBACA,wBACA,yBACA,iCACA,kCACA,iCACA,kCACA,qCACA,qCACA,kCACA,oCAEEC,EAAW,CAAC,gBAAiB,yBAC7BC,EAAiB,GACvB,mCAA8C,CAC1CC,cAAeH,EACfI,oBAAqBF,EACrBD,SAAUA,EACVb,QAASA,EACTiB,sBAAuB,IAE3BtB,EAAQwB,UAAU7c,EAAMtC,YAAYof,aAAaT,EAAY,CACzDU,WAAYX,EACZK,cAAeH,EACfI,oBAAqBF,EACrBD,SAAUA,EACVb,QAASkB,EACTI,UAAWA,EACXC,WAAY5vB,KAAK4vB,WACjBC,QAAS7vB,KAAK6vB,QACdC,gBAAiB,CAAER,sBAAuB,IAC3Clf,GAASie,EAASruB,KAAK+vB,iBAC9B,CACA,SAAK/B,EAAQE,SAAWF,EAAQE,OAAO8B,aAGvC3B,EAAQE,UAAY5b,EAAM6b,cAC1BR,EAAQE,OAAOC,qBAAsB,GAC9B,EACX,CACA8B,eAAeC,EAAO5W,EAAM0U,GACxB,MAAMK,EAAUL,EAAQI,gBACxB,IAAKC,EACD,OAEJ,MAAMH,EAASF,EAAQE,OAClBA,IAGLluB,KAAKmwB,cAAgBjC,EAErBluB,KAAKowB,oBAAoBF,GACzBlwB,KAAKmwB,cAAcE,UAAU,iBAAkBrwB,KAAKgQ,WAAWs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,OAAOjhD,KAAKrsC,EAAO9G,YAC9C,IAAKm0F,GAA0B,IAAjBA,EAAMxqG,OAChB,OAAO,EAEX,IAAI0qG,EAAc1hD,WAAWwhD,EAAM,IAC/BG,EAAa3xG,KAAKixG,cAMtB,GALKjxG,KAAK+wG,sBACFW,EAAc,IACdA,EAAc,GAGD,IAAjBF,EAAMxqG,OACN,OAAQwqG,EAAM,IACV,IAAK,KACDG,EAAad,EAAaC,eAC1B,MACJ,IAAK,IACDa,EAAad,EAAaK,oBAC1BQ,GAAe,IACf,MAGZ,OAAIA,IAAgB1xG,KAAK80C,QAAU68D,IAAe3xG,KAAKgxG,SAGvDhxG,KAAK80C,OAAS48D,EACd1xG,KAAKgxG,MAAQW,EACb3xG,KAAKyoE,oBAAoBlhD,mBAClB,EACX,CAEW2pF,iCACP,OAAOL,EAAae,oBACxB,CAEWd,4BACP,OAAOD,EAAagB,eACxB,EAGJhB,EAAaY,OAAS,0BACtBZ,EAAae,qBAAuB,EACpCf,EAAagB,gBAAkB,C","sources":["webpack://sbs.vison/./Scripts/ts/Framework/Components/Controls/XView/XView.vue?52db","webpack://sbs.vison/./Scripts/ts/Framework/Components/Controls/XView/XView.vue.ts","webpack://sbs.vison/./Scripts/ts/Framework/Components/Controls/XView/XView.vue.ts?a375","webpack://sbs.vison/./Scripts/ts/Framework/Components/Controls/XView/XView.vue","webpack://sbs.vison/./node_modules/earcut/src/earcut.js","webpack://sbs.vison/./Scripts/ts/Framework/Components/Controls/XView/Inputs/Camera360MouseInput.ts","webpack://sbs.vison/./Scripts/ts/Framework/Components/Controls/XView/Inputs/Camera360PointersInput.ts","webpack://sbs.vison/./Scripts/ts/Framework/Components/Controls/XView/Inputs/ZoomAndPanMouseInput.ts","webpack://sbs.vison/./Scripts/ts/Framework/Components/Controls/XView/Inputs/ZoomAndPanPointersInput.ts","webpack://sbs.vison/./Scripts/ts/Framework/Components/Controls/XView/Cameras/Flat2DCamera.ts","webpack://sbs.vison/./Scripts/ts/Framework/Components/Controls/XView/Cameras/Sphere360Camera.ts","webpack://sbs.vison/./Scripts/ts/Framework/Components/Controls/XView/GUI/Tooltip.ts","webpack://sbs.vison/./Scripts/ts/Framework/Components/Controls/XView/Meshes/Polygon3D.ts","webpack://sbs.vison/./Scripts/ts/Framework/Components/Controls/XView/XView.Textures.ts","webpack://sbs.vison/./Scripts/ts/Framework/Components/Controls/XView/Overlays/BaseHotspotOverlay.ts","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/vector3WithInfo.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/controls/control3D.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/controls/contentDisplay3D.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/controls/abstractButton3D.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/controls/button3D.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/controls/container3D.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/controls/volumeBasedPanel.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/materials/fluent/shaders/fluent.vertex.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/materials/fluent/shaders/fluent.fragment.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/materials/fluent/fluentMaterial.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/controls/touchHolographicMenu.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/materials/fluentBackplate/shaders/fluentBackplate.fragment.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/materials/fluentBackplate/shaders/fluentBackplate.vertex.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/materials/fluentBackplate/fluentBackplateMaterial.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/controls/holographicBackplate.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/materials/fluentButton/shaders/fluentButton.fragment.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/materials/fluentButton/shaders/fluentButton.vertex.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/materials/fluentButton/fluentButtonMaterial.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/controls/touchButton3D.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/controls/touchHolographicButton.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/behaviors/defaultBehavior.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/materials/handle/shaders/handle.vertex.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/materials/handle/shaders/handle.fragment.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/materials/handle/handleMaterial.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/gizmos/gizmoHandle.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/gizmos/slateGizmo.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/controls/holographicSlate.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/controls/nearMenu.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/materials/mrdl/shaders/mrdlSliderBar.fragment.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/materials/mrdl/shaders/mrdlSliderBar.vertex.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/materials/mrdl/mrdlSliderBarMaterial.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/materials/mrdl/shaders/mrdlSliderThumb.fragment.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/materials/mrdl/shaders/mrdlSliderThumb.vertex.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/materials/mrdl/mrdlSliderThumbMaterial.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/materials/mrdl/shaders/mrdlBackplate.fragment.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/materials/mrdl/shaders/mrdlBackplate.vertex.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/materials/mrdl/mrdlBackplateMaterial.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/controls/slider3D.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/materials/mrdl/shaders/mrdlBackglow.fragment.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/materials/mrdl/shaders/mrdlBackglow.vertex.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/materials/mrdl/mrdlBackglowMaterial.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/materials/mrdl/shaders/mrdlFrontplate.fragment.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/materials/mrdl/shaders/mrdlFrontplate.vertex.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/materials/mrdl/mrdlFrontplateMaterial.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/materials/mrdl/shaders/mrdlInnerquad.fragment.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/materials/mrdl/shaders/mrdlInnerquad.vertex.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/materials/mrdl/mrdlInnerquadMaterial.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/controls/MRTK3/touchHolographicButton.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/3D/gui3DManager.js","webpack://sbs.vison/./Scripts/ts/Framework/Components/Controls/XView/Overlays/GuiOverlay.ts","webpack://sbs.vison/./Scripts/ts/Framework/Components/Controls/XView/Overlays/Hotspot2DFlatOverlay.ts","webpack://sbs.vison/./Scripts/ts/Framework/Components/Controls/XView/Overlays/Hotspot360Overlay.ts","webpack://sbs.vison/./Scripts/ts/Framework/Components/Controls/XView/Materials/LazyTextureMaterial.ts","webpack://sbs.vison/./Scripts/ts/Framework/Components/Controls/XView/Materials/TextureMaterial.ts","webpack://sbs.vison/./Scripts/ts/Framework/Components/Controls/XView/Materials/VideoTextureMaterial.ts","webpack://sbs.vison/./Scripts/ts/Framework/Components/Controls/XView/MeshBuilder.ts","webpack://sbs.vison/./Scripts/ts/Framework/Components/Controls/XView/Renderers/BaseRenderer.ts","webpack://sbs.vison/./Scripts/ts/Framework/Components/Controls/XView/Renderers/Cube360Renderer.ts","webpack://sbs.vison/./Scripts/ts/Framework/Components/Controls/XView/Renderers/Sphere360Renderer.ts","webpack://sbs.vison/./Scripts/ts/Framework/Components/Controls/XView/Renderers/Flat2DRenderer.ts","webpack://sbs.vison/./Scripts/ts/Framework/Components/Controls/XView/XView.ContextMenu.ts","webpack://sbs.vison/./Scripts/ts/Framework/Components/Controls/XView/XView.Viewer360.ts","webpack://sbs.vison/./Scripts/ts/Framework/Helpers/ColorHelper.ts","webpack://sbs.vison/./node_modules/@babylonjs/gui/2D/advancedDynamicTexture.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/2D/controls/container.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/2D/controls/control.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/2D/controls/grid.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/2D/controls/image.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/2D/controls/rectangle.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/2D/controls/stackPanel.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/2D/controls/textBlock.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/2D/controls/button.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/2D/controls/checkbox.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/2D/controls/textWrapper.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/2D/controls/inputText.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/2D/controls/colorpicker.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/2D/controls/ellipse.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/2D/controls/focusableButton.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/2D/controls/inputTextArea.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/2D/controls/inputPassword.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/2D/controls/line.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/2D/multiLinePoint.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/2D/controls/multiLine.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/2D/controls/radioButton.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/2D/controls/sliders/baseSlider.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/2D/controls/sliders/slider.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/2D/controls/scrollViewers/scrollViewerWindow.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/2D/controls/sliders/scrollBar.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/2D/controls/sliders/imageScrollBar.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/2D/controls/scrollViewers/scrollViewer.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/2D/controls/toggleButton.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/2D/controls/virtualKeyboard.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/2D/controls/displayGrid.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/2D/controls/sliders/imageBasedSlider.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/2D/controls/statics.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/2D/controls/gradient/BaseGradient.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/2D/controls/gradient/LinearGradient.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/2D/controls/gradient/RadialGradient.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/2D/math2D.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/2D/measure.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/2D/style.js","webpack://sbs.vison/./node_modules/@babylonjs/gui/2D/valueAndUnit.js"],"sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"xViewContainer\",style:(_vm.computedStyle)},[_c('canvas',{ref:\"canvasElement\",attrs:{\"id\":\"render\"},on:{\"click\":_vm.onCanvasClick,\"dragover\":function($event){return _vm.onDragOverItem($event)},\"drop\":function($event){return _vm.onDropItem($event)}}}),_c('div',{ref:\"hotspotRender\",staticStyle:{\"pointer-events\":\"none\",\"overflow\":\"hidden\",\"transition\":\"none\"},attrs:{\"id\":\"hotspotRender\"}}),_c('img',{ref:\"transitionElement\",staticClass:\"preview-image-not-visible \",attrs:{\"id\":\"fading\",\"draggable\":\"false\"}})])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import { Sphere360Camera } from 'Framework/Components/Controls/XView/Cameras';\r\nimport { IConfiguration, ICoordinates } from 'Framework/Components/Controls/XView/Core';\r\nimport { Viewer360 } from 'Framework/Components/Controls/XView/XView.Viewer360';\r\nimport { JsonProperty, PropSyncWithInternal, editorBrowsable } from 'Framework/Components/Panel.Commons';\r\nimport { Component, PropSync, UIElement, Watch } from 'Framework/Components/UIElement';\r\nimport { MathHelper } from 'Framework/Helpers/MathHelper';\r\n\r\n@Component({\r\n name: 'x-view'\r\n})\r\nexport default class XView extends UIElement {\r\n public mounted() {\r\n //super.mounted();\r\n this.$nextTick(function () {\r\n const ro = new ResizeObserver(entries => {\r\n clearTimeout(this._resizeTimer);\r\n this._resizeTimer = setTimeout(() => {\r\n let parentRectangle = this.canvasElement.parentElement.getBoundingClientRect();\r\n let rectangle = this.canvasElement.getBoundingClientRect();\r\n\r\n let finalRectangle: DOMRect = new DOMRect(\r\n rectangle.x,\r\n rectangle.y,\r\n rectangle.width > parentRectangle.width ? parentRectangle.width : rectangle.width,\r\n rectangle.height > parentRectangle.height ? parentRectangle.height : rectangle.height\r\n );\r\n\r\n if (this._viewer) {\r\n this._viewer.setSizeView(finalRectangle.width, finalRectangle.height);\r\n }\r\n }, 200);\r\n });\r\n ro.observe(this.canvasElement);\r\n\r\n this._isMounted = true;\r\n if (this._mountedCallback) {\r\n this._mountedCallback();\r\n this._mountedCallback = null;\r\n } else if (this._configuration) {\r\n this.loadConfiguration(this._configuration);\r\n }\r\n });\r\n }\r\n\r\n public beforeDestroy(): void {\r\n UIElement.Bus.$off('refresh-hotspots');\r\n\r\n //ro.ro.disconnect ?\r\n\r\n /**\r\n * Called manually because viewer is not mounted by vue so $destroy does not work\r\n */\r\n this._viewer?.beforeDestroy();\r\n }\r\n\r\n public onCanvasClick(e: MouseEvent): void {\r\n UIElement.Bus.$emit('xview-click', { sender: this._viewer, args: e });\r\n }\r\n\r\n public onDragOverItem(event: DragEvent): void {\r\n if (this._isDropAllowed) {\r\n event.preventDefault();\r\n }\r\n }\r\n\r\n public onDropItem(event: DragEvent): void {\r\n if (this._isDropAllowed) {\r\n event.preventDefault();\r\n\r\n UIElement.Bus.$emit('x-view-on-drop-item',\r\n this,\r\n MathHelper.toSphericalCoordinates(this._viewer.pick(event.offsetX, event.offsetY)),\r\n event\r\n );\r\n }\r\n }\r\n\r\n @Watch('configuration')\r\n public onConfigurationPropertyChanged(value: IConfiguration, oldValue: IConfiguration): void {\r\n if (this._isMounted) {\r\n this.loadConfiguration(value);\r\n } else {\r\n this._mountedCallback = () => { this.loadConfiguration(value); };\r\n }\r\n }\r\n\r\n private async loadConfiguration(configuration: IConfiguration): Promise {\r\n let viewer: Viewer360 = this._viewer;\r\n\r\n if (viewer) {\r\n let screenshotData = await viewer.takeScreenshotAsync();\r\n\r\n this._showPreview(screenshotData);\r\n }\r\n else {\r\n let updateCurrentOrientation = this.$throttle(this._updateCurrentOrientation, 50);\r\n\r\n viewer = new Viewer360(\r\n this.canvasElement,\r\n configuration.iconProvider,\r\n cam => {\r\n updateCurrentOrientation(cam);\r\n }\r\n );\r\n }\r\n\r\n try {\r\n UIElement.Bus.$once('preview-loaded', this._hidePreview);\r\n await this.$nextTick();\r\n await viewer.loadConfigurationAsync(configuration);\r\n\r\n this._viewer = viewer;\r\n }\r\n catch (error) {\r\n console.error(error);\r\n //Todo display error to user.\r\n this._viewer = null;\r\n }\r\n finally {\r\n this.$emit('viewer-changed', this._viewer);\r\n }\r\n }\r\n\r\n private _updateCurrentOrientation(cam: Sphere360Camera) {\r\n let target = cam.getTarget();\r\n //ASTM E57 != BABYLON Vector3 Coordinates system\r\n //Convert Babylon to ASTM E57\r\n this._orientation = {\r\n x: target.z,\r\n y: -target.x,\r\n z: target.y\r\n };\r\n this._focale = cam.fov;\r\n }\r\n\r\n private _showPreview(sourcePreview: string): void {\r\n let transitionElement = this.transitionElement;\r\n\r\n if (transitionElement && sourcePreview) {\r\n transitionElement.src = sourcePreview;\r\n transitionElement.className = 'preview-image-visible';\r\n }\r\n }\r\n\r\n private _hidePreview(): void {\r\n let transitionElement = this.transitionElement;\r\n\r\n if (transitionElement && transitionElement.className === 'preview-image-visible') {\r\n transitionElement.className = 'preview-image-not-visible';\r\n }\r\n }\r\n\r\n public get viewer(): Viewer360 {\r\n return this._viewer;\r\n }\r\n\r\n private get transitionElement(): HTMLImageElement {\r\n return this.$refs['transitionElement'] as HTMLImageElement;\r\n }\r\n\r\n private get canvasElement(): HTMLCanvasElement {\r\n return this.$refs['canvasElement'] as HTMLCanvasElement;\r\n }\r\n\r\n @JsonProperty({ className: 'x-view', name: 'configuration', type: Object })\r\n @editorBrowsable({ groupName: 'Commons' })\r\n @PropSyncWithInternal('configuration', { type: Object, required: false, default: null })\r\n public _configuration: IConfiguration;\r\n\r\n @JsonProperty({ className: 'x-view', name: 'currentOrientation', type: Object })\r\n @editorBrowsable({ groupName: 'Commons' })\r\n @PropSyncWithInternal('currentOrientation', { type: Object, required: false, default: null })\r\n public _orientation: ICoordinates;\r\n\r\n @JsonProperty({ className: 'x-view', name: 'currentFocale', type: Number })\r\n @editorBrowsable({ groupName: 'Commons', template: 'Number' })\r\n @PropSyncWithInternal('currentFocale', { type: Number, required: false, default: null })\r\n public _focale: number;\r\n\r\n @JsonProperty({ className: 'x-view', name: 'isDropAllowed', type: Boolean })\r\n @editorBrowsable({ groupName: 'Commons', template: 'Boolean' })\r\n @PropSync('isDropAllowed', { type: Boolean, required: false, default: false })\r\n public _isDropAllowed: boolean;\r\n\r\n private _viewer: Viewer360 = null;\r\n private _isMounted: boolean = false;\r\n private _mountedCallback: Function = null;\r\n private _resizeTimer: number;\r\n}\r\n","import mod from \"-!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/ts-loader/index.js??clonedRuleSet-41.use[2]!./XView.vue.ts?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/ts-loader/index.js??clonedRuleSet-41.use[2]!./XView.vue.ts?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./XView.vue?vue&type=template&id=59885bae&scoped=true&\"\nimport script from \"./XView.vue.ts?vue&type=script&lang=ts&\"\nexport * from \"./XView.vue.ts?vue&type=script&lang=ts&\"\nimport style0 from \"./XView.vue.scss?vue&type=style&index=0&id=59885bae&prod&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"59885bae\",\n null\n \n)\n\nexport default component.exports","'use strict';\n\nmodule.exports = earcut;\nmodule.exports.default = earcut;\n\nfunction earcut(data, holeIndices, dim) {\n\n dim = dim || 2;\n\n var hasHoles = holeIndices && holeIndices.length,\n outerLen = hasHoles ? holeIndices[0] * dim : data.length,\n outerNode = linkedList(data, 0, outerLen, dim, true),\n triangles = [];\n\n if (!outerNode || outerNode.next === outerNode.prev) return triangles;\n\n var minX, minY, maxX, maxY, x, y, invSize;\n\n if (hasHoles) outerNode = eliminateHoles(data, holeIndices, outerNode, dim);\n\n // if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox\n if (data.length > 80 * dim) {\n minX = maxX = data[0];\n minY = maxY = data[1];\n\n for (var i = dim; i < outerLen; i += dim) {\n x = data[i];\n y = data[i + 1];\n if (x < minX) minX = x;\n if (y < minY) minY = y;\n if (x > maxX) maxX = x;\n if (y > maxY) maxY = y;\n }\n\n // minX, minY and invSize are later used to transform coords into integers for z-order calculation\n invSize = Math.max(maxX - minX, maxY - minY);\n invSize = invSize !== 0 ? 32767 / invSize : 0;\n }\n\n earcutLinked(outerNode, triangles, dim, minX, minY, invSize, 0);\n\n return triangles;\n}\n\n// create a circular doubly linked list from polygon points in the specified winding order\nfunction linkedList(data, start, end, dim, clockwise) {\n var i, last;\n\n if (clockwise === (signedArea(data, start, end, dim) > 0)) {\n for (i = start; i < end; i += dim) last = insertNode(i, data[i], data[i + 1], last);\n } else {\n for (i = end - dim; i >= start; i -= dim) last = insertNode(i, data[i], data[i + 1], last);\n }\n\n if (last && equals(last, last.next)) {\n removeNode(last);\n last = last.next;\n }\n\n return last;\n}\n\n// eliminate colinear or duplicate points\nfunction filterPoints(start, end) {\n if (!start) return start;\n if (!end) end = start;\n\n var p = start,\n again;\n do {\n again = false;\n\n if (!p.steiner && (equals(p, p.next) || area(p.prev, p, p.next) === 0)) {\n removeNode(p);\n p = end = p.prev;\n if (p === p.next) break;\n again = true;\n\n } else {\n p = p.next;\n }\n } while (again || p !== end);\n\n return end;\n}\n\n// main ear slicing loop which triangulates a polygon (given as a linked list)\nfunction earcutLinked(ear, triangles, dim, minX, minY, invSize, pass) {\n if (!ear) return;\n\n // interlink polygon nodes in z-order\n if (!pass && invSize) indexCurve(ear, minX, minY, invSize);\n\n var stop = ear,\n prev, next;\n\n // iterate through ears, slicing them one by one\n while (ear.prev !== ear.next) {\n prev = ear.prev;\n next = ear.next;\n\n if (invSize ? isEarHashed(ear, minX, minY, invSize) : isEar(ear)) {\n // cut off the triangle\n triangles.push(prev.i / dim | 0);\n triangles.push(ear.i / dim | 0);\n triangles.push(next.i / dim | 0);\n\n removeNode(ear);\n\n // skipping the next vertex leads to less sliver triangles\n ear = next.next;\n stop = next.next;\n\n continue;\n }\n\n ear = next;\n\n // if we looped through the whole remaining polygon and can't find any more ears\n if (ear === stop) {\n // try filtering points and slicing again\n if (!pass) {\n earcutLinked(filterPoints(ear), triangles, dim, minX, minY, invSize, 1);\n\n // if this didn't work, try curing all small self-intersections locally\n } else if (pass === 1) {\n ear = cureLocalIntersections(filterPoints(ear), triangles, dim);\n earcutLinked(ear, triangles, dim, minX, minY, invSize, 2);\n\n // as a last resort, try splitting the remaining polygon into two\n } else if (pass === 2) {\n splitEarcut(ear, triangles, dim, minX, minY, invSize);\n }\n\n break;\n }\n }\n}\n\n// check whether a polygon node forms a valid ear with adjacent nodes\nfunction isEar(ear) {\n var a = ear.prev,\n b = ear,\n c = ear.next;\n\n if (area(a, b, c) >= 0) return false; // reflex, can't be an ear\n\n // now make sure we don't have other points inside the potential ear\n var ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y;\n\n // triangle bbox; min & max are calculated like this for speed\n var x0 = ax < bx ? (ax < cx ? ax : cx) : (bx < cx ? bx : cx),\n y0 = ay < by ? (ay < cy ? ay : cy) : (by < cy ? by : cy),\n x1 = ax > bx ? (ax > cx ? ax : cx) : (bx > cx ? bx : cx),\n y1 = ay > by ? (ay > cy ? ay : cy) : (by > cy ? by : cy);\n\n var p = c.next;\n while (p !== a) {\n if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 &&\n pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) &&\n area(p.prev, p, p.next) >= 0) return false;\n p = p.next;\n }\n\n return true;\n}\n\nfunction isEarHashed(ear, minX, minY, invSize) {\n var a = ear.prev,\n b = ear,\n c = ear.next;\n\n if (area(a, b, c) >= 0) return false; // reflex, can't be an ear\n\n var ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y;\n\n // triangle bbox; min & max are calculated like this for speed\n var x0 = ax < bx ? (ax < cx ? ax : cx) : (bx < cx ? bx : cx),\n y0 = ay < by ? (ay < cy ? ay : cy) : (by < cy ? by : cy),\n x1 = ax > bx ? (ax > cx ? ax : cx) : (bx > cx ? bx : cx),\n y1 = ay > by ? (ay > cy ? ay : cy) : (by > cy ? by : cy);\n\n // z-order range for the current triangle bbox;\n var minZ = zOrder(x0, y0, minX, minY, invSize),\n maxZ = zOrder(x1, y1, minX, minY, invSize);\n\n var p = ear.prevZ,\n n = ear.nextZ;\n\n // look for points inside the triangle in both directions\n while (p && p.z >= minZ && n && n.z <= maxZ) {\n if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c &&\n pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false;\n p = p.prevZ;\n\n if (n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c &&\n pointInTriangle(ax, ay, bx, by, cx, cy, n.x, n.y) && area(n.prev, n, n.next) >= 0) return false;\n n = n.nextZ;\n }\n\n // look for remaining points in decreasing z-order\n while (p && p.z >= minZ) {\n if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c &&\n pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false;\n p = p.prevZ;\n }\n\n // look for remaining points in increasing z-order\n while (n && n.z <= maxZ) {\n if (n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c &&\n pointInTriangle(ax, ay, bx, by, cx, cy, n.x, n.y) && area(n.prev, n, n.next) >= 0) return false;\n n = n.nextZ;\n }\n\n return true;\n}\n\n// go through all polygon nodes and cure small local self-intersections\nfunction cureLocalIntersections(start, triangles, dim) {\n var p = start;\n do {\n var a = p.prev,\n b = p.next.next;\n\n if (!equals(a, b) && intersects(a, p, p.next, b) && locallyInside(a, b) && locallyInside(b, a)) {\n\n triangles.push(a.i / dim | 0);\n triangles.push(p.i / dim | 0);\n triangles.push(b.i / dim | 0);\n\n // remove two nodes involved\n removeNode(p);\n removeNode(p.next);\n\n p = start = b;\n }\n p = p.next;\n } while (p !== start);\n\n return filterPoints(p);\n}\n\n// try splitting polygon into two and triangulate them independently\nfunction splitEarcut(start, triangles, dim, minX, minY, invSize) {\n // look for a valid diagonal that divides the polygon into two\n var a = start;\n do {\n var b = a.next.next;\n while (b !== a.prev) {\n if (a.i !== b.i && isValidDiagonal(a, b)) {\n // split the polygon in two by the diagonal\n var c = splitPolygon(a, b);\n\n // filter colinear points around the cuts\n a = filterPoints(a, a.next);\n c = filterPoints(c, c.next);\n\n // run earcut on each half\n earcutLinked(a, triangles, dim, minX, minY, invSize, 0);\n earcutLinked(c, triangles, dim, minX, minY, invSize, 0);\n return;\n }\n b = b.next;\n }\n a = a.next;\n } while (a !== start);\n}\n\n// link every hole into the outer loop, producing a single-ring polygon without holes\nfunction eliminateHoles(data, holeIndices, outerNode, dim) {\n var queue = [],\n i, len, start, end, list;\n\n for (i = 0, len = holeIndices.length; i < len; i++) {\n start = holeIndices[i] * dim;\n end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\n list = linkedList(data, start, end, dim, false);\n if (list === list.next) list.steiner = true;\n queue.push(getLeftmost(list));\n }\n\n queue.sort(compareX);\n\n // process holes from left to right\n for (i = 0; i < queue.length; i++) {\n outerNode = eliminateHole(queue[i], outerNode);\n }\n\n return outerNode;\n}\n\nfunction compareX(a, b) {\n return a.x - b.x;\n}\n\n// find a bridge between vertices that connects hole with an outer ring and and link it\nfunction eliminateHole(hole, outerNode) {\n var bridge = findHoleBridge(hole, outerNode);\n if (!bridge) {\n return outerNode;\n }\n\n var bridgeReverse = splitPolygon(bridge, hole);\n\n // filter collinear points around the cuts\n filterPoints(bridgeReverse, bridgeReverse.next);\n return filterPoints(bridge, bridge.next);\n}\n\n// David Eberly's algorithm for finding a bridge between hole and outer polygon\nfunction findHoleBridge(hole, outerNode) {\n var p = outerNode,\n hx = hole.x,\n hy = hole.y,\n qx = -Infinity,\n m;\n\n // find a segment intersected by a ray from the hole's leftmost point to the left;\n // segment's endpoint with lesser x will be potential connection point\n do {\n if (hy <= p.y && hy >= p.next.y && p.next.y !== p.y) {\n var x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y);\n if (x <= hx && x > qx) {\n qx = x;\n m = p.x < p.next.x ? p : p.next;\n if (x === hx) return m; // hole touches outer segment; pick leftmost endpoint\n }\n }\n p = p.next;\n } while (p !== outerNode);\n\n if (!m) return null;\n\n // look for points inside the triangle of hole point, segment intersection and endpoint;\n // if there are no points found, we have a valid connection;\n // otherwise choose the point of the minimum angle with the ray as connection point\n\n var stop = m,\n mx = m.x,\n my = m.y,\n tanMin = Infinity,\n tan;\n\n p = m;\n\n do {\n if (hx >= p.x && p.x >= mx && hx !== p.x &&\n pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)) {\n\n tan = Math.abs(hy - p.y) / (hx - p.x); // tangential\n\n if (locallyInside(p, hole) &&\n (tan < tanMin || (tan === tanMin && (p.x > m.x || (p.x === m.x && sectorContainsSector(m, p)))))) {\n m = p;\n tanMin = tan;\n }\n }\n\n p = p.next;\n } while (p !== stop);\n\n return m;\n}\n\n// whether sector in vertex m contains sector in vertex p in the same coordinates\nfunction sectorContainsSector(m, p) {\n return area(m.prev, m, p.prev) < 0 && area(p.next, m, m.next) < 0;\n}\n\n// interlink polygon nodes in z-order\nfunction indexCurve(start, minX, minY, invSize) {\n var p = start;\n do {\n if (p.z === 0) p.z = zOrder(p.x, p.y, minX, minY, invSize);\n p.prevZ = p.prev;\n p.nextZ = p.next;\n p = p.next;\n } while (p !== start);\n\n p.prevZ.nextZ = null;\n p.prevZ = null;\n\n sortLinked(p);\n}\n\n// Simon Tatham's linked list merge sort algorithm\n// http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html\nfunction sortLinked(list) {\n var i, p, q, e, tail, numMerges, pSize, qSize,\n inSize = 1;\n\n do {\n p = list;\n list = null;\n tail = null;\n numMerges = 0;\n\n while (p) {\n numMerges++;\n q = p;\n pSize = 0;\n for (i = 0; i < inSize; i++) {\n pSize++;\n q = q.nextZ;\n if (!q) break;\n }\n qSize = inSize;\n\n while (pSize > 0 || (qSize > 0 && q)) {\n\n if (pSize !== 0 && (qSize === 0 || !q || p.z <= q.z)) {\n e = p;\n p = p.nextZ;\n pSize--;\n } else {\n e = q;\n q = q.nextZ;\n qSize--;\n }\n\n if (tail) tail.nextZ = e;\n else list = e;\n\n e.prevZ = tail;\n tail = e;\n }\n\n p = q;\n }\n\n tail.nextZ = null;\n inSize *= 2;\n\n } while (numMerges > 1);\n\n return list;\n}\n\n// z-order of a point given coords and inverse of the longer side of data bbox\nfunction zOrder(x, y, minX, minY, invSize) {\n // coords are transformed into non-negative 15-bit integer range\n x = (x - minX) * invSize | 0;\n y = (y - minY) * invSize | 0;\n\n x = (x | (x << 8)) & 0x00FF00FF;\n x = (x | (x << 4)) & 0x0F0F0F0F;\n x = (x | (x << 2)) & 0x33333333;\n x = (x | (x << 1)) & 0x55555555;\n\n y = (y | (y << 8)) & 0x00FF00FF;\n y = (y | (y << 4)) & 0x0F0F0F0F;\n y = (y | (y << 2)) & 0x33333333;\n y = (y | (y << 1)) & 0x55555555;\n\n return x | (y << 1);\n}\n\n// find the leftmost node of a polygon ring\nfunction getLeftmost(start) {\n var p = start,\n leftmost = start;\n do {\n if (p.x < leftmost.x || (p.x === leftmost.x && p.y < leftmost.y)) leftmost = p;\n p = p.next;\n } while (p !== start);\n\n return leftmost;\n}\n\n// check if a point lies within a convex triangle\nfunction pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (cx - px) * (ay - py) >= (ax - px) * (cy - py) &&\n (ax - px) * (by - py) >= (bx - px) * (ay - py) &&\n (bx - px) * (cy - py) >= (cx - px) * (by - py);\n}\n\n// check if a diagonal between two polygon nodes is valid (lies in polygon interior)\nfunction isValidDiagonal(a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && // dones't intersect other edges\n (locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && // locally visible\n (area(a.prev, a, b.prev) || area(a, b.prev, b)) || // does not create opposite-facing sectors\n equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0); // special zero-length case\n}\n\n// signed area of a triangle\nfunction area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}\n\n// check if two points are equal\nfunction equals(p1, p2) {\n return p1.x === p2.x && p1.y === p2.y;\n}\n\n// check if two segments intersect\nfunction intersects(p1, q1, p2, q2) {\n var o1 = sign(area(p1, q1, p2));\n var o2 = sign(area(p1, q1, q2));\n var o3 = sign(area(p2, q2, p1));\n var o4 = sign(area(p2, q2, q1));\n\n if (o1 !== o2 && o3 !== o4) return true; // general case\n\n if (o1 === 0 && onSegment(p1, p2, q1)) return true; // p1, q1 and p2 are collinear and p2 lies on p1q1\n if (o2 === 0 && onSegment(p1, q2, q1)) return true; // p1, q1 and q2 are collinear and q2 lies on p1q1\n if (o3 === 0 && onSegment(p2, p1, q2)) return true; // p2, q2 and p1 are collinear and p1 lies on p2q2\n if (o4 === 0 && onSegment(p2, q1, q2)) return true; // p2, q2 and q1 are collinear and q1 lies on p2q2\n\n return false;\n}\n\n// for collinear points p, q, r, check if point q lies on segment pr\nfunction onSegment(p, q, r) {\n return q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) && q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y);\n}\n\nfunction sign(num) {\n return num > 0 ? 1 : num < 0 ? -1 : 0;\n}\n\n// check if a polygon diagonal intersects any polygon segments\nfunction intersectsPolygon(a, b) {\n var p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n intersects(p, p.next, a, b)) return true;\n p = p.next;\n } while (p !== a);\n\n return false;\n}\n\n// check if a polygon diagonal is locally inside the polygon\nfunction locallyInside(a, b) {\n return area(a.prev, a, a.next) < 0 ?\n area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :\n area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n}\n\n// check if the middle point of a polygon diagonal is inside the polygon\nfunction middleInside(a, b) {\n var p = a,\n inside = false,\n px = (a.x + b.x) / 2,\n py = (a.y + b.y) / 2;\n do {\n if (((p.y > py) !== (p.next.y > py)) && p.next.y !== p.y &&\n (px < (p.next.x - p.x) * (py - p.y) / (p.next.y - p.y) + p.x))\n inside = !inside;\n p = p.next;\n } while (p !== a);\n\n return inside;\n}\n\n// link two polygon vertices with a bridge; if the vertices belong to the same ring, it splits polygon into two;\n// if one belongs to the outer ring and another to a hole, it merges it into a single ring\nfunction splitPolygon(a, b) {\n var a2 = new Node(a.i, a.x, a.y),\n b2 = new Node(b.i, b.x, b.y),\n an = a.next,\n bp = b.prev;\n\n a.next = b;\n b.prev = a;\n\n a2.next = an;\n an.prev = a2;\n\n b2.next = a2;\n a2.prev = b2;\n\n bp.next = b2;\n b2.prev = bp;\n\n return b2;\n}\n\n// create a node and optionally link it with previous one (in a circular doubly linked list)\nfunction insertNode(i, x, y, last) {\n var p = new Node(i, x, y);\n\n if (!last) {\n p.prev = p;\n p.next = p;\n\n } else {\n p.next = last.next;\n p.prev = last;\n last.next.prev = p;\n last.next = p;\n }\n return p;\n}\n\nfunction removeNode(p) {\n p.next.prev = p.prev;\n p.prev.next = p.next;\n\n if (p.prevZ) p.prevZ.nextZ = p.nextZ;\n if (p.nextZ) p.nextZ.prevZ = p.prevZ;\n}\n\nfunction Node(i, x, y) {\n // vertex index in coordinates array\n this.i = i;\n\n // vertex coordinates\n this.x = x;\n this.y = y;\n\n // previous and next vertex nodes in a polygon ring\n this.prev = null;\n this.next = null;\n\n // z-order curve value\n this.z = 0;\n\n // previous and next nodes in z-order\n this.prevZ = null;\n this.nextZ = null;\n\n // indicates whether this is a steiner point\n this.steiner = false;\n}\n\n// return a percentage difference between the polygon area and its triangulation area;\n// used to verify correctness of triangulation\nearcut.deviation = function (data, holeIndices, dim, triangles) {\n var hasHoles = holeIndices && holeIndices.length;\n var outerLen = hasHoles ? holeIndices[0] * dim : data.length;\n\n var polygonArea = Math.abs(signedArea(data, 0, outerLen, dim));\n if (hasHoles) {\n for (var i = 0, len = holeIndices.length; i < len; i++) {\n var start = holeIndices[i] * dim;\n var end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\n polygonArea -= Math.abs(signedArea(data, start, end, dim));\n }\n }\n\n var trianglesArea = 0;\n for (i = 0; i < triangles.length; i += 3) {\n var a = triangles[i] * dim;\n var b = triangles[i + 1] * dim;\n var c = triangles[i + 2] * dim;\n trianglesArea += Math.abs(\n (data[a] - data[c]) * (data[b + 1] - data[a + 1]) -\n (data[a] - data[b]) * (data[c + 1] - data[a + 1]));\n }\n\n return polygonArea === 0 && trianglesArea === 0 ? 0 :\n Math.abs((trianglesArea - polygonArea) / polygonArea);\n};\n\nfunction signedArea(data, start, end, dim) {\n var sum = 0;\n for (var i = start, j = end - dim; i < end; i += dim) {\n sum += (data[j] - data[i]) * (data[i + 1] + data[j + 1]);\n j = i;\n }\n return sum;\n}\n\n// turn a polygon in a multi-dimensional array form (e.g. as in GeoJSON) into a form Earcut accepts\nearcut.flatten = function (data) {\n var dim = data[0][0].length,\n result = {vertices: [], holes: [], dimensions: dim},\n holeIndex = 0;\n\n for (var i = 0; i < data.length; i++) {\n for (var j = 0; j < data[i].length; j++) {\n for (var d = 0; d < dim; d++) result.vertices.push(data[i][j][d]);\n }\n if (i > 0) {\n holeIndex += data[i - 1].length;\n result.holes.push(holeIndex);\n }\n }\n return result;\n};\n","import { EventState, FreeCameraMouseInput, Nullable, Observer, PointerEventTypes, PointerInfo, serialize } from '@babylonjs/core';\r\nimport { Sphere360Camera } from 'Framework/Components/Controls/XView/Cameras/Sphere360Camera';\r\n\r\nexport class Camera360MouseInput extends FreeCameraMouseInput {\r\n public declare camera: Sphere360Camera;\r\n\r\n private _wheel: Nullable<(p: PointerInfo, s: EventState) => void>;\r\n private _wheelObserver: Nullable>;\r\n\r\n /**\r\n * Gets or Set the mouse wheel precision or how fast is the camera zooming.\r\n */\r\n @serialize()\r\n public wheelPrecision = 3.0;\r\n\r\n /**\r\n * wheelDeltaPercentage will be used instead of wheelPrecision if different from 0.\r\n * It defines the percentage of current camera.radius to use as delta when wheel is used.\r\n */\r\n @serialize()\r\n public wheelDeltaPercentage = 0;\r\n\r\n /**\r\n * Attach the input controls to a specific dom element to get the input from.\r\n * @param noPreventDefault Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)\r\n */\r\n public attachControl(noPreventDefault?: boolean): void {\r\n super.attachControl(noPreventDefault);\r\n this._wheel = (p, s) => {\r\n //sanity check - this should be a PointerWheel event.\r\n if (p.type !== PointerEventTypes.POINTERWHEEL) { return; }\r\n const event = p.event;\r\n let delta = 0;\r\n\r\n let mouseWheelLegacyEvent = event as any;\r\n if (mouseWheelLegacyEvent.wheelDelta) {\r\n if (this.wheelDeltaPercentage) {\r\n const wheelDelta = (mouseWheelLegacyEvent.wheelDelta * 0.01 * this.wheelDeltaPercentage) * this.camera.fov;\r\n if (mouseWheelLegacyEvent.wheelDelta > 0) {\r\n delta = wheelDelta / (1.0 + this.wheelDeltaPercentage);\r\n } else {\r\n delta = wheelDelta * (1.0 + this.wheelDeltaPercentage);\r\n }\r\n } else {\r\n delta = mouseWheelLegacyEvent.wheelDelta / (this.wheelPrecision * 40);\r\n }\r\n } else {\r\n let deltaValue = event.deltaY || event.detail;\r\n delta = -deltaValue / this.wheelPrecision;\r\n }\r\n\r\n if (delta) {\r\n this.camera.inertialRadiusOffset += delta;\r\n }\r\n\r\n if (event.preventDefault) {\r\n if (!noPreventDefault) {\r\n event.preventDefault();\r\n }\r\n }\r\n };\r\n\r\n this._wheelObserver = this.camera.getScene().onPointerObservable.add(this._wheel, PointerEventTypes.POINTERWHEEL);\r\n }\r\n\r\n public detachControl() {\r\n const engine = this.camera.getEngine();\r\n const element = engine.getInputElement();\r\n\r\n if (this._wheelObserver && element) {\r\n this.camera.getScene().onPointerObservable.remove(this._wheelObserver);\r\n this._wheelObserver = null;\r\n this._wheel = null;\r\n }\r\n }\r\n}\r\n","import { BaseCameraPointersInput, Nullable, PointerTouch, serialize } from '@babylonjs/core';\r\nimport { Sphere360Camera } from 'Framework/Components/Controls/XView/Cameras/Sphere360Camera';\r\n\r\nexport class Camera360PointersInput extends BaseCameraPointersInput {\r\n /**\r\n * Called on pointer POINTERMOVE event if only a single touch is active.\r\n * Override this method to provide functionality.\r\n */\r\n public onTouch(point: Nullable,\r\n offsetX: number,\r\n offsetY: number): void {\r\n if (this.camera.getScene().useRightHandedSystem) { offsetX *= -1; }\r\n\r\n if (this.camera.parent && this.camera.parent._getWorldMatrixDeterminant() < 0) { offsetX *= -1; }\r\n\r\n const speed = this.camera.fov / this.angularSensibility;\r\n\r\n this.camera.cameraRotation.y += offsetX * speed;\r\n this.camera.cameraRotation.x += offsetY * speed;\r\n }\r\n\r\n /**\r\n * Called on pointer POINTERMOVE event if multiple touches are active.\r\n * Override this method to provide functionality.\r\n */\r\n public onMultiTouch(\r\n _pointA: Nullable,\r\n _pointB: Nullable,\r\n previousPinchSquaredDistance: number,\r\n pinchSquaredDistance: number,\r\n _previousMultiTouchPanPosition: Nullable,\r\n _multiTouchPanPosition: Nullable\r\n ): void {\r\n if (previousPinchSquaredDistance == 0 || pinchSquaredDistance == 0) {\r\n return;\r\n }\r\n\r\n let delta = pinchSquaredDistance - previousPinchSquaredDistance;\r\n delta /= this.angularPinchSensibility;\r\n this.camera.inertialRadiusOffset += delta;\r\n }\r\n\r\n public camera: Sphere360Camera;\r\n\r\n /**\r\n * Defines the pointer angular sensibility along the X and Y axis or how fast is the camera rotating.\r\n */\r\n @serialize()\r\n public angularSensibility = 2000.0;\r\n\r\n @serialize()\r\n public angularPinchSensibility = 600000.0;\r\n}\r\n","import { BaseCameraMouseWheelInput, serialize } from '@babylonjs/core';\r\nimport { Flat2DCamera } from 'Framework/Components/Controls/XView/Cameras';\r\n\r\nexport class ZoomAndPanMouseInput extends BaseCameraMouseWheelInput {\r\n /**\r\n * Called for each rendered frame.\r\n */\r\n public checkInputs(): void {\r\n if (this._wheelDeltaX === 0 && this._wheelDeltaY === 0 && this._wheelDeltaZ == 0) {\r\n return;\r\n }\r\n\r\n this.camera.inertialRadiusOffset += this._wheelDeltaY / this.angularPinchSensibility;\r\n\r\n // Call the base class implementation to handle observers and do cleanup.\r\n super.checkInputs();\r\n }\r\n\r\n public camera: Flat2DCamera;\r\n\r\n @serialize()\r\n public angularPinchSensibility = 600.0;\r\n}","import { BaseCameraPointersInput, Nullable, PointerTouch, serialize } from '@babylonjs/core';\r\nimport { Flat2DCamera } from 'Framework/Components/Controls/XView/Cameras';\r\n\r\nexport class ZoomAndPanPointersInput extends BaseCameraPointersInput {\r\n /**\r\n * Called on pointer POINTERMOVE event if only a single touch is active.\r\n * Override this method to provide functionality.\r\n */\r\n public onTouch(point: Nullable,\r\n offsetX: number,\r\n offsetY: number): void {\r\n if (this.camera.getScene().useRightHandedSystem) {\r\n offsetX *= -1;\r\n }\r\n\r\n if (this.camera.parent?._getWorldMatrixDeterminant() < 0) {\r\n offsetX *= -1;\r\n }\r\n\r\n let speed = this.camera.fov / this.sensibility;\r\n\r\n this.camera.position.x += speed * -offsetX;\r\n this.camera.position.y += speed * offsetY;\r\n }\r\n\r\n /**\r\n * Called on pointer POINTERMOVE event if multiple touches are active.\r\n * Override this method to provide functionality.\r\n */\r\n public onMultiTouch(\r\n pointA: Nullable,\r\n pointB: Nullable,\r\n previousPinchSquaredDistance: number,\r\n pinchSquaredDistance: number,\r\n _previousMultiTouchPanPosition: Nullable,\r\n _multiTouchPanPosition: Nullable\r\n ): void {\r\n if (pointA && pointB) {\r\n if (previousPinchSquaredDistance == 0 || pinchSquaredDistance == 0) {\r\n return;\r\n }\r\n\r\n this.camera.inertialRadiusOffset += (pinchSquaredDistance - previousPinchSquaredDistance) / this.pinchSensibility;\r\n }\r\n }\r\n\r\n public camera: Flat2DCamera;\r\n\r\n /**\r\n * Defines the pointer angular sensibility along the X and Y axis or how fast is the camera rotating.\r\n */\r\n @serialize()\r\n public sensibility = 1200.0;\r\n\r\n @serialize()\r\n public pinchSensibility = 10.0;\r\n}","import { Constants, Epsilon, Scene, UniversalCamera, Vector3, serialize } from '@babylonjs/core';\r\nimport { ICamera } from 'Framework/Components/Controls/XView/Cameras/ICamera';\r\nimport { ICoordinates } from 'Framework/Components/Controls/XView/Core';\r\nimport { ZoomAndPanMouseInput, ZoomAndPanPointersInput } from 'Framework/Components/Controls/XView/Inputs';\r\nimport { MathHelper } from 'Framework/Helpers/MathHelper';\r\n\r\nexport class Flat2DCamera extends UniversalCamera implements ICamera {\r\n public constructor(name: string, scene: Scene) {\r\n super(name, new Vector3(0, 0, -0.5), scene);\r\n\r\n this.fovMode = Constants.FOVMODE_HORIZONTAL_FIXED;\r\n this.minZ = 0.1;\r\n this.inputs.clear();\r\n this.inputs.add(new ZoomAndPanPointersInput());\r\n this.inputs.add(new ZoomAndPanMouseInput());\r\n }\r\n\r\n public lookTo(position: Vector3): void;\r\n public lookTo(position: ICoordinates): void;\r\n public lookTo(position: unknown): void {\r\n if (position instanceof Vector3\r\n || MathHelper.isPlanCoordinates(position)\r\n ) {\r\n this.position = new Vector3(position.x, position.y, -0.5);\r\n }\r\n else {\r\n throw new Error('Method lookTo with unknown position not implemented.');\r\n }\r\n }\r\n\r\n /**\r\n * Defines pitch rotation of the camera along the X axis.\r\n * @param pitch pitch in radian\r\n */\r\n public setPitch(pitch: number): void {\r\n this.rotation.x = pitch;\r\n }\r\n\r\n /**\r\n * Defines yaw rotation of the camera along the Y axis.\r\n * @param yaw yaw in radian\r\n */\r\n public setYaw(yaw: number): void {\r\n this.rotation.y = yaw;\r\n }\r\n\r\n /**\r\n * Defines roll rotation of the camera along the Z axis.\r\n * @param roll roll in radian\r\n */\r\n public setRoll(roll: number): void {\r\n this.rotation.z = roll;\r\n }\r\n\r\n /** @internal */\r\n public _checkInputs(): void {\r\n if (this.inertialRadiusOffset !== 0) {\r\n this.fov -= this.inertialRadiusOffset;\r\n this.inertialRadiusOffset *= this.inertia;\r\n\r\n if (Math.abs(this.inertialRadiusOffset) < this.speed * Epsilon) {\r\n this.inertialRadiusOffset = 0;\r\n }\r\n }\r\n\r\n // Limits\r\n this._checkLimits();\r\n\r\n super._checkInputs();\r\n }\r\n\r\n protected _checkLimits() {\r\n if (this.minFov !== null && this.fov < this.minFov) {\r\n this.fov = this.minFov;\r\n this.inertialRadiusOffset = 0;\r\n }\r\n\r\n if (this.maxFov !== null && this.fov > this.maxFov) {\r\n this.fov = this.maxFov;\r\n this.inertialRadiusOffset = 0;\r\n }\r\n }\r\n\r\n public maxFov: number;\r\n public minFov: number;\r\n\r\n /**\r\n * Current inertia value on the radius axis.\r\n * The bigger this number the longer it will take for the camera to stop.\r\n */\r\n @serialize()\r\n public inertialRadiusOffset: number = 0;\r\n}\r\n","import { Scene, serialize, UniversalCamera, Vector3 } from '@babylonjs/core';\r\nimport { ICamera } from 'Framework/Components/Controls/XView/Cameras/ICamera';\r\nimport { DefaultCoordinates, ICartesianCoordinates, ICoordinates } from 'Framework/Components/Controls/XView/Core';\r\nimport { Camera360MouseInput, Camera360PointersInput } from 'Framework/Components/Controls/XView/Inputs';\r\nimport { MathHelper } from 'Framework/Helpers/MathHelper';\r\n\r\nconst Epsilon = 0.001;\r\n\r\nexport class Sphere360Camera extends UniversalCamera implements ICamera {\r\n /**\r\n * Current inertia value on the radius axis.\r\n * The bigger this number the longer it will take for the camera to stop.\r\n */\r\n @serialize()\r\n public inertialRadiusOffset: number = 0;\r\n public maxFov: number = Math.PI / 2; //90°\r\n public minFov: number = Math.PI / 180; //1°\r\n\r\n private _camera360MouseInput: Camera360MouseInput = null;\r\n private _camera360TouchInput: Camera360PointersInput = null;\r\n\r\n public constructor(name: string, scene: Scene) {\r\n super(name, Vector3.Zero(), scene);\r\n this.inputs.clear();\r\n this.addMouse(false);\r\n this.addTouch();\r\n this._setupInputs();\r\n }\r\n\r\n /**\r\n * Defines the target the camera should look at,\r\n * @param position Cartesian coordinates, if null or undefined a zero value will be apply.\r\n */\r\n public lookTo(position: Vector3 | ICoordinates): void {\r\n let coordinates: Vector3 = null;\r\n\r\n if (position instanceof Vector3) {\r\n coordinates = position;\r\n }\r\n else {\r\n let cartesianCoordinates: ICartesianCoordinates = null;\r\n\r\n if (MathHelper.isSphericalCoordinates(position)) {\r\n cartesianCoordinates = MathHelper.toCartesianCoordinates(position);\r\n }\r\n else if (MathHelper.isCartesianCoordinates(position)) {\r\n cartesianCoordinates = position;\r\n }\r\n else {\r\n cartesianCoordinates = DefaultCoordinates;\r\n }\r\n\r\n //ASTM E57 != BABYLON Vector3 Coordinates system\r\n coordinates = new Vector3(\r\n //Adding 0 prevent the result from being \"-0\" if cartesianCoordinates == 0,\r\n //which would cause a 180° rotation due to the way that camera.setTarget\r\n //and math.atan2 are implemented\r\n -cartesianCoordinates.y + 0,\r\n cartesianCoordinates.z,\r\n cartesianCoordinates.x\r\n );\r\n }\r\n\r\n this.setTarget(coordinates);\r\n }\r\n\r\n /** @hidden */\r\n public _checkInputs(): void {\r\n\r\n if (this.inertialRadiusOffset !== 0) {\r\n\r\n this.fov -= this.inertialRadiusOffset;\r\n this.inertialRadiusOffset *= this.inertia;\r\n\r\n if (Math.abs(this.inertialRadiusOffset) < this.speed * Epsilon) {\r\n this.inertialRadiusOffset = 0;\r\n }\r\n }\r\n // Limits\r\n this._checkLimits();\r\n\r\n super._checkInputs();\r\n }\r\n\r\n protected _checkLimits() {\r\n\r\n if (this.minFov !== null && this.fov < this.minFov) {\r\n this.fov = this.minFov;\r\n this.inertialRadiusOffset = 0;\r\n }\r\n if (this.maxFov !== null && this.fov > this.maxFov) {\r\n this.fov = this.maxFov;\r\n this.inertialRadiusOffset = 0;\r\n }\r\n }\r\n\r\n /**\r\n * Add mouse input support to the input manager.\r\n * @param touchEnabled if the FreeCameraMouseInput should support touch (default: true)\r\n * @returns the current input manager\r\n */\r\n private addMouse(touchEnabled = true): void {\r\n if (this.inputs) {\r\n this._camera360MouseInput = new Camera360MouseInput(touchEnabled);\r\n this._camera360MouseInput.wheelPrecision = 1000;\r\n this.inputs.add(this._camera360MouseInput);\r\n }\r\n }\r\n\r\n private addTouch(): void {\r\n if (this.inputs) {\r\n this._camera360TouchInput = new Camera360PointersInput();\r\n this.inputs.add(this._camera360TouchInput);\r\n }\r\n }\r\n}\r\n","import { AbstractActionManager, Action, ActionManager, Animation, ExecuteCodeAction, Mesh } from '@babylonjs/core';\r\nimport { AdvancedDynamicTexture, Rectangle, TextBlock } from '@babylonjs/gui/2D';\r\nimport { ITooltipStyle, TooltipPosition, TooltipVisibility } from 'Framework/Components/Controls/XView/Core';\r\nimport { ColorHelper } from 'Framework/Helpers/ColorHelper';\r\n\r\nexport class Tooltip extends Rectangle {\r\n public constructor(\r\n text: string,\r\n advancedTexture: AdvancedDynamicTexture,\r\n anchor: Mesh,\r\n actionManager: AbstractActionManager,\r\n options: ITooltipStyle\r\n ) {\r\n super();\r\n\r\n this._anchor = anchor;\r\n this._actionManager = actionManager;\r\n this._guiTexture = advancedTexture;\r\n\r\n this.adaptWidthToChildren = true;\r\n this.adaptHeightToChildren = true;\r\n this.thickness = 1;\r\n this.background = '#00000080';\r\n\r\n this._textblock = new TextBlock();\r\n this._textblock.text = text;\r\n this._textblock.resizeToFit = true;\r\n this._textblock.paddingBottomInPixels = 5;\r\n this._textblock.paddingLeftInPixels = 5;\r\n this._textblock.paddingRightInPixels = 5;\r\n this._textblock.paddingTopInPixels = 5;\r\n\r\n this.addControl(this._textblock);\r\n advancedTexture.addControl(this);\r\n\r\n this.linkWithMesh(anchor);\r\n\r\n this.options = options;\r\n }\r\n\r\n private _setPosition(options: ITooltipStyle): void {\r\n const hotspotMeshSize: number = this._anchor.getBoundingInfo().boundingSphere.radius;\r\n\r\n const tooltipHeight: number = this._getHeight();\r\n const tooltipWidth: number = this._getWidth();\r\n\r\n let offsetX = (tooltipWidth / 2) + hotspotMeshSize;\r\n let offsetY = (tooltipHeight / 2) + hotspotMeshSize;\r\n\r\n switch (options.position) {\r\n case TooltipPosition.Top:\r\n this.linkOffsetY = -offsetY;\r\n break;\r\n case TooltipPosition.Bottom:\r\n this.linkOffsetY = offsetY;\r\n break;\r\n case TooltipPosition.Left:\r\n this.linkOffsetX = -offsetX;\r\n break;\r\n case TooltipPosition.Right:\r\n this.linkOffsetX = offsetX;\r\n break;\r\n }\r\n }\r\n\r\n private _bind(actionManager: AbstractActionManager): void {\r\n const onPointerOverAction = new ExecuteCodeAction(\r\n ActionManager.OnPointerOverTrigger,\r\n _ => {\r\n this.isVisible = true;\r\n this.linkedMesh.getScene().beginDirectAnimation(this, Tooltip.animations, 0, 30);\r\n }\r\n );\r\n\r\n const onPointerOutAction = new ExecuteCodeAction(\r\n ActionManager.OnPointerOutTrigger,\r\n _ => {\r\n this.linkedMesh.getScene().stopAnimation(this);\r\n this.isVisible = false;\r\n }\r\n );\r\n\r\n actionManager.registerAction(onPointerOverAction);\r\n actionManager.registerAction(onPointerOutAction);\r\n\r\n this._actions.push(onPointerOverAction, onPointerOutAction);\r\n }\r\n\r\n private _unbind(actionManager: AbstractActionManager): void {\r\n this._actions.forEach(a => {\r\n actionManager.unregisterAction(a);\r\n });\r\n\r\n this._actions = [];\r\n }\r\n\r\n private _getWidth(): number {\r\n const context = this._guiTexture.getContext();\r\n context.font = `${this._textblock.fontSize} ${this._textblock.fontFamily}`;\r\n const measure = context.measureText(this._textblock.text);\r\n\r\n return measure.width\r\n + this._textblock.paddingLeftInPixels\r\n + this._textblock.paddingRightInPixels\r\n + this.thickness * 2;\r\n }\r\n\r\n private _getHeight(): number {\r\n return this._textblock.fontSizeInPixels\r\n + this._textblock.paddingTopInPixels\r\n + this._textblock.paddingBottomInPixels\r\n + this.thickness * 2;\r\n }\r\n\r\n private _updateVisibility(): void {\r\n if (this.options.visibility == TooltipVisibility.Always) {\r\n this.isVisible = true;\r\n this._unbind(this._actionManager);\r\n }\r\n else {\r\n this.isVisible = false;\r\n this._bind(this._actionManager);\r\n }\r\n }\r\n\r\n public static get animations(): Array {\r\n if (Tooltip._animations.length == 0) {\r\n const alphaAnimation = new Animation('alphaAnimation', 'alpha', 50, Animation.ANIMATIONTYPE_FLOAT, Animation.ANIMATIONLOOPMODE_CONSTANT);\r\n const keys = [\r\n {\r\n frame: 0,\r\n value: 0\r\n },\r\n {\r\n frame: 20,\r\n value: 0\r\n },\r\n {\r\n frame: 25,\r\n value: 1\r\n }\r\n ];\r\n\r\n alphaAnimation.setKeys(keys);\r\n\r\n Tooltip._animations = [alphaAnimation];\r\n }\r\n\r\n return Tooltip._animations;\r\n }\r\n\r\n private _options: ITooltipStyle;\r\n public get options(): ITooltipStyle {\r\n return this._options;\r\n }\r\n\r\n public set options(value: ITooltipStyle) {\r\n this.color = ColorHelper.ParseColorToHexa(value.color);\r\n this._textblock.fontSize = value.size;\r\n this._options = value;\r\n this._updateVisibility();\r\n this._setPosition(value);\r\n }\r\n\r\n public set visibility(value: TooltipVisibility) {\r\n if (value != this.options?.visibility) {\r\n this.options.visibility = value;\r\n this._updateVisibility();\r\n }\r\n }\r\n\r\n private readonly _anchor: Mesh;\r\n private readonly _actionManager: AbstractActionManager;\r\n private readonly _guiTexture: AdvancedDynamicTexture;\r\n private readonly _textblock: TextBlock;\r\n private static _animations: Array = [];\r\n private _actions: Array = [];\r\n}\r\n","import { Mesh, Scene, Vector3, VertexData } from '@babylonjs/core';\r\nimport earcut from 'earcut';\r\n\r\nexport function CreatePolygon3D(\r\n name: string,\r\n points: Array,\r\n scene: Scene\r\n): Mesh {\r\n const mesh = new Mesh(name, scene);\r\n\r\n const flatPoints = points.flatMap(p => [p.x, p.y, p.z]);\r\n const trianglesIndices = earcut(flatPoints, null, 3);\r\n\r\n let normals = [];\r\n VertexData.ComputeNormals(flatPoints, trianglesIndices, normals);\r\n\r\n const vertexData = new VertexData();\r\n vertexData.positions = flatPoints;\r\n vertexData.indices = trianglesIndices;\r\n vertexData.normals = normals;\r\n vertexData.applyToMesh(mesh);\r\n\r\n return mesh;\r\n}\r\n","import { Animation, DynamicTexture, FileTools, IAnimationKey, IOfflineProvider, Nullable, Scene, Texture } from '@babylonjs/core';\r\n\r\nexport abstract class BaseDynamicImageTexture extends DynamicTexture {\r\n public constructor(name: string, image: HTMLImageElement | ImageBitmap, width: number, height: number, scene: Scene, samplingMode: number = Texture.TRILINEAR_SAMPLINGMODE, padding: number = 0) {\r\n super(\r\n name,\r\n { height: height + (2 * padding), width: width + (2 * padding) },\r\n scene,\r\n true,\r\n samplingMode\r\n );\r\n\r\n const context = this.getContext();\r\n context.drawImage(image, padding, padding, width, height);\r\n this.update();\r\n }\r\n}\r\n\r\nexport class IconTexture extends BaseDynamicImageTexture {\r\n public constructor(name: string, image: HTMLImageElement | ImageBitmap, width: number, height: number, scene: Scene, samplingMode: number = Texture.TRILINEAR_SAMPLINGMODE) {\r\n super(name, image, width, height, scene, samplingMode, 2);\r\n\r\n if (width > height) {\r\n this.vScale = width / height;\r\n this.vOffset = -(width - height) / (2 * height);\r\n }\r\n else if (height > width) {\r\n this.uScale = height / width;\r\n this.uOffset = -(height - width) / (2 * width);\r\n }\r\n\r\n this.wrapU = Texture.CLAMP_ADDRESSMODE;\r\n this.wrapV = Texture.CLAMP_ADDRESSMODE;\r\n this.wrapR = Texture.CLAMP_ADDRESSMODE;\r\n }\r\n}\r\n\r\nexport class AnimatedSpriteTexture extends BaseDynamicImageTexture {\r\n public constructor(name: string, image: HTMLImageElement | ImageBitmap, width: number, height: number, scene: Scene, nRows: number, nCols: number, frameRate: number, samplingMode: number = Texture.TRILINEAR_SAMPLINGMODE) {\r\n super(name, image, width, height, scene, samplingMode);\r\n\r\n this.vScale = 1 / nRows;\r\n this.uScale = 1 / nCols;\r\n\r\n // It seems that Babylon stops the animation right before reaching the last keyframe\r\n // (I suppose that this keyframe is only used to interpolate values in the interval between\r\n // the penultimate keyframe and the end of the animation).\r\n // We add a 'fake' last keyframe, so that when the animation stops right before it, the\r\n // last keyframe displayed is the 'true' last.\r\n const fakeLastKey: IAnimationKey = {\r\n frame: nRows * nCols,\r\n value: 0\r\n };\r\n\r\n if (nCols > 1) {\r\n const uAnimation = new Animation('uAnimation', 'uOffset', frameRate, Animation.ANIMATIONTYPE_FLOAT, Animation.ANIMATIONLOOPMODE_CYCLE);\r\n\r\n const keys = new Array(nCols * nRows).fill(0).map((_, i) => ({\r\n frame: i,\r\n value: (i % nCols) / nCols\r\n } as IAnimationKey));\r\n\r\n keys.push(fakeLastKey);\r\n uAnimation.setKeys(keys);\r\n\r\n // Don't interpolate between frames\r\n uAnimation.floatInterpolateFunction = startValue => startValue;\r\n\r\n this.animations.push(uAnimation);\r\n }\r\n\r\n if (nRows > 1) {\r\n const vAnimation = new Animation('vAnimation', 'vOffset', frameRate, Animation.ANIMATIONTYPE_FLOAT, Animation.ANIMATIONLOOPMODE_CYCLE);\r\n\r\n const keys = new Array(nRows).fill(0).map((_, i) => ({\r\n frame: i * nCols,\r\n value: (nRows - 1 - i) / nRows\r\n } as IAnimationKey));\r\n\r\n keys.push(fakeLastKey);\r\n vAnimation.setKeys(keys);\r\n\r\n // Don't interpolate between frames\r\n vAnimation.floatInterpolateFunction = startValue => startValue;\r\n\r\n this.animations.push(vAnimation);\r\n }\r\n }\r\n}\r\n\r\nexport class ResizedTextureProvider {\r\n public constructor(maxWidth: number, maxHeight: number) {\r\n this._maxWidth = maxWidth;\r\n this._maxHeight = maxHeight;\r\n }\r\n\r\n public async createIconTextureAsync(name: string, url: string, scene: Scene, samplingMode: number = Texture.TRILINEAR_SAMPLINGMODE): Promise {\r\n let texture = scene.getTextureByName(name);\r\n\r\n if (texture) {\r\n return texture as IconTexture;\r\n }\r\n\r\n let image: HTMLImageElement | ImageBitmap = null;\r\n\r\n try {\r\n image = await ResizedTextureProvider._fileToolsLoadSvgAsync(url, null);\r\n }\r\n catch (e) {\r\n image = await ResizedTextureProvider._fileToolsLoadSvgAsync(`${url}.svg`, null);\r\n }\r\n\r\n const { width, height } = this._computeNewDimensions(\r\n image,\r\n this._maxWidth,\r\n this._maxHeight\r\n );\r\n\r\n return new IconTexture(\r\n name,\r\n image,\r\n width,\r\n height,\r\n scene,\r\n samplingMode\r\n );\r\n }\r\n\r\n public async createAnimatedSpriteTextureAsync(name: string, url: string, scene: Scene, nRows: number, nCols: number, frameRate: number, samplingMode: number = Texture.TRILINEAR_SAMPLINGMODE): Promise {\r\n let image: HTMLImageElement | ImageBitmap = null;\r\n\r\n try {\r\n image = await ResizedTextureProvider._fileToolsLoadSvgAsync(url, null);\r\n }\r\n catch (e) {\r\n image = await ResizedTextureProvider._fileToolsLoadSvgAsync(`${url}.svg`, null);\r\n }\r\n\r\n const { width, height } = this._computeNewDimensions(\r\n image,\r\n this._maxWidth * nCols,\r\n this._maxHeight * nRows\r\n );\r\n\r\n return new AnimatedSpriteTexture(\r\n name,\r\n image,\r\n width,\r\n height,\r\n scene,\r\n nRows,\r\n nCols,\r\n frameRate,\r\n samplingMode\r\n );\r\n }\r\n\r\n\r\n private _computeNewDimensions(image: HTMLImageElement | ImageBitmap, maxWidth: number, maxHeight: number): { width: number, height: number } {\r\n const resizeWidthFactor = image.width / maxWidth;\r\n const resizeHeightFactor = image.height / maxHeight;\r\n\r\n return resizeWidthFactor > resizeHeightFactor\r\n ? { width: maxWidth, height: image.height / resizeWidthFactor }\r\n : { width: image.width / resizeHeightFactor, height: maxHeight };\r\n }\r\n\r\n private static async _fileToolsLoadSvgAsync(url: string, offlineProvider: Nullable, mimeType?: string): Promise {\r\n try {\r\n const file = await ResizedTextureProvider._fileToolsLoadFileAsync(url, offlineProvider);\r\n\r\n if (typeof (file.data) === 'string') {\r\n let svg = file.data;\r\n const svgDocument = new DOMParser().parseFromString(svg, 'image/svg+xml');\r\n const svgDocumentElement = svgDocument.documentElement as any;\r\n\r\n svgDocumentElement.width.baseVal.valueAsString = svgDocumentElement.width.baseVal.value\r\n ? svgDocumentElement.width.baseVal.value.toString()\r\n : svgDocumentElement.viewBox.baseVal.width.toString();\r\n\r\n svgDocumentElement.height.baseVal.valueAsString = svgDocumentElement.height.baseVal.value\r\n ? svgDocumentElement.height.baseVal.value.toString()\r\n : svgDocumentElement.viewBox.baseVal.height.toString();\r\n\r\n svg = new XMLSerializer().serializeToString(svgDocument);\r\n\r\n const base64EncodedSVG = 'data:image/svg+xml;base64,' + btoa(svg);\r\n return await ResizedTextureProvider._fileToolsLoadImageAsync(base64EncodedSVG, offlineProvider, mimeType);\r\n }\r\n else {\r\n return await ResizedTextureProvider._fileToolsLoadImageAsync(url, offlineProvider, mimeType);\r\n }\r\n }\r\n catch (e) {\r\n return await ResizedTextureProvider._fileToolsLoadImageAsync(url, offlineProvider, mimeType);\r\n }\r\n }\r\n\r\n private static _fileToolsLoadImageAsync(url: string, offlineProvider: Nullable, mimeType?: string): Promise {\r\n return new Promise((resolve, reject) => {\r\n FileTools.LoadImage(\r\n url,\r\n resolve,\r\n reject,\r\n offlineProvider,\r\n mimeType\r\n );\r\n });\r\n }\r\n\r\n private static _fileToolsLoadFileAsync(url: string, offlineProvider: Nullable, useArrayBuffer?: boolean): Promise<{ data: string | ArrayBuffer, responseURL?: string }> {\r\n return new Promise((resolve, reject) => {\r\n FileTools.LoadFile(\r\n url,\r\n (data: string | ArrayBuffer, responseURL?: string) => resolve({ data, responseURL }),\r\n null,\r\n offlineProvider,\r\n useArrayBuffer,\r\n reject\r\n );\r\n });\r\n }\r\n\r\n private readonly _maxWidth: number;\r\n private readonly _maxHeight: number;\r\n}\r\n","import fontData from '@/assets/typefaces/Droid Sans_Bold.json';\r\nimport { ActionManager, Camera, Color3, Engine, ExecuteCodeAction, HighlightLayer, Mesh, MeshBuilder, Scene, SceneOptions, SetValueAction, StandardMaterial, Texture, TransformNode, Vector3 } from '@babylonjs/core';\r\nimport { AdvancedDynamicTexture } from '@babylonjs/gui/2D';\r\nimport { ITextRenderer, RendererHelper } from 'Api/Contracts/Dtos';\r\nimport earcut from 'earcut';\r\nimport { IHotspot, IIconProvider, ITooltipStyle, TextureTypes, TooltipStyle } from 'Framework/Components/Controls/XView/Core';\r\nimport { Tooltip } from 'Framework/Components/Controls/XView/GUI';\r\nimport { CreatePolygon3D } from 'Framework/Components/Controls/XView/Meshes';\r\nimport { ResizedTextureProvider } from 'Framework/Components/Controls/XView/XView.Textures';\r\nimport { Viewer360 } from 'Framework/Components/Controls/XView/XView.Viewer360';\r\nimport { ColorHelper } from 'Framework/Helpers/ColorHelper';\r\nimport { EnumHelper } from 'Framework/Helpers/EnumHelper';\r\n\r\nexport abstract class BaseHotspotOverlay extends Scene {\r\n public constructor(engine: Engine, camera: Camera, viewer: Viewer360, iconProvider: IIconProvider, options?: SceneOptions) {\r\n super(engine, options);\r\n this.addTransformNode(new TransformNode('root'));\r\n\r\n this._viewer = viewer;\r\n this._iconProvider = iconProvider;\r\n\r\n this._textureProvider = new ResizedTextureProvider(64, 64);\r\n this._tooltipsGui = AdvancedDynamicTexture.CreateFullscreenUI('tooltipsGUI', true, this);\r\n this._highlightLayers = {};\r\n\r\n this.activeCamera = camera;\r\n this.autoClear = false;\r\n\r\n this.onBeforeRenderObservable.add(e => {\r\n let fov = this.activeCamera.fov;\r\n let scaleFactor = (80 / 180 * Math.PI / fov);\r\n\r\n this._tooltipsGui.renderScale = 1 / scaleFactor;\r\n });\r\n }\r\n\r\n public clear(): void {\r\n while (this.meshes.length > 0) {\r\n const mesh = this.meshes[0];\r\n mesh.dispose(false, true);\r\n }\r\n\r\n this._tooltipsGui.executeOnAllControls(tooltip => {\r\n tooltip.dispose();\r\n });\r\n\r\n for (const key in this._highlightLayers) {\r\n this._highlightLayers[key].dispose();\r\n delete this._highlightLayers[key];\r\n }\r\n }\r\n\r\n public async loadHotspotsAsync(hotspots: Array): Promise {\r\n for (const hotspot of hotspots) {\r\n const isIconHotspot = hotspot.coordinates.length == 1;\r\n\r\n try {\r\n const mesh: Mesh = await this._createHotspotMeshAsync(hotspot);\r\n\r\n this._addEventListeners(hotspot, mesh);\r\n\r\n this._addTooltip(hotspot, mesh, isIconHotspot);\r\n }\r\n catch {\r\n console.error(`Error loading hotspot: ${hotspot.name}`);\r\n continue;\r\n }\r\n }\r\n }\r\n\r\n public setOrigin(originX: number, originY: number, originZ: number): void {\r\n const transformNode = this.getTransformNodeByName('root');\r\n\r\n transformNode.position = new Vector3(originX, originY, originZ);\r\n }\r\n\r\n private _addTooltip(hotspot: IHotspot, mesh: Mesh, isIconHotspot: boolean) {\r\n if (hotspot.content.tooltip) {\r\n const tooltipStyle: ITooltipStyle = hotspot.content.tooltipStyle ?? (isIconHotspot\r\n ? TooltipStyle.defaultTop\r\n : TooltipStyle.defaultCenter);\r\n\r\n const _ = new Tooltip(\r\n hotspot.content.tooltip,\r\n this._tooltipsGui,\r\n mesh,\r\n mesh.actionManager,\r\n tooltipStyle\r\n );\r\n }\r\n }\r\n\r\n private _addEventListeners(hotspot: IHotspot, mesh: Mesh): void {\r\n if (hotspot.onclick) {\r\n mesh.actionManager.registerAction(new ExecuteCodeAction(\r\n ActionManager.OnPickTrigger,\r\n _ => {\r\n hotspot.onclick(hotspot);\r\n }\r\n ));\r\n }\r\n }\r\n\r\n private async _createHotspotMeshAsync(hotspot: IHotspot): Promise {\r\n let mesh: Mesh;\r\n\r\n if (RendererHelper.isIconRenderer(hotspot.content)) {\r\n mesh = await this._createIconMeshAsync(hotspot);\r\n }\r\n else if (RendererHelper.isShapeRenderer(hotspot.content)) {\r\n mesh = await this._createShapeMeshAsync(hotspot);\r\n }\r\n else if (RendererHelper.isTextRenderer(hotspot.content)) {\r\n mesh = await this._createTextMeshAsync(hotspot);\r\n }\r\n else {\r\n throw new Error('Not supported');\r\n }\r\n\r\n mesh.parent = this.getTransformNodeByName('root');\r\n\r\n return mesh;\r\n }\r\n\r\n private async _createTextMeshAsync(hotspot: IHotspot): Promise {\r\n const content = hotspot.content as ITextRenderer;\r\n const doubleMargin = content.size / 4;\r\n\r\n const textMesh = MeshBuilder.CreateText(\r\n 'text',\r\n content.text,\r\n fontData,\r\n { size: content.size, depth: Number.MIN_VALUE },\r\n this,\r\n earcut);\r\n\r\n const boundingBox = textMesh.getBoundingInfo().boundingBox;\r\n const size = boundingBox.maximum.subtract(boundingBox.minimum);\r\n\r\n //Center mesh origin\r\n textMesh.position = size.scale(0.5).subtract(boundingBox.maximum);\r\n textMesh.bakeCurrentTransformIntoVertices();\r\n\r\n const material = new StandardMaterial('textMaterial', this);\r\n\r\n const rgbaColor = ColorHelper.ParseColorToRgba(content.color);\r\n material.emissiveColor = Color3.FromInts(rgbaColor.r, rgbaColor.g, rgbaColor.b);\r\n material.alpha = rgbaColor.a;\r\n\r\n textMesh.material = material;\r\n\r\n const box = MeshBuilder.CreateBox(\r\n 'box',\r\n {\r\n width: size.x + doubleMargin,\r\n height: size.y + doubleMargin,\r\n depth: size.z\r\n },\r\n this);\r\n\r\n box.actionManager = new ActionManager(this);\r\n\r\n box.material = new StandardMaterial('transparent', this);\r\n box.material.alpha = 0;\r\n\r\n textMesh.parent = box;\r\n\r\n await this.onMeshIconCreatedAsync(hotspot, box);\r\n\r\n return box;\r\n }\r\n\r\n private async _createIconMeshAsync(hotspot: IHotspot): Promise {\r\n const mesh = MeshBuilder.CreatePlane(hotspot.name, { size: hotspot.content.size }, this);\r\n const material = new StandardMaterial(`${hotspot.name}-mat`, this);\r\n\r\n const iconInfos = this._iconProvider.getIconInfo(hotspot);\r\n\r\n let texture: Texture;\r\n\r\n if (iconInfos.animation) {\r\n texture = await this._textureProvider.createAnimatedSpriteTextureAsync(\r\n `${hotspot.name}-tex`,\r\n iconInfos.url,\r\n this,\r\n iconInfos.animation.nRows,\r\n iconInfos.animation.nCols,\r\n iconInfos.animation.frameRate\r\n );\r\n\r\n this.beginAnimation(texture, iconInfos.animation.startFrame, iconInfos.animation.endFrame + 1, true);\r\n }\r\n else {\r\n texture = await this._textureProvider.createIconTextureAsync(\r\n `${hotspot.content.icon}-tex`,\r\n iconInfos.url,\r\n this\r\n );\r\n }\r\n\r\n if (EnumHelper.hasFlag(iconInfos.textureType, TextureTypes.OpacityTexture)) {\r\n texture.hasAlpha = true;\r\n material.opacityTexture = texture;\r\n\r\n if (iconInfos.textureType == TextureTypes.OpacityTexture) {\r\n const rgbaColor = ColorHelper.ParseColorToRgba(hotspot.content.color);\r\n material.emissiveColor = Color3.FromInts(rgbaColor.r, rgbaColor.g, rgbaColor.b);\r\n material.alpha = rgbaColor.a;\r\n }\r\n }\r\n\r\n if (EnumHelper.hasFlag(iconInfos.textureType, TextureTypes.EmissiveTexture)) {\r\n material.emissiveTexture = texture;\r\n }\r\n\r\n if (EnumHelper.hasFlag(iconInfos.textureType, TextureTypes.AmbientTexture)) {\r\n material.ambientTexture = texture;\r\n }\r\n\r\n if (EnumHelper.hasFlag(iconInfos.textureType, TextureTypes.SpecularTexture)) {\r\n material.specularTexture = texture;\r\n }\r\n\r\n if (EnumHelper.hasFlag(iconInfos.textureType, TextureTypes.DiffuseTexture)) {\r\n material.diffuseTexture = texture;\r\n }\r\n\r\n mesh.material = material;\r\n mesh.actionManager = new ActionManager(this);\r\n\r\n await this.onMeshIconCreatedAsync(hotspot, mesh);\r\n\r\n return mesh;\r\n }\r\n\r\n protected abstract onMeshIconCreatedAsync(hotspot: IHotspot, mesh: Mesh): Promise;\r\n protected abstract getCartesianCoordinatesOfShapeAsync(hotspot: IHotspot): Promise>;\r\n\r\n private async _createShapeMeshAsync(hotspot: IHotspot): Promise {\r\n const cartesianCoordinates = await this.getCartesianCoordinatesOfShapeAsync(hotspot);\r\n const rgbaColor = ColorHelper.ParseColorToRgba(hotspot.content.color);\r\n const rgbaHoverColor = ColorHelper.ParseColorToRgba(hotspot.content.hoverColor);\r\n\r\n const polygon = this._createPolygon(\r\n cartesianCoordinates,\r\n Color3.FromInts(rgbaColor.r, rgbaColor.g, rgbaColor.b),\r\n rgbaColor.a,\r\n Color3.FromInts(rgbaHoverColor.r, rgbaHoverColor.g, rgbaHoverColor.b),\r\n rgbaHoverColor.a\r\n );\r\n\r\n if (hotspot.content.stroke.width > 0) {\r\n const rgbaStrokeColor = ColorHelper.ParseColorToRgba(hotspot.content.stroke.color);\r\n const strokeColor = Color3.FromInts(rgbaStrokeColor.r, rgbaStrokeColor.g, rgbaStrokeColor.b);\r\n this._createOutline(polygon, hotspot.content.stroke.width, strokeColor);\r\n }\r\n\r\n return polygon;\r\n }\r\n\r\n private _createPolygon(coordinates: Array, color: Color3, alpha: number, hoverColor: Color3, hoverAlpha: number): Mesh {\r\n const polygon = CreatePolygon3D('polygon', coordinates, this);\r\n\r\n const material = new StandardMaterial('material', this);\r\n material.emissiveColor = color;\r\n material.alpha = alpha;\r\n material.backFaceCulling = false;\r\n\r\n polygon.material = material;\r\n polygon.freezeWorldMatrix();\r\n\r\n polygon.actionManager = new ActionManager(this);\r\n\r\n polygon.actionManager.registerAction(new SetValueAction(\r\n ActionManager.OnPointerOverTrigger,\r\n material,\r\n 'emissiveColor',\r\n hoverColor\r\n ));\r\n\r\n polygon.actionManager.registerAction(new SetValueAction(\r\n ActionManager.OnPointerOverTrigger,\r\n material,\r\n 'alpha',\r\n hoverAlpha\r\n ));\r\n\r\n polygon.actionManager.registerAction(new SetValueAction(\r\n ActionManager.OnPointerOutTrigger,\r\n material,\r\n 'emissiveColor',\r\n color\r\n ));\r\n\r\n polygon.actionManager.registerAction(new SetValueAction(\r\n ActionManager.OnPointerOutTrigger,\r\n material,\r\n 'alpha',\r\n alpha\r\n ));\r\n\r\n return polygon;\r\n }\r\n\r\n private _createOutline(mesh: Mesh, width: number, color: Color3): void {\r\n let highlightLayer = this._highlightLayers[width];\r\n\r\n if (!highlightLayer) {\r\n highlightLayer = new HighlightLayer(\r\n 'outline',\r\n this,\r\n {\r\n isStroke: true,\r\n //Empirical formula to get a seemingly linear grow from a min size of 1\r\n //to a max size of 15, with a decent resolution.\r\n //An alternative is to use constant mainTextureFixedSize and play with blurVerticalSize\r\n //and blurHorizontalSize, but it causes aliasing in the angles\r\n mainTextureFixedSize: 8192 / (width + 1) - 300\r\n }\r\n );\r\n\r\n this._highlightLayers[width] = highlightLayer;\r\n }\r\n\r\n highlightLayer.addMesh(mesh, color);\r\n }\r\n\r\n protected readonly _textureProvider: ResizedTextureProvider;\r\n protected readonly _viewer: Viewer360;\r\n protected readonly _iconProvider: IIconProvider;\r\n protected readonly _tooltipsGui: AdvancedDynamicTexture;\r\n protected readonly _highlightLayers: Record;\r\n}\r\n","import { Vector3 } from \"@babylonjs/core/Maths/math.vector.js\";\n/**\n * Class used to transport Vector3 information for pointer events\n */\nexport class Vector3WithInfo extends Vector3 {\n /**\n * Creates a new Vector3WithInfo\n * @param source defines the vector3 data to transport\n * @param buttonIndex defines the current mouse button index\n */\n constructor(source, \n /** defines the current mouse button index */\n buttonIndex = 0) {\n super(source.x, source.y, source.z);\n this.buttonIndex = buttonIndex;\n }\n}\n//# sourceMappingURL=vector3WithInfo.js.map","import { Observable } from \"@babylonjs/core/Misc/observable.js\";\nimport { Vector3 } from \"@babylonjs/core/Maths/math.vector.js\";\nimport { PointerEventTypes } from \"@babylonjs/core/Events/pointerEvents.js\";\nimport { AbstractMesh } from \"@babylonjs/core/Meshes/abstractMesh.js\";\nimport { Vector3WithInfo } from \"../vector3WithInfo.js\";\n/**\n * Class used as base class for controls\n */\nexport class Control3D {\n /** Gets or sets the control position in world space */\n get position() {\n if (!this._node) {\n return Vector3.Zero();\n }\n return this._node.position;\n }\n set position(value) {\n if (!this._node) {\n return;\n }\n this._node.position = value;\n }\n /** Gets or sets the control scaling in world space */\n get scaling() {\n if (!this._node) {\n return new Vector3(1, 1, 1);\n }\n return this._node.scaling;\n }\n set scaling(value) {\n if (!this._node) {\n return;\n }\n this._isScaledByManager = false;\n this._node.scaling = value;\n }\n /**\n * Gets the list of attached behaviors\n * @see https://doc.babylonjs.com/features/featuresDeepDive/behaviors\n */\n get behaviors() {\n return this._behaviors;\n }\n /**\n * Attach a behavior to the control\n * @see https://doc.babylonjs.com/features/featuresDeepDive/behaviors\n * @param behavior defines the behavior to attach\n * @returns the current control\n */\n addBehavior(behavior) {\n const index = this._behaviors.indexOf(behavior);\n if (index !== -1) {\n return this;\n }\n behavior.init();\n const scene = this._host.scene;\n if (scene.isLoading) {\n // We defer the attach when the scene will be loaded\n scene.onDataLoadedObservable.addOnce(() => {\n behavior.attach(this);\n });\n }\n else {\n behavior.attach(this);\n }\n this._behaviors.push(behavior);\n return this;\n }\n /**\n * Remove an attached behavior\n * @see https://doc.babylonjs.com/features/featuresDeepDive/behaviors\n * @param behavior defines the behavior to attach\n * @returns the current control\n */\n removeBehavior(behavior) {\n const index = this._behaviors.indexOf(behavior);\n if (index === -1) {\n return this;\n }\n this._behaviors[index].detach();\n this._behaviors.splice(index, 1);\n return this;\n }\n /**\n * Gets an attached behavior by name\n * @param name defines the name of the behavior to look for\n * @see https://doc.babylonjs.com/features/featuresDeepDive/behaviors\n * @returns null if behavior was not found else the requested behavior\n */\n getBehaviorByName(name) {\n for (const behavior of this._behaviors) {\n if (behavior.name === name) {\n return behavior;\n }\n }\n return null;\n }\n /** Gets or sets a boolean indicating if the control is visible */\n get isVisible() {\n return this._isVisible;\n }\n set isVisible(value) {\n if (this._isVisible === value) {\n return;\n }\n this._isVisible = value;\n const mesh = this.mesh;\n if (mesh) {\n mesh.setEnabled(value);\n }\n }\n /**\n * Creates a new control\n * @param name defines the control name\n */\n constructor(\n /** Defines the control name */\n name) {\n this.name = name;\n this._downCount = 0;\n this._enterCount = -1;\n this._downPointerIds = {}; // Store number of pointer downs per ID, from near and far interactions\n this._isVisible = true;\n /** @internal */\n this._isScaledByManager = false;\n /**\n * An event triggered when the pointer moves over the control\n */\n this.onPointerMoveObservable = new Observable();\n /**\n * An event triggered when the pointer moves out of the control\n */\n this.onPointerOutObservable = new Observable();\n /**\n * An event triggered when the pointer taps the control\n */\n this.onPointerDownObservable = new Observable();\n /**\n * An event triggered when pointer is up\n */\n this.onPointerUpObservable = new Observable();\n /**\n * An event triggered when a control is clicked on (with a mouse)\n */\n this.onPointerClickObservable = new Observable();\n /**\n * An event triggered when pointer enters the control\n */\n this.onPointerEnterObservable = new Observable();\n // Behaviors\n this._behaviors = new Array();\n }\n /**\n * Gets a string representing the class name\n */\n get typeName() {\n return this._getTypeName();\n }\n /**\n * Get the current class name of the control.\n * @returns current class name\n */\n getClassName() {\n return this._getTypeName();\n }\n _getTypeName() {\n return \"Control3D\";\n }\n /**\n * Gets the transform node used by this control\n */\n get node() {\n return this._node;\n }\n /**\n * Gets the mesh used to render this control\n */\n get mesh() {\n if (this._node instanceof AbstractMesh) {\n return this._node;\n }\n return null;\n }\n /**\n * Link the control as child of the given node\n * @param node defines the node to link to. Use null to unlink the control\n * @returns the current control\n */\n linkToTransformNode(node) {\n if (this._node) {\n this._node.parent = node;\n }\n return this;\n }\n /**\n * @internal*\n */\n _prepareNode(scene) {\n if (!this._node) {\n this._node = this._createNode(scene);\n if (!this.node) {\n return;\n }\n this._injectGUI3DReservedDataStore(this.node).control = this; // Store the control on the reservedDataStore field in order to get it when picking\n const mesh = this.mesh;\n if (mesh) {\n mesh.isPickable = true;\n this._affectMaterial(mesh);\n }\n }\n }\n _injectGUI3DReservedDataStore(node) {\n var _a, _b;\n node.reservedDataStore = (_a = node.reservedDataStore) !== null && _a !== void 0 ? _a : {};\n node.reservedDataStore.GUI3D = (_b = node.reservedDataStore.GUI3D) !== null && _b !== void 0 ? _b : {};\n return node.reservedDataStore.GUI3D;\n }\n /**\n * Node creation.\n * Can be overriden by children\n * @param scene defines the scene where the node must be attached\n * @returns the attached node or null if none. Must return a Mesh or AbstractMesh if there is an attached visible object\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _createNode(scene) {\n // Do nothing by default\n return null;\n }\n /**\n * Affect a material to the given mesh\n * @param mesh defines the mesh which will represent the control\n */\n _affectMaterial(mesh) {\n mesh.material = null;\n }\n _isTouchButton3D(control) {\n return control._generatePointerEventType !== undefined;\n }\n // Pointers\n /**\n * @internal\n */\n _onPointerMove(target, coordinates) {\n this.onPointerMoveObservable.notifyObservers(coordinates, -1, target, this);\n }\n /**\n * @internal\n */\n _onPointerEnter(target) {\n if (this._enterCount === -1) {\n // -1 is for touch input, we are now sure we are with a mouse or pencil\n this._enterCount = 0;\n }\n this._enterCount++;\n if (this._enterCount > 1) {\n return false;\n }\n this.onPointerEnterObservable.notifyObservers(this, -1, target, this);\n if (this.pointerEnterAnimation) {\n this.pointerEnterAnimation();\n }\n return true;\n }\n /**\n * @internal\n */\n _onPointerOut(target) {\n this._enterCount--;\n if (this._enterCount > 0) {\n return;\n }\n this._enterCount = 0;\n this.onPointerOutObservable.notifyObservers(this, -1, target, this);\n if (this.pointerOutAnimation) {\n this.pointerOutAnimation();\n }\n }\n /**\n * @internal\n */\n _onPointerDown(target, coordinates, pointerId, buttonIndex) {\n this._downCount++;\n this._downPointerIds[pointerId] = this._downPointerIds[pointerId] + 1 || 1;\n if (this._downCount !== 1) {\n return false;\n }\n this.onPointerDownObservable.notifyObservers(new Vector3WithInfo(coordinates, buttonIndex), -1, target, this);\n if (this.pointerDownAnimation) {\n this.pointerDownAnimation();\n }\n return true;\n }\n /**\n * @internal\n */\n _onPointerUp(target, coordinates, pointerId, buttonIndex, notifyClick) {\n this._downCount--;\n this._downPointerIds[pointerId]--;\n if (this._downPointerIds[pointerId] <= 0) {\n delete this._downPointerIds[pointerId];\n }\n if (this._downCount < 0) {\n // Handle if forcePointerUp was called prior to this\n this._downCount = 0;\n return;\n }\n if (this._downCount == 0) {\n if (notifyClick && (this._enterCount > 0 || this._enterCount === -1)) {\n this.onPointerClickObservable.notifyObservers(new Vector3WithInfo(coordinates, buttonIndex), -1, target, this);\n }\n this.onPointerUpObservable.notifyObservers(new Vector3WithInfo(coordinates, buttonIndex), -1, target, this);\n if (this.pointerUpAnimation) {\n this.pointerUpAnimation();\n }\n }\n }\n /**\n * @internal\n */\n forcePointerUp(pointerId = null) {\n if (pointerId !== null) {\n this._onPointerUp(this, Vector3.Zero(), pointerId, 0, true);\n }\n else {\n for (const key in this._downPointerIds) {\n this._onPointerUp(this, Vector3.Zero(), +key, 0, true);\n }\n if (this._downCount > 0) {\n this._downCount = 1;\n this._onPointerUp(this, Vector3.Zero(), 0, 0, true);\n }\n }\n }\n /**\n * @internal\n */\n _processObservables(type, pickedPoint, originMeshPosition, pointerId, buttonIndex) {\n if (this._isTouchButton3D(this) && originMeshPosition) {\n type = this._generatePointerEventType(type, originMeshPosition, this._downCount);\n }\n if (type === PointerEventTypes.POINTERMOVE) {\n this._onPointerMove(this, pickedPoint);\n const previousControlOver = this._host._lastControlOver[pointerId];\n if (previousControlOver && previousControlOver !== this) {\n previousControlOver._onPointerOut(this);\n }\n if (previousControlOver !== this) {\n this._onPointerEnter(this);\n }\n this._host._lastControlOver[pointerId] = this;\n return true;\n }\n if (type === PointerEventTypes.POINTERDOWN) {\n this._onPointerDown(this, pickedPoint, pointerId, buttonIndex);\n this._host._lastControlDown[pointerId] = this;\n this._host._lastPickedControl = this;\n return true;\n }\n if (type === PointerEventTypes.POINTERUP || type === PointerEventTypes.POINTERDOUBLETAP) {\n if (this._host._lastControlDown[pointerId]) {\n this._host._lastControlDown[pointerId]._onPointerUp(this, pickedPoint, pointerId, buttonIndex, true);\n }\n delete this._host._lastControlDown[pointerId];\n return true;\n }\n return false;\n }\n /** @internal */\n _disposeNode() {\n if (this._node) {\n this._node.dispose();\n this._node = null;\n }\n }\n /**\n * Releases all associated resources\n */\n dispose() {\n this.onPointerDownObservable.clear();\n this.onPointerEnterObservable.clear();\n this.onPointerMoveObservable.clear();\n this.onPointerOutObservable.clear();\n this.onPointerUpObservable.clear();\n this.onPointerClickObservable.clear();\n this._disposeNode();\n // Behaviors\n for (const behavior of this._behaviors) {\n behavior.detach();\n }\n }\n}\n//# sourceMappingURL=control3D.js.map","import { AdvancedDynamicTexture } from \"../../2D/advancedDynamicTexture.js\";\nimport { Control3D } from \"./control3D.js\";\nimport { Texture } from \"@babylonjs/core/Materials/Textures/texture.js\";\n/**\n * The base class for controls that display content\n */\nexport class ContentDisplay3D extends Control3D {\n constructor() {\n super(...arguments);\n this._contentResolution = 512;\n this._contentScaleRatio = 2;\n }\n /**\n * Gets or sets the GUI 2D content used to display the button's facade\n */\n get content() {\n return this._content;\n }\n set content(value) {\n this._content = value;\n if (!value || !this._host || !this._host.utilityLayer) {\n return;\n }\n if (!this._facadeTexture) {\n this._facadeTexture = new AdvancedDynamicTexture(\"Facade\", this._contentResolution, this._contentResolution, this._host.utilityLayer.utilityLayerScene, true, Texture.TRILINEAR_SAMPLINGMODE);\n this._setFacadeTextureScaling();\n this._facadeTexture.premulAlpha = true;\n }\n else {\n this._facadeTexture.rootContainer.clearControls();\n }\n this._facadeTexture.addControl(value);\n this._applyFacade(this._facadeTexture);\n }\n _setFacadeTextureScaling() {\n var _a;\n if (this._facadeTexture) {\n this._facadeTexture.rootContainer.scaleX = this._contentScaleRatio;\n this._facadeTexture.rootContainer.scaleY = (_a = this._contentScaleRatioY) !== null && _a !== void 0 ? _a : this._contentScaleRatio;\n }\n }\n /**\n * Gets or sets the texture resolution used to render content (512 by default)\n */\n get contentResolution() {\n return this._contentResolution;\n }\n set contentResolution(value) {\n if (this._contentResolution === value) {\n return;\n }\n this._contentResolution = value;\n this._resetContent();\n }\n _disposeFacadeTexture() {\n if (this._facadeTexture) {\n this._facadeTexture.dispose();\n this._facadeTexture = null;\n }\n }\n _resetContent() {\n this._disposeFacadeTexture();\n this.content = this._content;\n }\n /**\n * Apply the facade texture (created from the content property).\n * This function can be overloaded by child classes\n * @param facadeTexture defines the AdvancedDynamicTexture to use\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _applyFacade(facadeTexture) { }\n}\n//# sourceMappingURL=contentDisplay3D.js.map","import { TransformNode } from \"@babylonjs/core/Meshes/transformNode.js\";\nimport { ContentDisplay3D } from \"./contentDisplay3D.js\";\n/**\n * Class used as a root to all buttons\n */\nexport class AbstractButton3D extends ContentDisplay3D {\n /**\n * Creates a new button\n * @param name defines the control name\n */\n constructor(name) {\n super(name);\n }\n _getTypeName() {\n return \"AbstractButton3D\";\n }\n // Mesh association\n _createNode(scene) {\n return new TransformNode(\"button\" + this.name, scene);\n }\n}\n//# sourceMappingURL=abstractButton3D.js.map","import { Vector4 } from \"@babylonjs/core/Maths/math.vector.js\";\nimport { CreateBox } from \"@babylonjs/core/Meshes/Builders/boxBuilder.js\";\nimport { StandardMaterial } from \"@babylonjs/core/Materials/standardMaterial.js\";\nimport { AbstractButton3D } from \"./abstractButton3D.js\";\nimport { Color3 } from \"@babylonjs/core/Maths/math.color.js\";\n/**\n * Class used to create a button in 3D\n */\nexport class Button3D extends AbstractButton3D {\n /**\n * Creates a new button\n * @param name defines the control name\n */\n constructor(name, options) {\n super(name);\n this._options = {\n width: 1,\n height: 1,\n depth: 0.08,\n ...options,\n };\n // Default animations\n this.pointerEnterAnimation = () => {\n if (!this.mesh) {\n return;\n }\n this._currentMaterial.emissiveColor = Color3.Red();\n };\n this.pointerOutAnimation = () => {\n this._currentMaterial.emissiveColor = Color3.Black();\n };\n this.pointerDownAnimation = () => {\n if (!this.mesh) {\n return;\n }\n this.mesh.scaling.scaleInPlace(0.95);\n };\n this.pointerUpAnimation = () => {\n if (!this.mesh) {\n return;\n }\n this.mesh.scaling.scaleInPlace(1.0 / 0.95);\n };\n }\n /**\n * Apply the facade texture (created from the content property).\n * @param facadeTexture defines the AdvancedDynamicTexture to use\n */\n _applyFacade(facadeTexture) {\n this._currentMaterial.emissiveTexture = facadeTexture;\n }\n _getTypeName() {\n return \"Button3D\";\n }\n // Mesh association\n _createNode(scene) {\n const faceUV = new Array(6);\n for (let i = 0; i < 6; i++) {\n faceUV[i] = new Vector4(0, 0, 0, 0);\n }\n if (scene.useRightHandedSystem) {\n // Flip the u on the texture\n faceUV[0].copyFromFloats(1, 0, 0, 1);\n }\n else {\n faceUV[1].copyFromFloats(0, 0, 1, 1);\n }\n const mesh = CreateBox(this.name + \"_rootMesh\", {\n width: this._options.width,\n height: this._options.height,\n depth: this._options.depth,\n faceUV: faceUV,\n wrap: true,\n }, scene);\n this._contentScaleRatioY = (this._contentScaleRatio * this._options.width) / this._options.height;\n this._setFacadeTextureScaling();\n return mesh;\n }\n _affectMaterial(mesh) {\n const material = new StandardMaterial(this.name + \"Material\", mesh.getScene());\n material.specularColor = Color3.Black();\n mesh.material = material;\n this._currentMaterial = material;\n this._resetContent();\n }\n /**\n * Releases all associated resources\n */\n dispose() {\n super.dispose();\n this._disposeFacadeTexture();\n if (this._currentMaterial) {\n this._currentMaterial.dispose();\n }\n }\n}\n//# sourceMappingURL=button3D.js.map","import { TransformNode } from \"@babylonjs/core/Meshes/transformNode.js\";\nimport { Control3D } from \"./control3D.js\";\n/**\n * Class used to create containers for controls\n */\nexport class Container3D extends Control3D {\n /**\n * Gets the list of child controls\n */\n get children() {\n return this._children;\n }\n /**\n * Gets or sets a boolean indicating if the layout must be blocked (default is false).\n * This is helpful to optimize layout operation when adding multiple children in a row\n */\n get blockLayout() {\n return this._blockLayout;\n }\n set blockLayout(value) {\n if (this._blockLayout === value) {\n return;\n }\n this._blockLayout = value;\n if (!this._blockLayout) {\n this._arrangeChildren();\n }\n }\n /**\n * Creates a new container\n * @param name defines the container name\n */\n constructor(name) {\n super(name);\n this._blockLayout = false;\n /**\n * Gets the list of child controls\n */\n this._children = new Array();\n }\n /**\n * Force the container to update the layout. Please note that it will not take blockLayout property in account\n * @returns the current container\n */\n updateLayout() {\n this._arrangeChildren();\n return this;\n }\n /**\n * Gets a boolean indicating if the given control is in the children of this control\n * @param control defines the control to check\n * @returns true if the control is in the child list\n */\n containsControl(control) {\n return this._children.indexOf(control) !== -1;\n }\n /**\n * Adds a control to the children of this control\n * @param control defines the control to add\n * @returns the current container\n */\n addControl(control) {\n const index = this._children.indexOf(control);\n if (index !== -1) {\n return this;\n }\n control.parent = this;\n control._host = this._host;\n this._children.push(control);\n if (this._host.utilityLayer) {\n control._prepareNode(this._host.utilityLayer.utilityLayerScene);\n if (control.node) {\n control.node.parent = this.node;\n }\n if (!this.blockLayout) {\n this._arrangeChildren();\n }\n }\n return this;\n }\n /**\n * This function will be called everytime a new control is added\n */\n _arrangeChildren() { }\n _createNode(scene) {\n return new TransformNode(\"ContainerNode\", scene);\n }\n /**\n * Removes a control from the children of this control\n * @param control defines the control to remove\n * @returns the current container\n */\n removeControl(control) {\n const index = this._children.indexOf(control);\n if (index !== -1) {\n this._children.splice(index, 1);\n control.parent = null;\n control._disposeNode();\n }\n return this;\n }\n _getTypeName() {\n return \"Container3D\";\n }\n /**\n * Releases all associated resources\n */\n dispose() {\n for (const control of this._children) {\n control.dispose();\n }\n this._children.length = 0;\n super.dispose();\n }\n}\n/** Control rotation will remain unchanged */\nContainer3D.UNSET_ORIENTATION = 0;\n/** Control will rotate to make it look at sphere central axis */\nContainer3D.FACEORIGIN_ORIENTATION = 1;\n/** Control will rotate to make it look back at sphere central axis */\nContainer3D.FACEORIGINREVERSED_ORIENTATION = 2;\n/** Control will rotate to look at z axis (0, 0, 1) */\nContainer3D.FACEFORWARD_ORIENTATION = 3;\n/** Control will rotate to look at negative z axis (0, 0, -1) */\nContainer3D.FACEFORWARDREVERSED_ORIENTATION = 4;\n//# sourceMappingURL=container3D.js.map","import { Tools } from \"@babylonjs/core/Misc/tools.js\";\nimport { Matrix, Vector3, TmpVectors } from \"@babylonjs/core/Maths/math.vector.js\";\nimport { Container3D } from \"./container3D.js\";\n/**\n * Abstract class used to create a container panel deployed on the surface of a volume\n */\nexport class VolumeBasedPanel extends Container3D {\n /**\n * Gets or sets the orientation to apply to all controls (BABYLON.Container3D.FaceOriginReversedOrientation by default)\n * | Value | Type | Description |\n * | ----- | ----------------------------------- | ----------- |\n * | 0 | UNSET_ORIENTATION | Control rotation will remain unchanged |\n * | 1 | FACEORIGIN_ORIENTATION | Control will rotate to make it look at sphere central axis |\n * | 2 | FACEORIGINREVERSED_ORIENTATION | Control will rotate to make it look back at sphere central axis |\n * | 3 | FACEFORWARD_ORIENTATION | Control will rotate to look at z axis (0, 0, 1) |\n * | 4 | FACEFORWARDREVERSED_ORIENTATION | Control will rotate to look at negative z axis (0, 0, -1) |\n */\n get orientation() {\n return this._orientation;\n }\n set orientation(value) {\n if (this._orientation === value) {\n return;\n }\n this._orientation = value;\n Tools.SetImmediate(() => {\n this._arrangeChildren();\n });\n }\n /**\n * Gets or sets the number of columns requested (10 by default).\n * The panel will automatically compute the number of rows based on number of child controls.\n */\n get columns() {\n return this._columns;\n }\n set columns(value) {\n if (this._columns === value) {\n return;\n }\n this._columns = value;\n this._rowThenColum = true;\n Tools.SetImmediate(() => {\n this._arrangeChildren();\n });\n }\n /**\n * Gets or sets a the number of rows requested.\n * The panel will automatically compute the number of columns based on number of child controls.\n */\n get rows() {\n return this._rows;\n }\n set rows(value) {\n if (this._rows === value) {\n return;\n }\n this._rows = value;\n this._rowThenColum = false;\n Tools.SetImmediate(() => {\n this._arrangeChildren();\n });\n }\n /**\n * Creates new VolumeBasedPanel\n * @param name\n */\n constructor(name) {\n super(name);\n this._columns = 10;\n this._rows = 0;\n this._rowThenColum = true;\n this._orientation = Container3D.FACEORIGIN_ORIENTATION;\n /**\n * Gets or sets the distance between elements\n */\n this.margin = 0;\n }\n _arrangeChildren() {\n this._cellWidth = 0;\n this._cellHeight = 0;\n let rows = 0;\n let columns = 0;\n let controlCount = 0;\n const currentInverseWorld = Matrix.Invert(this.node.computeWorldMatrix(true));\n // Measure\n for (const child of this._children) {\n if (!child.mesh) {\n continue;\n }\n controlCount++;\n child.mesh.computeWorldMatrix(true);\n // child.mesh.getWorldMatrix().multiplyToRef(currentInverseWorld, Tmp.Matrix[0]);\n const boundingBox = child.mesh.getHierarchyBoundingVectors();\n const extendSize = TmpVectors.Vector3[0];\n const diff = TmpVectors.Vector3[1];\n boundingBox.max.subtractToRef(boundingBox.min, diff);\n diff.scaleInPlace(0.5);\n Vector3.TransformNormalToRef(diff, currentInverseWorld, extendSize);\n this._cellWidth = Math.max(this._cellWidth, extendSize.x * 2);\n this._cellHeight = Math.max(this._cellHeight, extendSize.y * 2);\n }\n this._cellWidth += this.margin * 2;\n this._cellHeight += this.margin * 2;\n // Arrange\n if (this._rowThenColum) {\n columns = this._columns;\n rows = Math.ceil(controlCount / this._columns);\n }\n else {\n rows = this._rows;\n columns = Math.ceil(controlCount / this._rows);\n }\n const startOffsetX = columns * 0.5 * this._cellWidth;\n const startOffsetY = rows * 0.5 * this._cellHeight;\n const nodeGrid = [];\n let cellCounter = 0;\n if (this._rowThenColum) {\n for (let r = 0; r < rows; r++) {\n for (let c = 0; c < columns; c++) {\n nodeGrid.push(new Vector3(c * this._cellWidth - startOffsetX + this._cellWidth / 2, r * this._cellHeight - startOffsetY + this._cellHeight / 2, 0));\n cellCounter++;\n if (cellCounter > controlCount) {\n break;\n }\n }\n }\n }\n else {\n for (let c = 0; c < columns; c++) {\n for (let r = 0; r < rows; r++) {\n nodeGrid.push(new Vector3(c * this._cellWidth - startOffsetX + this._cellWidth / 2, r * this._cellHeight - startOffsetY + this._cellHeight / 2, 0));\n cellCounter++;\n if (cellCounter > controlCount) {\n break;\n }\n }\n }\n }\n cellCounter = 0;\n for (const child of this._children) {\n if (!child.mesh) {\n continue;\n }\n this._mapGridNode(child, nodeGrid[cellCounter]);\n cellCounter++;\n }\n this._finalProcessing();\n }\n /** Child classes can implement this function to provide additional processing */\n _finalProcessing() { }\n}\n//# sourceMappingURL=volumeBasedPanel.js.map","// Do not edit.\nimport { ShaderStore } from \"@babylonjs/core/Engines/shaderStore.js\";\nconst name = \"fluentVertexShader\";\nconst shader = `precision highp float;attribute vec3 position;attribute vec3 normal;attribute vec2 uv;uniform mat4 world;uniform mat4 viewProjection;varying vec2 vUV;\n#ifdef BORDER\nvarying vec2 scaleInfo;uniform float borderWidth;uniform vec3 scaleFactor;\n#endif\n#ifdef HOVERLIGHT\nvarying vec3 worldPosition;\n#endif\nvoid main(void) {vUV=uv;\n#ifdef BORDER\nvec3 scale=scaleFactor;float minScale=min(min(scale.x,scale.y),scale.z);float maxScale=max(max(scale.x,scale.y),scale.z);float minOverMiddleScale=minScale/(scale.x+scale.y+scale.z-minScale-maxScale);float areaYZ=scale.y*scale.z;float areaXZ=scale.x*scale.z;float areaXY=scale.x*scale.y;float scaledBorderWidth=borderWidth; \nif (abs(normal.x)==1.0) \n{scale.x=scale.y;scale.y=scale.z;if (areaYZ>areaXZ && areaYZ>areaXY)\n{scaledBorderWidth*=minOverMiddleScale;}}\nelse if (abs(normal.y)==1.0) \n{scale.x=scale.z;if (areaXZ>areaXY && areaXZ>areaYZ)\n{scaledBorderWidth*=minOverMiddleScale;}}\nelse \n{if (areaXY>areaYZ && areaXY>areaXZ)\n{scaledBorderWidth*=minOverMiddleScale;}}\nfloat scaleRatio=min(scale.x,scale.y)/max(scale.x,scale.y);if (scale.x>scale.y)\n{scaleInfo.x=1.0-(scaledBorderWidth*scaleRatio);scaleInfo.y=1.0-scaledBorderWidth;}\nelse\n{scaleInfo.x=1.0-scaledBorderWidth;scaleInfo.y=1.0-(scaledBorderWidth*scaleRatio);} \n#endif \nvec4 worldPos=world*vec4(position,1.0);\n#ifdef HOVERLIGHT\nworldPosition=worldPos.xyz;\n#endif\ngl_Position=viewProjection*worldPos;}\n`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const fluentVertexShader = { name, shader };\n//# sourceMappingURL=fluent.vertex.js.map","// Do not edit.\nimport { ShaderStore } from \"@babylonjs/core/Engines/shaderStore.js\";\nconst name = \"fluentPixelShader\";\nconst shader = `precision highp float;varying vec2 vUV;uniform vec4 albedoColor;\n#ifdef INNERGLOW\nuniform vec4 innerGlowColor;\n#endif\n#ifdef BORDER\nvarying vec2 scaleInfo;uniform float edgeSmoothingValue;uniform float borderMinValue;\n#endif\n#ifdef HOVERLIGHT\nvarying vec3 worldPosition;uniform vec3 hoverPosition;uniform vec4 hoverColor;uniform float hoverRadius;\n#endif\n#ifdef TEXTURE\nuniform sampler2D albedoSampler;uniform mat4 textureMatrix;vec2 finalUV;\n#endif\nvoid main(void) {vec3 albedo=albedoColor.rgb;float alpha=albedoColor.a;\n#ifdef TEXTURE\nfinalUV=vec2(textureMatrix*vec4(vUV,1.0,0.0));albedo=texture2D(albedoSampler,finalUV).rgb;\n#endif\n#ifdef HOVERLIGHT\nfloat pointToHover=(1.0-clamp(length(hoverPosition-worldPosition)/hoverRadius,0.,1.))*hoverColor.a;albedo=clamp(albedo+hoverColor.rgb*pointToHover,0.,1.);\n#else\nfloat pointToHover=1.0;\n#endif\n#ifdef BORDER \nfloat borderPower=10.0;float inverseBorderPower=1.0/borderPower;vec3 borderColor=albedo*borderPower;vec2 distanceToEdge;distanceToEdge.x=abs(vUV.x-0.5)*2.0;distanceToEdge.y=abs(vUV.y-0.5)*2.0;float borderValue=max(smoothstep(scaleInfo.x-edgeSmoothingValue,scaleInfo.x+edgeSmoothingValue,distanceToEdge.x),\nsmoothstep(scaleInfo.y-edgeSmoothingValue,scaleInfo.y+edgeSmoothingValue,distanceToEdge.y));borderColor=borderColor*borderValue*max(borderMinValue*inverseBorderPower,pointToHover); \nalbedo+=borderColor;alpha=max(alpha,borderValue);\n#endif\n#ifdef INNERGLOW\nvec2 uvGlow=(vUV-vec2(0.5,0.5))*(innerGlowColor.a*2.0);uvGlow=uvGlow*uvGlow;uvGlow=uvGlow*uvGlow;albedo+=mix(vec3(0.0,0.0,0.0),innerGlowColor.rgb,uvGlow.x+uvGlow.y); \n#endif\ngl_FragColor=vec4(albedo,alpha);}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const fluentPixelShader = { name, shader };\n//# sourceMappingURL=fluent.fragment.js.map","import { __decorate } from \"@babylonjs/core/tslib.es6.js\";\nimport { serializeAsColor4, serializeAsVector3, serializeAsTexture, serialize, expandToProperty, serializeAsColor3, SerializationHelper } from \"@babylonjs/core/Misc/decorators.js\";\nimport { Vector3, TmpVectors } from \"@babylonjs/core/Maths/math.vector.js\";\nimport { MaterialDefines } from \"@babylonjs/core/Materials/materialDefines.js\";\nimport { MaterialHelper } from \"@babylonjs/core/Materials/materialHelper.js\";\nimport { PushMaterial } from \"@babylonjs/core/Materials/pushMaterial.js\";\nimport { VertexBuffer } from \"@babylonjs/core/Buffers/buffer.js\";\nimport { RegisterClass } from \"@babylonjs/core/Misc/typeStore.js\";\nimport { Color3, Color4 } from \"@babylonjs/core/Maths/math.color.js\";\nimport \"./shaders/fluent.vertex.js\";\nimport \"./shaders/fluent.fragment.js\";\n/** @internal */\nexport class FluentMaterialDefines extends MaterialDefines {\n constructor() {\n super();\n this.INNERGLOW = false;\n this.BORDER = false;\n this.HOVERLIGHT = false;\n this.TEXTURE = false;\n this.rebuild();\n }\n}\n/**\n * Class used to render controls with fluent design\n */\nexport class FluentMaterial extends PushMaterial {\n /**\n * Creates a new Fluent material\n * @param name defines the name of the material\n * @param scene defines the hosting scene\n */\n constructor(name, scene) {\n super(name, scene);\n /**\n * Gets or sets inner glow intensity. A value of 0 means no glow (default is 0.5)\n */\n this.innerGlowColorIntensity = 0.5;\n /**\n * Gets or sets the inner glow color (white by default)\n */\n this.innerGlowColor = new Color3(1.0, 1.0, 1.0);\n /**\n * Gets or sets the albedo color (Default is Color3(0.3, 0.35, 0.4))\n */\n this.albedoColor = new Color3(0.3, 0.35, 0.4);\n /**\n * Gets or sets a boolean indicating if borders must be rendered (default is false)\n */\n this.renderBorders = false;\n /**\n * Gets or sets border width (default is 0.5)\n */\n this.borderWidth = 0.5;\n /**\n * Gets or sets a value indicating the smoothing value applied to border edges (0.02 by default)\n */\n this.edgeSmoothingValue = 0.02;\n /**\n * Gets or sets the minimum value that can be applied to border width (default is 0.1)\n */\n this.borderMinValue = 0.1;\n /**\n * Gets or sets a boolean indicating if hover light must be rendered (default is false)\n */\n this.renderHoverLight = false;\n /**\n * Gets or sets the radius used to render the hover light (default is 0.01)\n */\n this.hoverRadius = 0.01;\n /**\n * Gets or sets the color used to render the hover light (default is Color4(0.3, 0.3, 0.3, 1.0))\n */\n this.hoverColor = new Color4(0.3, 0.3, 0.3, 1.0);\n /**\n * Gets or sets the hover light position in world space (default is Vector3.Zero())\n */\n this.hoverPosition = Vector3.Zero();\n }\n needAlphaBlending() {\n return this.alpha !== 1.0;\n }\n needAlphaTesting() {\n return false;\n }\n getAlphaTestTexture() {\n return null;\n }\n isReadyForSubMesh(mesh, subMesh) {\n if (this.isFrozen) {\n if (subMesh.effect && subMesh.effect._wasPreviouslyReady) {\n return true;\n }\n }\n if (!subMesh.materialDefines) {\n subMesh.materialDefines = new FluentMaterialDefines();\n }\n const scene = this.getScene();\n const defines = subMesh.materialDefines;\n if (!this.checkReadyOnEveryCall && subMesh.effect) {\n if (defines._renderId === scene.getRenderId()) {\n return true;\n }\n }\n if (defines._areTexturesDirty) {\n defines.INNERGLOW = this.innerGlowColorIntensity > 0;\n defines.BORDER = this.renderBorders;\n defines.HOVERLIGHT = this.renderHoverLight;\n if (this._albedoTexture) {\n if (!this._albedoTexture.isReadyOrNotBlocking()) {\n return false;\n }\n else {\n defines.TEXTURE = true;\n }\n }\n else {\n defines.TEXTURE = false;\n }\n }\n const engine = scene.getEngine();\n // Get correct effect\n if (defines.isDirty) {\n defines.markAsProcessed();\n scene.resetCachedMaterial();\n //Attributes\n const attribs = [VertexBuffer.PositionKind];\n attribs.push(VertexBuffer.NormalKind);\n attribs.push(VertexBuffer.UVKind);\n const shaderName = \"fluent\";\n const uniforms = [\n \"world\",\n \"viewProjection\",\n \"innerGlowColor\",\n \"albedoColor\",\n \"borderWidth\",\n \"edgeSmoothingValue\",\n \"scaleFactor\",\n \"borderMinValue\",\n \"hoverColor\",\n \"hoverPosition\",\n \"hoverRadius\",\n \"textureMatrix\",\n ];\n const samplers = [\"albedoSampler\"];\n const uniformBuffers = [];\n MaterialHelper.PrepareUniformsAndSamplersList({\n uniformsNames: uniforms,\n uniformBuffersNames: uniformBuffers,\n samplers: samplers,\n defines: defines,\n maxSimultaneousLights: 4,\n });\n const join = defines.toString();\n subMesh.setEffect(scene.getEngine().createEffect(shaderName, {\n attributes: attribs,\n uniformsNames: uniforms,\n uniformBuffersNames: uniformBuffers,\n samplers: samplers,\n defines: join,\n fallbacks: null,\n onCompiled: this.onCompiled,\n onError: this.onError,\n indexParameters: { maxSimultaneousLights: 4 },\n }, engine), defines, this._materialContext);\n }\n if (!subMesh.effect || !subMesh.effect.isReady()) {\n return false;\n }\n defines._renderId = scene.getRenderId();\n subMesh.effect._wasPreviouslyReady = true;\n return true;\n }\n bindForSubMesh(world, mesh, subMesh) {\n const scene = this.getScene();\n const defines = subMesh.materialDefines;\n if (!defines) {\n return;\n }\n const effect = subMesh.effect;\n if (!effect) {\n return;\n }\n this._activeEffect = effect;\n // Matrices\n this.bindOnlyWorldMatrix(world);\n this._activeEffect.setMatrix(\"viewProjection\", scene.getTransformMatrix());\n if (this._mustRebind(scene, effect)) {\n this._activeEffect.setColor4(\"albedoColor\", this.albedoColor, this.alpha);\n if (defines.INNERGLOW) {\n this._activeEffect.setColor4(\"innerGlowColor\", this.innerGlowColor, this.innerGlowColorIntensity);\n }\n if (defines.BORDER) {\n this._activeEffect.setFloat(\"borderWidth\", this.borderWidth);\n this._activeEffect.setFloat(\"edgeSmoothingValue\", this.edgeSmoothingValue);\n this._activeEffect.setFloat(\"borderMinValue\", this.borderMinValue);\n mesh.getBoundingInfo().boundingBox.extendSize.multiplyToRef(mesh.scaling, TmpVectors.Vector3[0]);\n this._activeEffect.setVector3(\"scaleFactor\", TmpVectors.Vector3[0]);\n }\n if (defines.HOVERLIGHT) {\n this._activeEffect.setDirectColor4(\"hoverColor\", this.hoverColor);\n this._activeEffect.setFloat(\"hoverRadius\", this.hoverRadius);\n this._activeEffect.setVector3(\"hoverPosition\", this.hoverPosition);\n }\n if (defines.TEXTURE && this._albedoTexture) {\n this._activeEffect.setTexture(\"albedoSampler\", this._albedoTexture);\n const matrix = this._albedoTexture.getTextureMatrix();\n this._activeEffect.setMatrix(\"textureMatrix\", matrix);\n }\n }\n this._afterBind(mesh, this._activeEffect);\n }\n getActiveTextures() {\n const activeTextures = super.getActiveTextures();\n return activeTextures;\n }\n hasTexture(texture) {\n if (super.hasTexture(texture)) {\n return true;\n }\n return false;\n }\n dispose(forceDisposeEffect) {\n super.dispose(forceDisposeEffect);\n }\n clone(name) {\n return SerializationHelper.Clone(() => new FluentMaterial(name, this.getScene()), this);\n }\n serialize() {\n const serializationObject = super.serialize();\n serializationObject.customType = \"BABYLON.GUI.FluentMaterial\";\n return serializationObject;\n }\n getClassName() {\n return \"FluentMaterial\";\n }\n // Statics\n static Parse(source, scene, rootUrl) {\n return SerializationHelper.Parse(() => new FluentMaterial(source.name, scene), source, scene, rootUrl);\n }\n}\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], FluentMaterial.prototype, \"innerGlowColorIntensity\", void 0);\n__decorate([\n serializeAsColor3()\n], FluentMaterial.prototype, \"innerGlowColor\", void 0);\n__decorate([\n serializeAsColor3()\n], FluentMaterial.prototype, \"albedoColor\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], FluentMaterial.prototype, \"renderBorders\", void 0);\n__decorate([\n serialize()\n], FluentMaterial.prototype, \"borderWidth\", void 0);\n__decorate([\n serialize()\n], FluentMaterial.prototype, \"edgeSmoothingValue\", void 0);\n__decorate([\n serialize()\n], FluentMaterial.prototype, \"borderMinValue\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], FluentMaterial.prototype, \"renderHoverLight\", void 0);\n__decorate([\n serialize()\n], FluentMaterial.prototype, \"hoverRadius\", void 0);\n__decorate([\n serializeAsColor4()\n], FluentMaterial.prototype, \"hoverColor\", void 0);\n__decorate([\n serializeAsVector3()\n], FluentMaterial.prototype, \"hoverPosition\", void 0);\n__decorate([\n serializeAsTexture(\"albedoTexture\")\n], FluentMaterial.prototype, \"_albedoTexture\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesAndMiscDirty\")\n], FluentMaterial.prototype, \"albedoTexture\", void 0);\nRegisterClass(\"BABYLON.GUI.FluentMaterial\", FluentMaterial);\n//# sourceMappingURL=fluentMaterial.js.map","import { VolumeBasedPanel } from \"./volumeBasedPanel.js\";\nimport { Mesh } from \"@babylonjs/core/Meshes/mesh.js\";\nimport { CreateBox } from \"@babylonjs/core/Meshes/Builders/boxBuilder.js\";\nimport { FluentMaterial } from \"../materials/fluent/fluentMaterial.js\";\nimport { Color3 } from \"@babylonjs/core/Maths/math.color.js\";\nimport { Logger } from \"@babylonjs/core/Misc/logger.js\";\n/**\n * Simple menu that can contain holographic buttons\n */\nexport class TouchHolographicMenu extends VolumeBasedPanel {\n /**\n * Gets or sets the margin size of the backplate in button size units.\n * Setting this to 1, will make the backPlate margin the size of 1 button\n */\n get backPlateMargin() {\n return this._backPlateMargin;\n }\n set backPlateMargin(value) {\n this._backPlateMargin = value;\n if (this._children.length >= 1) {\n this.children.forEach((control) => {\n this._updateCurrentMinMax(control.position);\n });\n this._updateMargins();\n }\n }\n _createNode(scene) {\n const node = new Mesh(`menu_${this.name}`, scene);\n this._backPlate = CreateBox(\"backPlate\" + this.name, { size: 1 }, scene);\n this._backPlate.parent = node;\n return node;\n }\n _affectMaterial(mesh) {\n this._backPlateMaterial = new FluentMaterial(this.name + \"backPlateMaterial\", mesh.getScene());\n this._backPlateMaterial.albedoColor = new Color3(0.08, 0.15, 0.55);\n this._backPlateMaterial.renderBorders = true;\n this._backPlateMaterial.renderHoverLight = true;\n this._pickedPointObserver = this._host.onPickedPointChangedObservable.add((pickedPoint) => {\n if (pickedPoint) {\n this._backPlateMaterial.hoverPosition = pickedPoint;\n this._backPlateMaterial.hoverColor.a = 1.0;\n }\n else {\n this._backPlateMaterial.hoverColor.a = 0;\n }\n });\n this._backPlate.material = this._backPlateMaterial;\n }\n _mapGridNode(control, nodePosition) {\n // Simple plane mapping for the menu\n const mesh = control.mesh;\n if (!mesh) {\n return;\n }\n control.position = nodePosition.clone();\n this._updateCurrentMinMax(nodePosition);\n }\n _finalProcessing() {\n this._updateMargins();\n }\n _updateCurrentMinMax(nodePosition) {\n if (!this._currentMin) {\n this._currentMin = nodePosition.clone();\n this._currentMax = nodePosition.clone();\n }\n this._currentMin.minimizeInPlace(nodePosition);\n this._currentMax.maximizeInPlace(nodePosition);\n }\n _updateMargins() {\n if (this._children.length > 0) {\n this._currentMin.addInPlaceFromFloats(-this._cellWidth / 2, -this._cellHeight / 2, 0);\n this._currentMax.addInPlaceFromFloats(this._cellWidth / 2, this._cellHeight / 2, 0);\n const extendSize = this._currentMax.subtract(this._currentMin);\n // Also add a % margin\n this._backPlate.scaling.x = extendSize.x + this._cellWidth * this.backPlateMargin;\n this._backPlate.scaling.y = extendSize.y + this._cellHeight * this.backPlateMargin;\n this._backPlate.scaling.z = 0.001;\n for (let i = 0; i < this._children.length; i++) {\n this._children[i].position.subtractInPlace(this._currentMin).subtractInPlace(extendSize.scale(0.5));\n this._children[i].position.z -= 0.01;\n }\n }\n this._currentMin = null;\n this._currentMax = null;\n }\n /**\n * Creates a holographic menu GUI 3D control\n * @param name name of the menu\n */\n constructor(name) {\n super(name);\n this._backPlateMargin = 1.25;\n }\n /**\n * Adds a button to the menu.\n * Please note that the back material of the button will be set to transparent as it is attached to the menu.\n *\n * @param button Button to add\n * @returns This menu\n */\n addButton(button) {\n // Block updating the layout until the button is resized (which has to happen after node creation)\n const wasLayoutBlocked = this.blockLayout;\n if (!wasLayoutBlocked) {\n this.blockLayout = true;\n }\n super.addControl(button);\n button.isBackplateVisible = false;\n button.scaling.scaleInPlace(TouchHolographicMenu.MENU_BUTTON_SCALE);\n // Unblocking the layout triggers the pending layout update that uses the size of the buttons to determine the size of the backing mesh\n if (!wasLayoutBlocked) {\n this.blockLayout = false;\n }\n return this;\n }\n /**\n * This method should not be used directly. It is inherited from `Container3D`.\n * Please use `addButton` instead.\n * @param _control\n * @returns\n */\n addControl(_control) {\n Logger.Warn(\"TouchHolographicMenu can only contain buttons. Please use the method `addButton` instead.\");\n return this;\n }\n /**\n * Disposes the menu\n */\n dispose() {\n super.dispose();\n this._host.onPickedPointChangedObservable.remove(this._pickedPointObserver);\n }\n}\n/**\n * Scale for the buttons added to the menu\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nTouchHolographicMenu.MENU_BUTTON_SCALE = 1;\n//# sourceMappingURL=touchHolographicMenu.js.map","// Do not edit.\nimport { ShaderStore } from \"@babylonjs/core/Engines/shaderStore.js\";\nconst name = \"fluentBackplatePixelShader\";\nconst shader = `uniform vec3 cameraPosition;varying vec3 vPosition;varying vec3 vNormal;varying vec2 vUV;varying vec3 vTangent;varying vec3 vBinormal;varying vec4 vColor;varying vec4 vExtra1;varying vec4 vExtra2;varying vec4 vExtra3;uniform float _Radius_;uniform float _Line_Width_;uniform bool _Absolute_Sizes_;uniform float _Filter_Width_;uniform vec4 _Base_Color_;uniform vec4 _Line_Color_;uniform float _Radius_Top_Left_;uniform float _Radius_Top_Right_;uniform float _Radius_Bottom_Left_;uniform float _Radius_Bottom_Right_;uniform vec3 _Blob_Position_;uniform float _Blob_Intensity_;uniform float _Blob_Near_Size_;uniform float _Blob_Far_Size_;uniform float _Blob_Near_Distance_;uniform float _Blob_Far_Distance_;uniform float _Blob_Fade_Length_;uniform float _Blob_Pulse_;uniform float _Blob_Fade_;uniform sampler2D _Blob_Texture_;uniform vec3 _Blob_Position_2_;uniform float _Blob_Near_Size_2_;uniform float _Blob_Pulse_2_;uniform float _Blob_Fade_2_;uniform float _Rate_;uniform vec4 _Highlight_Color_;uniform float _Highlight_Width_;uniform vec4 _Highlight_Transform_;uniform float _Highlight_;uniform float _Iridescence_Intensity_;uniform float _Iridescence_Edge_Intensity_;uniform float _Angle_;uniform float _Fade_Out_;uniform bool _Reflected_;uniform float _Frequency_;uniform float _Vertical_Offset_;uniform sampler2D _Iridescent_Map_;uniform bool _Use_Global_Left_Index_;uniform bool _Use_Global_Right_Index_;uniform vec4 Global_Left_Index_Tip_Position;uniform vec4 Global_Right_Index_Tip_Position;void Round_Rect_Fragment_B31(\nfloat Radius,\nfloat Line_Width,\nvec4 Line_Color,\nfloat Filter_Width,\nvec2 UV,\nfloat Line_Visibility,\nvec4 Rect_Parms,\nvec4 Fill_Color,\nout vec4 Color)\n{float d=length(max(abs(UV)-Rect_Parms.xy,0.0));float dx=max(fwidth(d)*Filter_Width,0.00001);float g=min(Rect_Parms.z,Rect_Parms.w);float dgrad=max(fwidth(g)*Filter_Width,0.00001);float Inside_Rect=clamp(g/dgrad,0.0,1.0);float inner=clamp((d+dx*0.5-max(Radius-Line_Width,d-dx*0.5))/dx,0.0,1.0);Color=clamp(mix(Fill_Color,Line_Color,inner),0.0,1.0)*Inside_Rect;}\nvoid Blob_Fragment_B71(\nsampler2D Blob_Texture,\nvec4 Blob_Info1,\nvec4 Blob_Info2,\nout vec4 Blob_Color)\n{float k1=dot(Blob_Info1.xy,Blob_Info1.xy);float k2=dot(Blob_Info2.xy,Blob_Info2.xy);vec3 closer=k10.0 ? g : 1.0;Gradient2=Position_Object.z>0.0 ? 1.0 : g;} else {Gradient1=g+(1.0-g)*(Radial_Gradient);Gradient2=1.0;}}\nvoid Pick_Radius_B144(\nfloat Radius,\nfloat Radius_Top_Left,\nfloat Radius_Top_Right,\nfloat Radius_Bottom_Left,\nfloat Radius_Bottom_Right,\nvec3 Position,\nout float Result)\n{bool whichY=Position.y>0.0;Result=Position.x<0.0 ? (whichY ? Radius_Top_Left : Radius_Bottom_Left) : (whichY ? Radius_Top_Right : Radius_Bottom_Right);Result*=Radius;}\nvoid main()\n{vec3 Nrm_World_Q128;Nrm_World_Q128=normalize((world*vec4(normal,0.0)).xyz);vec3 Tangent_World_Q131;vec3 Tangent_World_N_Q131;float Tangent_Length_Q131;Tangent_World_Q131=(world*vec4(vec3(1,0,0),0.0)).xyz;Tangent_Length_Q131=length(Tangent_World_Q131);Tangent_World_N_Q131=Tangent_World_Q131/Tangent_Length_Q131;vec3 Binormal_World_Q132;vec3 Binormal_World_N_Q132;float Binormal_Length_Q132;Object_To_World_Dir_B132(vec3(0,1,0),Binormal_World_Q132,Binormal_World_N_Q132,Binormal_Length_Q132);float Anisotropy_Q133=Tangent_Length_Q131/Binormal_Length_Q132;vec3 Result_Q177;Result_Q177=mix(_Blob_Position_,Global_Left_Index_Tip_Position.xyz,float(_Use_Global_Left_Index_));vec3 Result_Q178;Result_Q178=mix(_Blob_Position_2_,Global_Right_Index_Tip_Position.xyz,float(_Use_Global_Right_Index_));float Result_Q144;Pick_Radius_B144(_Radius_,_Radius_Top_Left_,_Radius_Top_Right_,_Radius_Bottom_Left_,_Radius_Bottom_Right_,position,Result_Q144);vec3 Dir_Q140;PickDir_B140(_Angle_,Tangent_World_N_Q131,Binormal_World_N_Q132,Dir_Q140);float Radius_Q147;float Line_Width_Q147;RelativeOrAbsoluteDetail_B147(Result_Q144,_Line_Width_,_Absolute_Sizes_,Binormal_Length_Q132,Radius_Q147,Line_Width_Q147);vec4 Out_Color_Q145=vec4(Radius_Q147,Line_Width_Q147,0,1);vec3 New_P_Q129;vec2 New_UV_Q129;float Radial_Gradient_Q129;vec3 Radial_Dir_Q129;Move_Verts_B129(Anisotropy_Q133,position,Radius_Q147,New_P_Q129,New_UV_Q129,Radial_Gradient_Q129,Radial_Dir_Q129);vec3 Pos_World_Q115;Object_To_World_Pos_B115(New_P_Q129,Pos_World_Q115);vec4 Blob_Info_Q180;\n#if BLOB_ENABLE\nBlob_Vertex_B180(Pos_World_Q115,Nrm_World_Q128,Tangent_World_N_Q131,Binormal_World_N_Q132,Result_Q177,_Blob_Intensity_,_Blob_Near_Size_,_Blob_Far_Size_,_Blob_Near_Distance_,_Blob_Far_Distance_,_Blob_Fade_Length_,_Blob_Pulse_,_Blob_Fade_,Blob_Info_Q180);\n#else\nBlob_Info_Q180=vec4(0,0,0,0);\n#endif\nvec4 Blob_Info_Q181;\n#if BLOB_ENABLE_2\nBlob_Vertex_B180(Pos_World_Q115,Nrm_World_Q128,Tangent_World_N_Q131,Binormal_World_N_Q132,Result_Q178,_Blob_Intensity_,_Blob_Near_Size_2_,_Blob_Far_Size_,_Blob_Near_Distance_,_Blob_Far_Distance_,_Blob_Fade_Length_,_Blob_Pulse_2_,_Blob_Fade_2_,Blob_Info_Q181);\n#else\nBlob_Info_Q181=vec4(0,0,0,0);\n#endif\nfloat Gradient1_Q130;float Gradient2_Q130;\n#if SMOOTH_EDGES\nEdge_AA_Vertex_B130(Pos_World_Q115,position,normal,cameraPosition,Radial_Gradient_Q129,Radial_Dir_Q129,tangent,Gradient1_Q130,Gradient2_Q130);\n#else\nGradient1_Q130=1.0;Gradient2_Q130=1.0;\n#endif\nvec2 Rect_UV_Q139;vec4 Rect_Parms_Q139;vec2 Scale_XY_Q139;vec2 Line_UV_Q139;Round_Rect_Vertex_B139(New_UV_Q129,Radius_Q147,0.0,Anisotropy_Q133,Gradient1_Q130,Gradient2_Q130,Rect_UV_Q139,Rect_Parms_Q139,Scale_XY_Q139,Line_UV_Q139);vec3 Line_Vertex_Q135;Line_Vertex_B135(Scale_XY_Q139,Line_UV_Q139,0.0,_Rate_,_Highlight_Transform_,Line_Vertex_Q135);vec3 Position=Pos_World_Q115;vec3 Normal=Dir_Q140;vec2 UV=Rect_UV_Q139;vec3 Tangent=Line_Vertex_Q135;vec3 Binormal=Nrm_World_Q128;vec4 Color=Out_Color_Q145;vec4 Extra1=Rect_Parms_Q139;vec4 Extra2=Blob_Info_Q180;vec4 Extra3=Blob_Info_Q181;gl_Position=viewProjection*vec4(Position,1);vPosition=Position;vNormal=Normal;vUV=UV;vTangent=Tangent;vBinormal=Binormal;vColor=Color;vExtra1=Extra1;vExtra2=Extra2;vExtra3=Extra3;}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const fluentBackplateVertexShader = { name, shader };\n//# sourceMappingURL=fluentBackplate.vertex.js.map","import { __decorate } from \"@babylonjs/core/tslib.es6.js\";\nimport { SerializationHelper, serialize, serializeAsVector3 } from \"@babylonjs/core/Misc/decorators.js\";\nimport { Vector3, Vector4 } from \"@babylonjs/core/Maths/math.vector.js\";\nimport { Texture } from \"@babylonjs/core/Materials/Textures/texture.js\";\nimport { MaterialDefines } from \"@babylonjs/core/Materials/materialDefines.js\";\nimport { MaterialHelper } from \"@babylonjs/core/Materials/materialHelper.js\";\nimport { PushMaterial } from \"@babylonjs/core/Materials/pushMaterial.js\";\nimport { VertexBuffer } from \"@babylonjs/core/Buffers/buffer.js\";\nimport { RegisterClass } from \"@babylonjs/core/Misc/typeStore.js\";\nimport { Color4 } from \"@babylonjs/core/Maths/math.color.js\";\nimport { EffectFallbacks } from \"@babylonjs/core/Materials/effectFallbacks.js\";\nimport { Constants } from \"@babylonjs/core/Engines/constants.js\";\nimport \"./shaders/fluentBackplate.fragment.js\";\nimport \"./shaders/fluentBackplate.vertex.js\";\n/** @internal */\nclass FluentBackplateMaterialDefines extends MaterialDefines {\n constructor() {\n super();\n this.BLOB_ENABLE = true;\n this.BLOB_ENABLE_2 = true;\n this.SMOOTH_EDGES = true;\n this.IRIDESCENT_MAP_ENABLE = true;\n this._needNormals = true;\n this.rebuild();\n }\n}\n/**\n * Class used to render square buttons with fluent design\n */\nexport class FluentBackplateMaterial extends PushMaterial {\n constructor(name, scene) {\n super(name, scene);\n /**\n * Gets or sets the corner radius on the backplate. Best to keep this value between 0.01 and 0.5. Default is 0.03.\n */\n this.radius = 0.03;\n /**\n * Gets or sets the line width of the backplate.\n */\n this.lineWidth = 0.01;\n /**\n * Gets or sets whether to use absolute sizes when calculating effects on the backplate.\n * Since desktop and VR/AR have different relative sizes, it's usually best to keep this false.\n */\n this.absoluteSizes = false;\n /** @internal */\n this._filterWidth = 1;\n /**\n * Gets or sets the base color of the backplate.\n */\n this.baseColor = new Color4(0.0392157, 0.0666667, 0.207843, 1);\n /**\n * Gets or sets the line color of the backplate.\n */\n this.lineColor = new Color4(0.14902, 0.133333, 0.384314, 1);\n /**\n * Gets or sets the intensity of the fluent hover glow effect.\n */\n this.blobIntensity = 0.98;\n /**\n * Gets or sets the far size of the fluent hover glow effect.\n */\n this.blobFarSize = 0.04;\n /**\n * Gets or sets the distance considered \"near\" to the backplate, which controls the size of the fluent hover glow effect (see blobNearSize).\n */\n this.blobNearDistance = 0;\n /**\n * Gets or sets the distance considered \"far\" from the backplate, which controls the size of the fluent hover glow effect (see blobFarSize).\n */\n this.blobFarDistance = 0.08;\n /**\n * Gets or sets the length of the fluent hover glow effect fade.\n */\n this.blobFadeLength = 0.08;\n /**\n * Gets or sets the size of the fluent hover glow effect when the left pointer is considered \"near\" to the backplate (see blobNearDistance).\n */\n this.blobNearSize = 0.22;\n /**\n * Gets or sets the progress of the fluent hover glow effect selection animation corresponding to the left pointer (0.0 - 1.0).\n */\n this.blobPulse = 0;\n /**\n * Gets or sets the opacity of the fluent hover glow effect corresponding to the left pointer (0.0 - 1.0). Default is 0.\n */\n this.blobFade = 0;\n /**\n * Gets or sets the size of the fluent hover glow effect when the right pointer is considered \"near\" to the backplate (see blobNearDistance).\n */\n this.blobNearSize2 = 0.22;\n /**\n * Gets or sets the progress of the fluent hover glow effect selection animation corresponding to the right pointer (0.0 - 1.0).\n */\n this.blobPulse2 = 0;\n /**\n * Gets or sets the opacity of the fluent hover glow effect corresponding to the right pointer (0.0 - 1.0). Default is 0.\n */\n this.blobFade2 = 0;\n /** @internal */\n this._rate = 0.135;\n /**\n * Gets or sets the color of the highlights on the backplate line.\n */\n this.highlightColor = new Color4(0.98, 0.98, 0.98, 1);\n /**\n * Gets or sets the width of the highlights on the backplate line.\n */\n this.highlightWidth = 0.25;\n /** @internal */\n this._highlightTransform = new Vector4(1, 1, 0, 0);\n /** @internal */\n this._highlight = 1;\n /**\n * Gets or sets the intensity of the iridescence effect.\n */\n this.iridescenceIntensity = 0;\n /**\n * Gets or sets the intensity of the iridescence effect on the backplate edges.\n */\n this.iridescenceEdgeIntensity = 1;\n /** @internal */\n this._angle = -45;\n /**\n * Gets or sets the opacity of the backplate (0.0 - 1.0).\n */\n this.fadeOut = 1;\n /** @internal */\n this._reflected = true;\n /** @internal */\n this._frequency = 1;\n /** @internal */\n this._verticalOffset = 0;\n /**\n * Gets or sets the world-space position of the tip of the left index finger.\n */\n this.globalLeftIndexTipPosition = Vector3.Zero();\n this._globalLeftIndexTipPosition4 = Vector4.Zero();\n /**\n * Gets or sets the world-space position of the tip of the right index finger.\n */\n this.globalRightIndexTipPosition = Vector3.Zero();\n this._globalRightIndexTipPosition4 = Vector4.Zero();\n this.alphaMode = Constants.ALPHA_DISABLE;\n this.backFaceCulling = false;\n this._blobTexture = new Texture(FluentBackplateMaterial.BLOB_TEXTURE_URL, this.getScene(), true, false, Texture.NEAREST_SAMPLINGMODE);\n this._iridescentMap = new Texture(FluentBackplateMaterial.IM_TEXTURE_URL, this.getScene(), true, false, Texture.NEAREST_SAMPLINGMODE);\n }\n needAlphaBlending() {\n return false;\n }\n needAlphaTesting() {\n return false;\n }\n getAlphaTestTexture() {\n return null;\n }\n isReadyForSubMesh(mesh, subMesh) {\n if (this.isFrozen) {\n if (subMesh.effect && subMesh.effect._wasPreviouslyReady) {\n return true;\n }\n }\n if (!subMesh.materialDefines) {\n subMesh.materialDefines = new FluentBackplateMaterialDefines();\n }\n const defines = subMesh.materialDefines;\n const scene = this.getScene();\n if (this._isReadyForSubMesh(subMesh)) {\n return true;\n }\n const engine = scene.getEngine();\n // Attribs\n MaterialHelper.PrepareDefinesForAttributes(mesh, defines, false, false);\n // Get correct effect\n if (defines.isDirty) {\n defines.markAsProcessed();\n scene.resetCachedMaterial();\n // Fallbacks\n const fallbacks = new EffectFallbacks();\n if (defines.FOG) {\n fallbacks.addFallback(1, \"FOG\");\n }\n MaterialHelper.HandleFallbacksForShadows(defines, fallbacks);\n defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess;\n //Attributes\n const attribs = [VertexBuffer.PositionKind];\n if (defines.NORMAL) {\n attribs.push(VertexBuffer.NormalKind);\n }\n if (defines.UV1) {\n attribs.push(VertexBuffer.UVKind);\n }\n if (defines.UV2) {\n attribs.push(VertexBuffer.UV2Kind);\n }\n if (defines.VERTEXCOLOR) {\n attribs.push(VertexBuffer.ColorKind);\n }\n if (defines.TANGENT) {\n attribs.push(VertexBuffer.TangentKind);\n }\n MaterialHelper.PrepareAttributesForInstances(attribs, defines);\n // Legacy browser patch\n const shaderName = \"fluentBackplate\";\n const join = defines.toString();\n const uniforms = [\n \"world\",\n \"viewProjection\",\n \"cameraPosition\",\n \"_Radius_\",\n \"_Line_Width_\",\n \"_Absolute_Sizes_\",\n \"_Filter_Width_\",\n \"_Base_Color_\",\n \"_Line_Color_\",\n \"_Radius_Top_Left_\",\n \"_Radius_Top_Right_\",\n \"_Radius_Bottom_Left_\",\n \"_Radius_Bottom_Right_\",\n \"_Blob_Position_\",\n \"_Blob_Intensity_\",\n \"_Blob_Near_Size_\",\n \"_Blob_Far_Size_\",\n \"_Blob_Near_Distance_\",\n \"_Blob_Far_Distance_\",\n \"_Blob_Fade_Length_\",\n \"_Blob_Pulse_\",\n \"_Blob_Fade_\",\n \"_Blob_Texture_\",\n \"_Blob_Position_2_\",\n \"_Blob_Near_Size_2_\",\n \"_Blob_Pulse_2_\",\n \"_Blob_Fade_2_\",\n \"_Rate_\",\n \"_Highlight_Color_\",\n \"_Highlight_Width_\",\n \"_Highlight_Transform_\",\n \"_Highlight_\",\n \"_Iridescence_Intensity_\",\n \"_Iridescence_Edge_Intensity_\",\n \"_Angle_\",\n \"_Fade_Out_\",\n \"_Reflected_\",\n \"_Frequency_\",\n \"_Vertical_Offset_\",\n \"_Iridescent_Map_\",\n \"_Use_Global_Left_Index_\",\n \"_Use_Global_Right_Index_\",\n \"Global_Left_Index_Tip_Position\",\n \"Global_Right_Index_Tip_Position\",\n ];\n const samplers = [\"_Blob_Texture_\", \"_Iridescent_Map_\"];\n const uniformBuffers = [];\n MaterialHelper.PrepareUniformsAndSamplersList({\n uniformsNames: uniforms,\n uniformBuffersNames: uniformBuffers,\n samplers: samplers,\n defines: defines,\n maxSimultaneousLights: 4,\n });\n subMesh.setEffect(scene.getEngine().createEffect(shaderName, {\n attributes: attribs,\n uniformsNames: uniforms,\n uniformBuffersNames: uniformBuffers,\n samplers: samplers,\n defines: join,\n fallbacks: fallbacks,\n onCompiled: this.onCompiled,\n onError: this.onError,\n indexParameters: { maxSimultaneousLights: 4 },\n }, engine), defines, this._materialContext);\n }\n if (!subMesh.effect || !subMesh.effect.isReady()) {\n return false;\n }\n defines._renderId = scene.getRenderId();\n subMesh.effect._wasPreviouslyReady = true;\n return true;\n }\n bindForSubMesh(world, mesh, subMesh) {\n var _a, _b;\n const defines = subMesh.materialDefines;\n if (!defines) {\n return;\n }\n const effect = subMesh.effect;\n if (!effect) {\n return;\n }\n this._activeEffect = effect;\n // Matrices\n this.bindOnlyWorldMatrix(world);\n this._activeEffect.setMatrix(\"viewProjection\", this.getScene().getTransformMatrix());\n this._activeEffect.setVector3(\"cameraPosition\", (_b = (_a = this.getScene().activeCamera) === null || _a === void 0 ? void 0 : _a.position) !== null && _b !== void 0 ? _b : Vector3.ZeroReadOnly);\n // \"Round Rect\"\n this._activeEffect.setFloat(\"_Radius_\", this.radius);\n this._activeEffect.setFloat(\"_Line_Width_\", this.lineWidth);\n this._activeEffect.setFloat(\"_Absolute_Sizes_\", this.absoluteSizes ? 1.0 : 0.0);\n this._activeEffect.setFloat(\"_Filter_Width_\", this._filterWidth);\n this._activeEffect.setDirectColor4(\"_Base_Color_\", this.baseColor);\n this._activeEffect.setDirectColor4(\"_Line_Color_\", this.lineColor);\n // \"Radii Multipliers\"\n this._activeEffect.setFloat(\"_Radius_Top_Left_\", 1);\n this._activeEffect.setFloat(\"_Radius_Top_Right_\", 1.0);\n this._activeEffect.setFloat(\"_Radius_Bottom_Left_\", 1.0);\n this._activeEffect.setFloat(\"_Radius_Bottom_Right_\", 1.0);\n // \"Blob\"\n //define BLOB_ENABLE true;\n this._activeEffect.setFloat(\"_Blob_Intensity_\", this.blobIntensity);\n this._activeEffect.setFloat(\"_Blob_Near_Size_\", this.blobNearSize);\n this._activeEffect.setFloat(\"_Blob_Far_Size_\", this.blobFarSize);\n this._activeEffect.setFloat(\"_Blob_Near_Distance_\", this.blobNearDistance);\n this._activeEffect.setFloat(\"_Blob_Far_Distance_\", this.blobFarDistance);\n this._activeEffect.setFloat(\"_Blob_Fade_Length_\", this.blobFadeLength);\n this._activeEffect.setFloat(\"_Blob_Pulse_\", this.blobPulse);\n this._activeEffect.setFloat(\"_Blob_Fade_\", this.blobFade);\n // \"Blob Texture\"\n this._activeEffect.setTexture(\"_Blob_Texture_\", this._blobTexture);\n // \"Blob 2\"\n //define BLOB_ENABLE_2 true;\n this._activeEffect.setFloat(\"_Blob_Near_Size_2_\", this.blobNearSize2);\n this._activeEffect.setFloat(\"_Blob_Pulse_2_\", this.blobPulse2);\n this._activeEffect.setFloat(\"_Blob_Fade_2_\", this.blobFade2);\n // \"Line Highlight\"\n this._activeEffect.setFloat(\"_Rate_\", this._rate);\n this._activeEffect.setDirectColor4(\"_Highlight_Color_\", this.highlightColor);\n this._activeEffect.setFloat(\"_Highlight_Width_\", this.highlightWidth);\n this._activeEffect.setVector4(\"_Highlight_Transform_\", this._highlightTransform);\n this._activeEffect.setFloat(\"_Highlight_\", this._highlight);\n // \"Iridescence\"\n this._activeEffect.setFloat(\"_Iridescence_Intensity_\", this.iridescenceIntensity);\n this._activeEffect.setFloat(\"_Iridescence_Edge_Intensity_\", this.iridescenceEdgeIntensity);\n this._activeEffect.setFloat(\"_Angle_\", this._angle);\n // \"Fade\"\n this._activeEffect.setFloat(\"_Fade_Out_\", this.fadeOut);\n // \"Antialiasing\"\n //define SMOOTH_EDGES true;\n // \"ChooseAngle\"\n this._activeEffect.setFloat(\"_Reflected_\", this._reflected ? 1.0 : 0.0);\n // \"Multiply\"\n this._activeEffect.setFloat(\"_Frequency_\", this._frequency);\n this._activeEffect.setFloat(\"_Vertical_Offset_\", this._verticalOffset);\n // \"Color Texture\"\n //define IRIDESCENT_MAP_ENABLE true;\n this._activeEffect.setTexture(\"_Iridescent_Map_\", this._iridescentMap);\n // \"Global\"\n this._activeEffect.setFloat(\"_Use_Global_Left_Index_\", 1.0);\n this._activeEffect.setFloat(\"_Use_Global_Right_Index_\", 1.0);\n this._globalLeftIndexTipPosition4.set(this.globalLeftIndexTipPosition.x, this.globalLeftIndexTipPosition.y, this.globalLeftIndexTipPosition.z, 1.0);\n this._activeEffect.setVector4(\"Global_Left_Index_Tip_Position\", this._globalLeftIndexTipPosition4);\n this._globalRightIndexTipPosition4.set(this.globalRightIndexTipPosition.x, this.globalRightIndexTipPosition.y, this.globalRightIndexTipPosition.z, 1.0);\n this._activeEffect.setVector4(\"Global_Right_Index_Tip_Position\", this._globalRightIndexTipPosition4);\n this._afterBind(mesh, this._activeEffect);\n }\n /**\n * Get the list of animatables in the material.\n * @returns the list of animatables object used in the material\n */\n getAnimatables() {\n return [];\n }\n dispose(forceDisposeEffect) {\n super.dispose(forceDisposeEffect);\n this._blobTexture.dispose();\n this._iridescentMap.dispose();\n }\n clone(name) {\n return SerializationHelper.Clone(() => new FluentBackplateMaterial(name, this.getScene()), this);\n }\n serialize() {\n const serializationObject = super.serialize();\n serializationObject.customType = \"BABYLON.FluentBackplateMaterial\";\n return serializationObject;\n }\n getClassName() {\n return \"FluentBackplateMaterial\";\n }\n // Statics\n static Parse(source, scene, rootUrl) {\n return SerializationHelper.Parse(() => new FluentBackplateMaterial(source.name, scene), source, scene, rootUrl);\n }\n}\n/**\n * URL pointing to the texture used to define the coloring for the fluent blob effect.\n */\nFluentBackplateMaterial.BLOB_TEXTURE_URL = \"https://assets.babylonjs.com/meshes/MRTK/mrtk-fluent-backplate-blob.png\";\n/**\n * URL pointing to the texture used to define iridescent map.\n */\nFluentBackplateMaterial.IM_TEXTURE_URL = \"https://assets.babylonjs.com/meshes/MRTK/mrtk-fluent-backplate-iridescence.png\";\n__decorate([\n serialize()\n], FluentBackplateMaterial.prototype, \"radius\", void 0);\n__decorate([\n serialize()\n], FluentBackplateMaterial.prototype, \"lineWidth\", void 0);\n__decorate([\n serialize()\n], FluentBackplateMaterial.prototype, \"absoluteSizes\", void 0);\n__decorate([\n serialize()\n], FluentBackplateMaterial.prototype, \"baseColor\", void 0);\n__decorate([\n serialize()\n], FluentBackplateMaterial.prototype, \"lineColor\", void 0);\n__decorate([\n serialize()\n], FluentBackplateMaterial.prototype, \"blobIntensity\", void 0);\n__decorate([\n serialize()\n], FluentBackplateMaterial.prototype, \"blobFarSize\", void 0);\n__decorate([\n serialize()\n], FluentBackplateMaterial.prototype, \"blobNearDistance\", void 0);\n__decorate([\n serialize()\n], FluentBackplateMaterial.prototype, \"blobFarDistance\", void 0);\n__decorate([\n serialize()\n], FluentBackplateMaterial.prototype, \"blobFadeLength\", void 0);\n__decorate([\n serialize()\n], FluentBackplateMaterial.prototype, \"blobNearSize\", void 0);\n__decorate([\n serialize()\n], FluentBackplateMaterial.prototype, \"blobPulse\", void 0);\n__decorate([\n serialize()\n], FluentBackplateMaterial.prototype, \"blobFade\", void 0);\n__decorate([\n serialize()\n], FluentBackplateMaterial.prototype, \"blobNearSize2\", void 0);\n__decorate([\n serialize()\n], FluentBackplateMaterial.prototype, \"blobPulse2\", void 0);\n__decorate([\n serialize()\n], FluentBackplateMaterial.prototype, \"blobFade2\", void 0);\n__decorate([\n serialize()\n], FluentBackplateMaterial.prototype, \"highlightColor\", void 0);\n__decorate([\n serialize()\n], FluentBackplateMaterial.prototype, \"highlightWidth\", void 0);\n__decorate([\n serialize()\n], FluentBackplateMaterial.prototype, \"iridescenceIntensity\", void 0);\n__decorate([\n serialize()\n], FluentBackplateMaterial.prototype, \"iridescenceEdgeIntensity\", void 0);\n__decorate([\n serialize()\n], FluentBackplateMaterial.prototype, \"fadeOut\", void 0);\n__decorate([\n serializeAsVector3()\n], FluentBackplateMaterial.prototype, \"globalLeftIndexTipPosition\", void 0);\n__decorate([\n serializeAsVector3()\n], FluentBackplateMaterial.prototype, \"globalRightIndexTipPosition\", void 0);\nRegisterClass(\"BABYLON.GUI.FluentBackplateMaterial\", FluentBackplateMaterial);\n//# sourceMappingURL=fluentBackplateMaterial.js.map","import { CreateBox } from \"@babylonjs/core/Meshes/Builders/boxBuilder.js\";\nimport { FluentBackplateMaterial } from \"../materials/fluentBackplate/fluentBackplateMaterial.js\";\nimport { Control3D } from \"./control3D.js\";\nimport { SceneLoader } from \"@babylonjs/core/Loading/sceneLoader.js\";\n/**\n * Class used to create a holographic backplate in 3D\n * @since 5.0.0\n */\nexport class HolographicBackplate extends Control3D {\n /**\n * Rendering ground id of the backplate mesh.\n */\n set renderingGroupId(id) {\n this._model.renderingGroupId = id;\n }\n get renderingGroupId() {\n return this._model.renderingGroupId;\n }\n /**\n * Gets the material used by the backplate\n */\n get material() {\n return this._material;\n }\n /**\n * Gets a boolean indicating if this backplate shares its material with other HolographicBackplates\n */\n get shareMaterials() {\n return this._shareMaterials;\n }\n /**\n * Creates a new holographic backplate\n * @param name defines the control name\n * @param _shareMaterials\n */\n constructor(name, _shareMaterials = true) {\n super(name);\n this._shareMaterials = _shareMaterials;\n }\n _getTypeName() {\n return \"HolographicBackplate\";\n }\n // Mesh association\n _createNode(scene) {\n var _a;\n const collisionMesh = CreateBox(((_a = this.name) !== null && _a !== void 0 ? _a : \"HolographicBackplate\") + \"_CollisionMesh\", {\n width: 1.0,\n height: 1.0,\n depth: 1.0,\n }, scene);\n collisionMesh.isPickable = true;\n collisionMesh.visibility = 0;\n SceneLoader.ImportMeshAsync(undefined, HolographicBackplate.MODEL_BASE_URL, HolographicBackplate.MODEL_FILENAME, scene).then((result) => {\n const importedModel = result.meshes[1];\n importedModel.name = `${this.name}_frontPlate`;\n importedModel.isPickable = false;\n importedModel.parent = collisionMesh;\n if (this._material) {\n importedModel.material = this._material;\n }\n this._model = importedModel;\n });\n return collisionMesh;\n }\n _createMaterial(mesh) {\n this._material = new FluentBackplateMaterial(this.name + \" Material\", mesh.getScene());\n }\n _affectMaterial(mesh) {\n // Back\n if (this._shareMaterials) {\n if (!this._host._touchSharedMaterials[\"fluentBackplateMaterial\"]) {\n this._createMaterial(mesh);\n this._host._touchSharedMaterials[\"fluentBackplateMaterial\"] = this._material;\n }\n else {\n this._material = this._host._touchSharedMaterials[\"fluentBackplateMaterial\"];\n }\n }\n else {\n this._createMaterial(mesh);\n }\n }\n /**\n * Releases all associated resources\n */\n dispose() {\n super.dispose(); // will dispose main mesh ie. back plate\n if (!this.shareMaterials) {\n this._material.dispose();\n }\n this._model.dispose();\n }\n}\n/**\n * Base Url for the button model.\n */\nHolographicBackplate.MODEL_BASE_URL = \"https://assets.babylonjs.com/meshes/MRTK/\";\n/**\n * File name for the button model.\n */\nHolographicBackplate.MODEL_FILENAME = \"mrtk-fluent-backplate.glb\";\n//# sourceMappingURL=holographicBackplate.js.map","// Do not edit.\nimport { ShaderStore } from \"@babylonjs/core/Engines/shaderStore.js\";\nconst name = \"fluentButtonPixelShader\";\nconst shader = `uniform vec3 cameraPosition;varying vec3 vPosition;varying vec3 vNormal;varying vec2 vUV;varying vec3 vTangent;varying vec3 vBinormal;varying vec4 vColor;varying vec4 vExtra1;uniform float _Edge_Width_;uniform vec4 _Edge_Color_;uniform bool _Relative_Width_;uniform float _Proximity_Max_Intensity_;uniform float _Proximity_Far_Distance_;uniform float _Proximity_Near_Radius_;uniform float _Proximity_Anisotropy_;uniform float _Selection_Fuzz_;uniform float _Selected_;uniform float _Selection_Fade_;uniform float _Selection_Fade_Size_;uniform float _Selected_Distance_;uniform float _Selected_Fade_Length_;uniform bool _Blob_Enable_;uniform vec3 _Blob_Position_;uniform float _Blob_Intensity_;uniform float _Blob_Near_Size_;uniform float _Blob_Far_Size_;uniform float _Blob_Near_Distance_;uniform float _Blob_Far_Distance_;uniform float _Blob_Fade_Length_;uniform float _Blob_Inner_Fade_;uniform float _Blob_Pulse_;uniform float _Blob_Fade_;uniform sampler2D _Blob_Texture_;uniform bool _Blob_Enable_2_;uniform vec3 _Blob_Position_2_;uniform float _Blob_Near_Size_2_;uniform float _Blob_Inner_Fade_2_;uniform float _Blob_Pulse_2_;uniform float _Blob_Fade_2_;uniform vec3 _Active_Face_Dir_;uniform vec3 _Active_Face_Up_;uniform bool Enable_Fade;uniform float _Fade_Width_;uniform bool _Smooth_Active_Face_;uniform bool _Show_Frame_;uniform bool _Use_Blob_Texture_;uniform bool Use_Global_Left_Index;uniform bool Use_Global_Right_Index;uniform vec4 Global_Left_Index_Tip_Position;uniform vec4 Global_Right_Index_Tip_Position;uniform vec4 Global_Left_Thumb_Tip_Position;uniform vec4 Global_Right_Thumb_Tip_Position;uniform float Global_Left_Index_Tip_Proximity;uniform float Global_Right_Index_Tip_Proximity;void Holo_Edge_Fragment_B35(\nvec4 Edges,\nfloat Edge_Width,\nout float NotEdge)\n{vec2 c=vec2(min(Edges.r,Edges.g),min(Edges.b,Edges.a));vec2 df=fwidth(c)*Edge_Width;vec2 g=clamp(c/df,0.0,1.0);NotEdge=g.x*g.y;}\nvoid Blob_Fragment_B39(\nvec2 UV,\nvec3 Blob_Info,\nsampler2D Blob_Texture,\nout vec4 Blob_Color)\n{float k=dot(UV,UV);Blob_Color=Blob_Info.y*texture(Blob_Texture,vec2(vec2(sqrt(k),Blob_Info.x).x,1.0-vec2(sqrt(k),Blob_Info.x).y))*(1.0-clamp(k,0.0,1.0));}\nvec2 FilterStep(vec2 Edge,vec2 X)\n{vec2 dX=max(fwidth(X),vec2(0.00001,0.00001));return clamp( (X+dX-max(Edge,X-dX))/(dX*2.0),0.0,1.0);}\nvoid Wireframe_Fragment_B59(\nvec3 Widths,\nvec2 UV,\nfloat Proximity,\nvec4 Edge_Color,\nout vec4 Wireframe)\n{vec2 c=min(UV,vec2(1.0,1.0)-UV);vec2 g=FilterStep(Widths.xy*0.5,c); \nWireframe=(1.0-min(g.x,g.y))*Proximity*Edge_Color;}\nvoid Proximity_B53(\nvec3 Proximity_Center,\nvec3 Proximity_Center_2,\nfloat Proximity_Max_Intensity,\nfloat Proximity_Near_Radius,\nvec3 Position,\nvec3 Show_Selection,\nvec4 Extra1,\nfloat Dist_To_Face,\nfloat Intensity,\nout float Proximity)\n{vec2 delta1=Extra1.xy;vec2 delta2=Extra1.zw;float d2=sqrt(min(dot(delta1,delta1),dot(delta2,delta2))+Dist_To_Face*Dist_To_Face);Proximity=Intensity*Proximity_Max_Intensity*(1.0-clamp(d2/Proximity_Near_Radius,0.0,1.0))*(1.0-Show_Selection.x)+Show_Selection.x;}\nvoid To_XYZ_B46(\nvec3 Vec3,\nout float X,\nout float Y,\nout float Z)\n{X=Vec3.x;Y=Vec3.y;Z=Vec3.z;}\nvoid main()\n{float NotEdge_Q35;\n#if ENABLE_FADE\nHolo_Edge_Fragment_B35(vColor,_Fade_Width_,NotEdge_Q35);\n#else\nNotEdge_Q35=1.0;\n#endif\nvec4 Blob_Color_Q39;float k=dot(vUV,vUV);vec2 blobTextureCoord=vec2(vec2(sqrt(k),vTangent.x).x,1.0-vec2(sqrt(k),vTangent.x).y);vec4 blobColor=mix(vec4(1.0,1.0,1.0,1.0)*step(1.0-vTangent.x,clamp(sqrt(k)+0.1,0.0,1.0)),texture(_Blob_Texture_,blobTextureCoord),float(_Use_Blob_Texture_));Blob_Color_Q39=vTangent.y*blobColor*(1.0-clamp(k,0.0,1.0));float Is_Quad_Q24;Is_Quad_Q24=vNormal.z;vec3 Blob_Position_Q41= mix(_Blob_Position_,Global_Left_Index_Tip_Position.xyz,float(Use_Global_Left_Index));vec3 Blob_Position_Q42= mix(_Blob_Position_2_,Global_Right_Index_Tip_Position.xyz,float(Use_Global_Right_Index));float X_Q46;float Y_Q46;float Z_Q46;To_XYZ_B46(vBinormal,X_Q46,Y_Q46,Z_Q46);float Proximity_Q53;Proximity_B53(Blob_Position_Q41,Blob_Position_Q42,_Proximity_Max_Intensity_,_Proximity_Near_Radius_,vPosition,vBinormal,vExtra1,Y_Q46,Z_Q46,Proximity_Q53);vec4 Wireframe_Q59;Wireframe_Fragment_B59(vNormal,vUV,Proximity_Q53,_Edge_Color_,Wireframe_Q59);vec4 Wire_Or_Blob_Q23=mix(Wireframe_Q59,Blob_Color_Q39,Is_Quad_Q24);vec4 Result_Q22;Result_Q22=mix(Wire_Or_Blob_Q23,vec4(0.3,0.3,0.3,0.3),float(_Show_Frame_));vec4 Final_Color_Q37=NotEdge_Q35*Result_Q22;vec4 Out_Color=Final_Color_Q37;float Clip_Threshold=0.0;bool To_sRGB=false;gl_FragColor=Out_Color;}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const fluentButtonPixelShader = { name, shader };\n//# sourceMappingURL=fluentButton.fragment.js.map","// Do not edit.\nimport { ShaderStore } from \"@babylonjs/core/Engines/shaderStore.js\";\nconst name = \"fluentButtonVertexShader\";\nconst shader = `uniform mat4 world;uniform mat4 viewProjection;uniform vec3 cameraPosition;attribute vec3 position;attribute vec3 normal;attribute vec2 uv;attribute vec3 tangent;attribute vec4 color;uniform float _Edge_Width_;uniform vec4 _Edge_Color_;uniform float _Proximity_Max_Intensity_;uniform float _Proximity_Far_Distance_;uniform float _Proximity_Near_Radius_;uniform float _Proximity_Anisotropy_;uniform float _Selection_Fuzz_;uniform float _Selected_;uniform float _Selection_Fade_;uniform float _Selection_Fade_Size_;uniform float _Selected_Distance_;uniform float _Selected_Fade_Length_;uniform bool _Blob_Enable_;uniform vec3 _Blob_Position_;uniform float _Blob_Intensity_;uniform float _Blob_Near_Size_;uniform float _Blob_Far_Size_;uniform float _Blob_Near_Distance_;uniform float _Blob_Far_Distance_;uniform float _Blob_Fade_Length_;uniform float _Blob_Inner_Fade_;uniform float _Blob_Pulse_;uniform float _Blob_Fade_;uniform sampler2D _Blob_Texture_;uniform bool _Blob_Enable_2_;uniform vec3 _Blob_Position_2_;uniform float _Blob_Near_Size_2_;uniform float _Blob_Inner_Fade_2_;uniform float _Blob_Pulse_2_;uniform float _Blob_Fade_2_;uniform vec3 _Active_Face_Dir_;uniform vec3 _Active_Face_Up_;uniform bool _Enable_Fade_;uniform float _Fade_Width_;uniform bool _Smooth_Active_Face_;uniform bool _Show_Frame_;uniform bool Use_Global_Left_Index;uniform bool Use_Global_Right_Index;uniform vec4 Global_Left_Index_Tip_Position;uniform vec4 Global_Right_Index_Tip_Position;uniform vec4 Global_Left_Thumb_Tip_Position;uniform vec4 Global_Right_Thumb_Tip_Position;uniform float Global_Left_Index_Tip_Proximity;uniform float Global_Right_Index_Tip_Proximity;varying vec3 vPosition;varying vec3 vNormal;varying vec2 vUV;varying vec3 vTangent;varying vec3 vBinormal;varying vec4 vColor;varying vec4 vExtra1;void Blob_Vertex_B47(\nvec3 Position,\nvec3 Normal,\nvec3 Tangent,\nvec3 Bitangent,\nvec3 Blob_Position,\nfloat Intensity,\nfloat Blob_Near_Size,\nfloat Blob_Far_Size,\nfloat Blob_Near_Distance,\nfloat Blob_Far_Distance,\nvec4 Vx_Color,\nvec2 UV,\nvec3 Face_Center,\nvec2 Face_Size,\nvec2 In_UV,\nfloat Blob_Fade_Length,\nfloat Selection_Fade,\nfloat Selection_Fade_Size,\nfloat Inner_Fade,\nvec3 Active_Face_Center,\nfloat Blob_Pulse,\nfloat Blob_Fade,\nfloat Blob_Enabled,\nout vec3 Out_Position,\nout vec2 Out_UV,\nout vec3 Blob_Info)\n{float blobSize,fadeIn;vec3 Hit_Position;Blob_Info=vec3(0.0,0.0,0.0);float Hit_Distance=dot(Blob_Position-Face_Center,Normal);Hit_Position=Blob_Position-Hit_Distance*Normal;float absD=abs(Hit_Distance);float lerpVal=clamp((absD-Blob_Near_Distance)/(Blob_Far_Distance-Blob_Near_Distance),0.0,1.0);fadeIn=1.0-clamp((absD-Blob_Far_Distance)/Blob_Fade_Length,0.0,1.0);float innerFade=1.0-clamp(-Hit_Distance/Inner_Fade,0.0,1.0);float farClip=clamp(1.0-step(Blob_Far_Distance+Blob_Fade_Length,absD),0.0,1.0);float size=mix(Blob_Near_Size,Blob_Far_Size,lerpVal)*farClip;blobSize=mix(size,Selection_Fade_Size,Selection_Fade)*innerFade*Blob_Enabled;Blob_Info.x=lerpVal*0.5+0.5;Blob_Info.y=fadeIn*Intensity*(1.0-Selection_Fade)*Blob_Fade;Blob_Info.x*=(1.0-Blob_Pulse);vec3 delta=Hit_Position-Face_Center;vec2 blobCenterXY=vec2(dot(delta,Tangent),dot(delta,Bitangent));vec2 quadUVin=2.0*UV-1.0; \nvec2 blobXY=blobCenterXY+quadUVin*blobSize;vec2 blobClipped=clamp(blobXY,-Face_Size*0.5,Face_Size*0.5);vec2 blobUV=(blobClipped-blobCenterXY)/max(blobSize,0.0001)*2.0;vec3 blobCorner=Face_Center+blobClipped.x*Tangent+blobClipped.y*Bitangent;Out_Position=mix(Position,blobCorner,Vx_Color.rrr);Out_UV=mix(In_UV,blobUV,Vx_Color.rr);}\nvec2 ProjectProximity(\nvec3 blobPosition,\nvec3 position,\nvec3 center,\nvec3 dir,\nvec3 xdir,\nvec3 ydir,\nout float vdistance\n)\n{vec3 delta=blobPosition-position;vec2 xy=vec2(dot(delta,xdir),dot(delta,ydir));vdistance=abs(dot(delta,dir));return xy;}\nvoid Proximity_Vertex_B66(\nvec3 Blob_Position,\nvec3 Blob_Position_2,\nvec3 Active_Face_Center,\nvec3 Active_Face_Dir,\nvec3 Position,\nfloat Proximity_Far_Distance,\nfloat Relative_Scale,\nfloat Proximity_Anisotropy,\nvec3 Up,\nout vec4 Extra1,\nout float Distance_To_Face,\nout float Intensity)\n{vec3 Active_Face_Dir_X=normalize(cross(Active_Face_Dir,Up));vec3 Active_Face_Dir_Y=cross(Active_Face_Dir,Active_Face_Dir_X);float distz1,distz2;Extra1.xy=ProjectProximity(Blob_Position,Position,Active_Face_Center,Active_Face_Dir,Active_Face_Dir_X*Proximity_Anisotropy,Active_Face_Dir_Y,distz1)/Relative_Scale;Extra1.zw=ProjectProximity(Blob_Position_2,Position,Active_Face_Center,Active_Face_Dir,Active_Face_Dir_X*Proximity_Anisotropy,Active_Face_Dir_Y,distz2)/Relative_Scale;Distance_To_Face=dot(Active_Face_Dir,Position-Active_Face_Center);Intensity=1.0-clamp(min(distz1,distz2)/Proximity_Far_Distance,0.0,1.0);}\nvoid Holo_Edge_Vertex_B44(\nvec3 Incident,\nvec3 Normal,\nvec2 UV,\nvec3 Tangent,\nvec3 Bitangent,\nbool Smooth_Active_Face,\nfloat Active,\nout vec4 Holo_Edges)\n{float NdotI=dot(Incident,Normal);vec2 flip=(UV-vec2(0.5,0.5));float udot=dot(Incident,Tangent)*flip.x*NdotI;float uval=1.0-float(udot>0.0);float vdot=-dot(Incident,Bitangent)*flip.y*NdotI;float vval=1.0-float(vdot>0.0);float Smooth_And_Active=step(1.0,float(Smooth_Active_Face && Active>0.0));uval=mix(uval,max(1.0,uval),Smooth_And_Active); \nvval=mix(vval,max(1.0,vval),Smooth_And_Active);Holo_Edges=vec4(1.0,1.0,1.0,1.0)-vec4(uval*UV.x,uval*(1.0-UV.x),vval*UV.y,vval*(1.0-UV.y));}\nvoid Object_To_World_Pos_B13(\nvec3 Pos_Object,\nout vec3 Pos_World)\n{Pos_World=(world*vec4(Pos_Object,1.0)).xyz;}\nvoid Choose_Blob_B38(\nvec4 Vx_Color,\nvec3 Position1,\nvec3 Position2,\nbool Blob_Enable_1,\nbool Blob_Enable_2,\nfloat Near_Size_1,\nfloat Near_Size_2,\nfloat Blob_Inner_Fade_1,\nfloat Blob_Inner_Fade_2,\nfloat Blob_Pulse_1,\nfloat Blob_Pulse_2,\nfloat Blob_Fade_1,\nfloat Blob_Fade_2,\nout vec3 Position,\nout float Near_Size,\nout float Inner_Fade,\nout float Blob_Enable,\nout float Fade,\nout float Pulse)\n{Position=Position1*(1.0-Vx_Color.g)+Vx_Color.g*Position2;float b1=float(Blob_Enable_1);float b2=float(Blob_Enable_2);Blob_Enable=b1+(b2-b1)*Vx_Color.g;Pulse=Blob_Pulse_1*(1.0-Vx_Color.g)+Vx_Color.g*Blob_Pulse_2;Fade=Blob_Fade_1*(1.0-Vx_Color.g)+Vx_Color.g*Blob_Fade_2;Near_Size=Near_Size_1*(1.0-Vx_Color.g)+Vx_Color.g*Near_Size_2;Inner_Fade=Blob_Inner_Fade_1*(1.0-Vx_Color.g)+Vx_Color.g*Blob_Inner_Fade_2;}\nvoid Wireframe_Vertex_B51(\nvec3 Position,\nvec3 Normal,\nvec3 Tangent,\nvec3 Bitangent,\nfloat Edge_Width,\nvec2 Face_Size,\nout vec3 Wire_Vx_Pos,\nout vec2 UV,\nout vec2 Widths)\n{Widths.xy=Edge_Width/Face_Size;float x=dot(Position,Tangent);float y=dot(Position,Bitangent);float dx=0.5-abs(x);float newx=(0.5-dx*Widths.x*2.0)*sign(x);float dy=0.5-abs(y);float newy=(0.5-dy*Widths.y*2.0)*sign(y);Wire_Vx_Pos=Normal*0.5+newx*Tangent+newy*Bitangent;UV.x=dot(Wire_Vx_Pos,Tangent)+0.5;UV.y=dot(Wire_Vx_Pos,Bitangent)+0.5;}\nvec2 ramp2(vec2 start,vec2 end,vec2 x)\n{return clamp((x-start)/(end-start),vec2(0.0,0.0),vec2(1.0,1.0));}\nfloat computeSelection(\nvec3 blobPosition,\nvec3 normal,\nvec3 tangent,\nvec3 bitangent,\nvec3 faceCenter,\nvec2 faceSize,\nfloat selectionFuzz,\nfloat farDistance,\nfloat fadeLength\n)\n{vec3 delta=blobPosition-faceCenter;float absD=abs(dot(delta,normal));float fadeIn=1.0-clamp((absD-farDistance)/fadeLength,0.0,1.0);vec2 blobCenterXY=vec2(dot(delta,tangent),dot(delta,bitangent));vec2 innerFace=faceSize*(1.0-selectionFuzz)*0.5;vec2 selectPulse=ramp2(-faceSize*0.5,-innerFace,blobCenterXY)-ramp2(innerFace,faceSize*0.5,blobCenterXY);return selectPulse.x*selectPulse.y*fadeIn;}\nvoid Selection_Vertex_B48(\nvec3 Blob_Position,\nvec3 Blob_Position_2,\nvec3 Face_Center,\nvec2 Face_Size,\nvec3 Normal,\nvec3 Tangent,\nvec3 Bitangent,\nfloat Selection_Fuzz,\nfloat Selected,\nfloat Far_Distance,\nfloat Fade_Length,\nvec3 Active_Face_Dir,\nout float Show_Selection)\n{float select1=computeSelection(Blob_Position,Normal,Tangent,Bitangent,Face_Center,Face_Size,Selection_Fuzz,Far_Distance,Fade_Length);float select2=computeSelection(Blob_Position_2,Normal,Tangent,Bitangent,Face_Center,Face_Size,Selection_Fuzz,Far_Distance,Fade_Length);float Active=max(0.0,dot(Active_Face_Dir,Normal));Show_Selection=mix(max(select1,select2),1.0,Selected)*Active;}\nvoid Proximity_Visibility_B54(\nfloat Selection,\nvec3 Proximity_Center,\nvec3 Proximity_Center_2,\nfloat Input_Width,\nfloat Proximity_Far_Distance,\nfloat Proximity_Radius,\nvec3 Active_Face_Center,\nvec3 Active_Face_Dir,\nout float Width)\n{vec3 boxEdges=(world*vec4(vec3(0.5,0.5,0.5),0.0)).xyz;float boxMaxSize=length(boxEdges);float d1=dot(Proximity_Center-Active_Face_Center,Active_Face_Dir);vec3 blob1=Proximity_Center-d1*Active_Face_Dir;float d2=dot(Proximity_Center_2-Active_Face_Center,Active_Face_Dir);vec3 blob2=Proximity_Center_2-d2*Active_Face_Dir;vec3 delta1=blob1-Active_Face_Center;vec3 delta2=blob2-Active_Face_Center;float dist1=dot(delta1,delta1);float dist2=dot(delta2,delta2);float nearestProxDist=sqrt(min(dist1,dist2));Width=Input_Width*(1.0-step(boxMaxSize+Proximity_Radius,nearestProxDist))*(1.0-step(Proximity_Far_Distance,min(d1,d2))*(1.0-step(0.0001,Selection)));}\nvoid Object_To_World_Dir_B67(\nvec3 Dir_Object,\nout vec3 Dir_World)\n{Dir_World=(world*vec4(Dir_Object,0.0)).xyz;}\nvoid main()\n{vec3 Active_Face_Center_Q49;Active_Face_Center_Q49=(world*vec4(_Active_Face_Dir_*0.5,1.0)).xyz;vec3 Blob_Position_Q41= mix(_Blob_Position_,Global_Left_Index_Tip_Position.xyz,float(Use_Global_Left_Index));vec3 Blob_Position_Q42= mix(_Blob_Position_2_,Global_Right_Index_Tip_Position.xyz,float(Use_Global_Right_Index));vec3 Active_Face_Dir_Q64=normalize((world*vec4(_Active_Face_Dir_,0.0)).xyz);float Relative_Scale_Q57;\n#if RELATIVE_WIDTH\nRelative_Scale_Q57=length((world*vec4(vec3(0,1,0),0.0)).xyz);\n#else\nRelative_Scale_Q57=1.0;\n#endif\nvec3 Tangent_World_Q30;Tangent_World_Q30=(world*vec4(tangent,0.0)).xyz;vec3 Binormal_World_Q31;Binormal_World_Q31=(world*vec4((cross(normal,tangent)),0.0)).xyz;vec3 Normal_World_Q60;Normal_World_Q60=(world*vec4(normal,0.0)).xyz;vec3 Result_Q18=0.5*normal;vec3 Dir_World_Q67;Object_To_World_Dir_B67(_Active_Face_Up_,Dir_World_Q67);float Product_Q56=_Edge_Width_*Relative_Scale_Q57;vec3 Normal_World_N_Q29=normalize(Normal_World_Q60);vec3 Tangent_World_N_Q28=normalize(Tangent_World_Q30);vec3 Binormal_World_N_Q32=normalize(Binormal_World_Q31);vec3 Position_Q38;float Near_Size_Q38;float Inner_Fade_Q38;float Blob_Enable_Q38;float Fade_Q38;float Pulse_Q38;Choose_Blob_B38(color,Blob_Position_Q41,Blob_Position_Q42,_Blob_Enable_,_Blob_Enable_2_,_Blob_Near_Size_,_Blob_Near_Size_2_,_Blob_Inner_Fade_,_Blob_Inner_Fade_2_,_Blob_Pulse_,_Blob_Pulse_2_,_Blob_Fade_,_Blob_Fade_2_,Position_Q38,Near_Size_Q38,Inner_Fade_Q38,Blob_Enable_Q38,Fade_Q38,Pulse_Q38);vec3 Face_Center_Q33;Face_Center_Q33=(world*vec4(Result_Q18,1.0)).xyz;vec2 Face_Size_Q50=vec2(length(Tangent_World_Q30),length(Binormal_World_Q31));float Show_Selection_Q48;Selection_Vertex_B48(Blob_Position_Q41,Blob_Position_Q42,Face_Center_Q33,Face_Size_Q50,Normal_World_N_Q29,Tangent_World_N_Q28,Binormal_World_N_Q32,_Selection_Fuzz_,_Selected_,_Selected_Distance_,_Selected_Fade_Length_,Active_Face_Dir_Q64,Show_Selection_Q48);vec3 Normalized_Q72=normalize(Dir_World_Q67);float Active_Q34=max(0.0,dot(Active_Face_Dir_Q64,Normal_World_N_Q29));float Width_Q54;Proximity_Visibility_B54(Show_Selection_Q48,Blob_Position_Q41,Blob_Position_Q42,Product_Q56,_Proximity_Far_Distance_,_Proximity_Near_Radius_,Active_Face_Center_Q49,Active_Face_Dir_Q64,Width_Q54);vec3 Wire_Vx_Pos_Q51;vec2 UV_Q51;vec2 Widths_Q51;Wireframe_Vertex_B51(position,normal,tangent,(cross(normal,tangent)),Width_Q54,Face_Size_Q50,Wire_Vx_Pos_Q51,UV_Q51,Widths_Q51);vec3 Vec3_Q27=vec3(Widths_Q51.x,Widths_Q51.y,color.r);vec3 Pos_World_Q13;Object_To_World_Pos_B13(Wire_Vx_Pos_Q51,Pos_World_Q13);vec3 Incident_Q36=normalize(Pos_World_Q13-cameraPosition);vec3 Out_Position_Q47;vec2 Out_UV_Q47;vec3 Blob_Info_Q47;Blob_Vertex_B47(Pos_World_Q13,Normal_World_N_Q29,Tangent_World_N_Q28,Binormal_World_N_Q32,Position_Q38,_Blob_Intensity_,Near_Size_Q38,_Blob_Far_Size_,_Blob_Near_Distance_,_Blob_Far_Distance_,color,uv,Face_Center_Q33,Face_Size_Q50,UV_Q51,_Blob_Fade_Length_,_Selection_Fade_,_Selection_Fade_Size_,Inner_Fade_Q38,Active_Face_Center_Q49,Pulse_Q38,Fade_Q38,Blob_Enable_Q38,Out_Position_Q47,Out_UV_Q47,Blob_Info_Q47);vec4 Extra1_Q66;float Distance_To_Face_Q66;float Intensity_Q66;Proximity_Vertex_B66(Blob_Position_Q41,Blob_Position_Q42,Active_Face_Center_Q49,Active_Face_Dir_Q64,Pos_World_Q13,_Proximity_Far_Distance_,Relative_Scale_Q57,_Proximity_Anisotropy_,Normalized_Q72,Extra1_Q66,Distance_To_Face_Q66,Intensity_Q66);vec4 Holo_Edges_Q44;Holo_Edge_Vertex_B44(Incident_Q36,Normal_World_N_Q29,uv,Tangent_World_Q30,Binormal_World_Q31,_Smooth_Active_Face_,Active_Q34,Holo_Edges_Q44);vec3 Vec3_Q19=vec3(Show_Selection_Q48,Distance_To_Face_Q66,Intensity_Q66);vec3 Position=Out_Position_Q47;vec2 UV=Out_UV_Q47;vec3 Tangent=Blob_Info_Q47;vec3 Binormal=Vec3_Q19;vec3 Normal=Vec3_Q27;vec4 Extra1=Extra1_Q66;vec4 Color=Holo_Edges_Q44;gl_Position=viewProjection*vec4(Position,1);vPosition=Position;vNormal=Normal;vUV=UV;vTangent=Tangent;vBinormal=Binormal;vColor=Color;vExtra1=Extra1;}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const fluentButtonVertexShader = { name, shader };\n//# sourceMappingURL=fluentButton.vertex.js.map","import { __decorate } from \"@babylonjs/core/tslib.es6.js\";\nimport { serializeAsColor4, serializeAsVector3, serialize, SerializationHelper } from \"@babylonjs/core/Misc/decorators.js\";\nimport { Vector3, Vector4 } from \"@babylonjs/core/Maths/math.vector.js\";\nimport { Texture } from \"@babylonjs/core/Materials/Textures/texture.js\";\nimport { MaterialDefines } from \"@babylonjs/core/Materials/materialDefines.js\";\nimport { MaterialHelper } from \"@babylonjs/core/Materials/materialHelper.js\";\nimport { PushMaterial } from \"@babylonjs/core/Materials/pushMaterial.js\";\nimport { VertexBuffer } from \"@babylonjs/core/Buffers/buffer.js\";\nimport { RegisterClass } from \"@babylonjs/core/Misc/typeStore.js\";\nimport { Color3, Color4 } from \"@babylonjs/core/Maths/math.color.js\";\nimport { EffectFallbacks } from \"@babylonjs/core/Materials/effectFallbacks.js\";\nimport { Constants } from \"@babylonjs/core/Engines/constants.js\";\nimport \"./shaders/fluentButton.fragment.js\";\nimport \"./shaders/fluentButton.vertex.js\";\n/** @internal */\nclass FluentButtonMaterialDefines extends MaterialDefines {\n constructor() {\n super();\n this.RELATIVE_WIDTH = true;\n this.ENABLE_FADE = true;\n this._needNormals = true;\n this._needUVs = true;\n this.rebuild();\n }\n}\n/**\n * Class used to render square buttons with fluent design\n * @since 5.0.0\n */\nexport class FluentButtonMaterial extends PushMaterial {\n constructor(name, scene) {\n super(name, scene);\n /**\n * Gets or sets the width of the glowing edge, relative to the scale of the button.\n * (Default is 4% of the height).\n */\n this.edgeWidth = 0.04;\n /**\n * Gets or sets the color of the glowing edge.\n */\n this.edgeColor = new Color4(0.592157, 0.592157, 0.592157, 1.0);\n /**\n * Gets or sets the maximum intensity of the proximity light.\n */\n this.proximityMaxIntensity = 0.45;\n /**\n * Gets or sets the maximum distance for the proximity light (Default is 16mm).\n */\n this.proximityFarDistance = 0.16;\n /**\n * Gets or sets the radius of the proximity light when near to the surface.\n */\n this.proximityNearRadius = 1.5;\n /**\n * Gets or sets the anisotropy of the proximity light.\n */\n this.proximityAnisotropy = 1;\n /**\n * Gets or sets the amount of fuzzing in the selection focus.\n */\n this.selectionFuzz = 0.5;\n /**\n * Gets or sets an override value to display the button as selected.\n */\n this.selected = 0;\n /**\n * Gets or sets a value to manually fade the blob size.\n */\n this.selectionFade = 0;\n /**\n * Gets or sets a value to manually shrink the blob size as it fades (see selectionFade).\n */\n this.selectionFadeSize = 0.3;\n /**\n * Gets or sets the distance from the button the cursor should be for the button\n * to appear selected (Default is 8cm).\n */\n this.selectedDistance = 0.08;\n /**\n * Gets or sets the fall-off distance for the selection fade (Default is 8cm).\n */\n this.selectedFadeLength = 0.08;\n /**\n * Gets or sets the intensity of the luminous blob (Ranges 0-1, default is 0.5).\n */\n this.blobIntensity = 0.5;\n /**\n * The size of the blob when the pointer is at the blobFarDistance (Default is 5cm).\n */\n this.blobFarSize = 0.05;\n /**\n * The distance at which the pointer is considered near. See [left|right]BlobNearSize. (Default is 0cm).\n */\n this.blobNearDistance = 0;\n /**\n * The distance at which the pointer is considered far. See [left|right]BlobFarSize. (Default is 8cm).\n */\n this.blobFarDistance = 0.08;\n /**\n * The distance over which the blob intensity fades from full to none (Default is 8cm).\n */\n this.blobFadeLength = 0.08;\n /**\n * Gets or sets whether the blob corresponding to the left index finger is enabled.\n */\n this.leftBlobEnable = true;\n /**\n * Gets or sets the size of the left blob when the left pointer is considered near. See blobNearDistance. (Default is 2.5cm).\n */\n this.leftBlobNearSize = 0.025;\n /**\n * Gets or sets the progress of the pulse animation on the left blob (Ranges 0-1).\n */\n this.leftBlobPulse = 0;\n /**\n * Gets or sets the fade factor on the left blob.\n */\n this.leftBlobFade = 1;\n /**\n * Gets or sets the inner fade on the left blob;\n */\n this.leftBlobInnerFade = 0.01;\n /**\n * Gets or sets whether the blob corresponding to the right index finger is enabled.\n */\n this.rightBlobEnable = true;\n /**\n * Gets or sets the size of the right blob when the right pointer is considered near. See blobNearDistance. (Default is 2.5cm).\n */\n this.rightBlobNearSize = 0.025;\n /**\n * Gets or sets the progress of the pulse animation on the right blob (Ranges 0-1).\n */\n this.rightBlobPulse = 0;\n /**\n * Gets or sets the fade factor on the right blob.\n */\n this.rightBlobFade = 1;\n /**\n * Gets or sets the inner fade on the right blob;\n */\n this.rightBlobInnerFade = 0.01;\n /**\n * Gets or sets the direction of the active face before the world transform is applied.\n * This should almost always be set to -z.\n */\n this.activeFaceDir = new Vector3(0, 0, -1);\n /**\n * Gets or sets the button's up direction before the world transform is applied.\n * This should almost always be set to +y.\n */\n this.activeFaceUp = new Vector3(0, 1, 0);\n /**\n * Gets or sets whether the edge fade effect is enabled.\n */\n this.enableFade = true;\n /**\n * Gets or sets a value corresponding to the width of the edge fade effect (Default 1.5).\n */\n this.fadeWidth = 1.5;\n /**\n * Gets or sets whether the active face is smoothly interpolated.\n */\n this.smoothActiveFace = true;\n /**\n * Gets or sets whether the frame of the fluent button model is visible.\n * This is usually only enabled for debugging purposes.\n */\n this.showFrame = false;\n /**\n * Gets or sets whether the blob color texture is used for the proximity\n * light effect. This is usually only disabled for debugging purposes.\n */\n this.useBlobTexture = true;\n /**\n * Gets or sets the world-space position of the tip of the left index finger.\n */\n this.globalLeftIndexTipPosition = Vector3.Zero();\n /**\n * Gets or sets the world-space position of the tip of the right index finger.\n */\n this.globalRightIndexTipPosition = Vector3.Zero();\n this.alphaMode = Constants.ALPHA_ADD;\n this.disableDepthWrite = true;\n this.backFaceCulling = false;\n this._blobTexture = new Texture(FluentButtonMaterial.BLOB_TEXTURE_URL, this.getScene(), true, false, Texture.NEAREST_SAMPLINGMODE);\n }\n needAlphaBlending() {\n return true;\n }\n needAlphaTesting() {\n return true;\n }\n getAlphaTestTexture() {\n return null;\n }\n // Methods\n isReadyForSubMesh(mesh, subMesh) {\n if (this.isFrozen) {\n if (subMesh.effect && subMesh.effect._wasPreviouslyReady) {\n return true;\n }\n }\n if (!subMesh.materialDefines) {\n subMesh.materialDefines = new FluentButtonMaterialDefines();\n }\n const defines = subMesh.materialDefines;\n const scene = this.getScene();\n if (this._isReadyForSubMesh(subMesh)) {\n return true;\n }\n const engine = scene.getEngine();\n // Attribs\n MaterialHelper.PrepareDefinesForAttributes(mesh, defines, true, false);\n // Get correct effect\n if (defines.isDirty) {\n defines.markAsProcessed();\n scene.resetCachedMaterial();\n // Fallbacks\n const fallbacks = new EffectFallbacks();\n if (defines.FOG) {\n fallbacks.addFallback(1, \"FOG\");\n }\n MaterialHelper.HandleFallbacksForShadows(defines, fallbacks);\n defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess;\n //Attributes\n const attribs = [VertexBuffer.PositionKind];\n if (defines.NORMAL) {\n attribs.push(VertexBuffer.NormalKind);\n }\n if (defines.UV1) {\n attribs.push(VertexBuffer.UVKind);\n }\n if (defines.UV2) {\n attribs.push(VertexBuffer.UV2Kind);\n }\n if (defines.VERTEXCOLOR) {\n attribs.push(VertexBuffer.ColorKind);\n }\n if (defines.TANGENT) {\n attribs.push(VertexBuffer.TangentKind);\n }\n MaterialHelper.PrepareAttributesForInstances(attribs, defines);\n // Legacy browser patch\n const shaderName = \"fluentButton\";\n const join = defines.toString();\n const uniforms = [\n \"world\",\n \"viewProjection\",\n \"cameraPosition\",\n \"_Edge_Width_\",\n \"_Edge_Color_\",\n \"_Relative_Width_\",\n \"_Proximity_Max_Intensity_\",\n \"_Proximity_Far_Distance_\",\n \"_Proximity_Near_Radius_\",\n \"_Proximity_Anisotropy_\",\n \"_Selection_Fuzz_\",\n \"_Selected_\",\n \"_Selection_Fade_\",\n \"_Selection_Fade_Size_\",\n \"_Selected_Distance_\",\n \"_Selected_Fade_Length_\",\n \"_Blob_Enable_\",\n \"_Blob_Position_\",\n \"_Blob_Intensity_\",\n \"_Blob_Near_Size_\",\n \"_Blob_Far_Size_\",\n \"_Blob_Near_Distance_\",\n \"_Blob_Far_Distance_\",\n \"_Blob_Fade_Length_\",\n \"_Blob_Inner_Fade_\",\n \"_Blob_Pulse_\",\n \"_Blob_Fade_\",\n \"_Blob_Texture_\",\n \"_Blob_Enable_2_\",\n \"_Blob_Position_2_\",\n \"_Blob_Near_Size_2_\",\n \"_Blob_Inner_Fade_2_\",\n \"_Blob_Pulse_2_\",\n \"_Blob_Fade_2_\",\n \"_Active_Face_Dir_\",\n \"_Active_Face_Up_\",\n \"_Enable_Fade_\",\n \"_Fade_Width_\",\n \"_Smooth_Active_Face_\",\n \"_Show_Frame_\",\n \"_Use_Blob_Texture_\",\n \"Use_Global_Left_Index\",\n \"Use_Global_Right_Index\",\n \"Global_Left_Index_Tip_Position\",\n \"Global_Right_Index_Tip_Position\",\n \"Global_Left_Thumb_Tip_Position\",\n \"Global_Right_Thumb_Tip_Position\",\n \"Global_Left_Index_Tip_Proximity\",\n \"Global_Right_Index_Tip_Proximity\",\n ];\n const samplers = [\"_Blob_Texture_\"];\n const uniformBuffers = [];\n MaterialHelper.PrepareUniformsAndSamplersList({\n uniformsNames: uniforms,\n uniformBuffersNames: uniformBuffers,\n samplers: samplers,\n defines: defines,\n maxSimultaneousLights: 4,\n });\n subMesh.setEffect(scene.getEngine().createEffect(shaderName, {\n attributes: attribs,\n uniformsNames: uniforms,\n uniformBuffersNames: uniformBuffers,\n samplers: samplers,\n defines: join,\n fallbacks: fallbacks,\n onCompiled: this.onCompiled,\n onError: this.onError,\n indexParameters: { maxSimultaneousLights: 4 },\n }, engine), defines, this._materialContext);\n }\n if (!subMesh.effect || !subMesh.effect.isReady()) {\n return false;\n }\n defines._renderId = scene.getRenderId();\n subMesh.effect._wasPreviouslyReady = true;\n return true;\n }\n bindForSubMesh(world, mesh, subMesh) {\n const scene = this.getScene();\n const defines = subMesh.materialDefines;\n if (!defines) {\n return;\n }\n const effect = subMesh.effect;\n if (!effect) {\n return;\n }\n this._activeEffect = effect;\n // Matrices\n this.bindOnlyWorldMatrix(world);\n this._activeEffect.setMatrix(\"viewProjection\", scene.getTransformMatrix());\n this._activeEffect.setVector3(\"cameraPosition\", scene.activeCamera.position);\n // \"Blob Texture\"\n this._activeEffect.setTexture(\"_Blob_Texture_\", this._blobTexture);\n // \"Wireframe\"\n this._activeEffect.setFloat(\"_Edge_Width_\", this.edgeWidth);\n this._activeEffect.setColor4(\"_Edge_Color_\", new Color3(this.edgeColor.r, this.edgeColor.g, this.edgeColor.b), this.edgeColor.a);\n //define _Relative_Width_ true;\n // \"Proximity\"\n this._activeEffect.setFloat(\"_Proximity_Max_Intensity_\", this.proximityMaxIntensity);\n this._activeEffect.setFloat(\"_Proximity_Far_Distance_\", this.proximityFarDistance);\n this._activeEffect.setFloat(\"_Proximity_Near_Radius_\", this.proximityNearRadius);\n this._activeEffect.setFloat(\"_Proximity_Anisotropy_\", this.proximityAnisotropy);\n // \"Selection\"\n this._activeEffect.setFloat(\"_Selection_Fuzz_\", this.selectionFuzz);\n this._activeEffect.setFloat(\"_Selected_\", this.selected);\n this._activeEffect.setFloat(\"_Selection_Fade_\", this.selectionFade);\n this._activeEffect.setFloat(\"_Selection_Fade_Size_\", this.selectionFadeSize);\n this._activeEffect.setFloat(\"_Selected_Distance_\", this.selectedDistance);\n this._activeEffect.setFloat(\"_Selected_Fade_Length_\", this.selectedFadeLength);\n // \"Blob\"\n this._activeEffect.setFloat(\"_Blob_Enable_\", this.leftBlobEnable ? 1.0 : 0.0);\n this._activeEffect.setFloat(\"_Blob_Intensity_\", this.blobIntensity);\n this._activeEffect.setFloat(\"_Blob_Near_Size_\", this.leftBlobNearSize);\n this._activeEffect.setFloat(\"_Blob_Far_Size_\", this.blobFarSize);\n this._activeEffect.setFloat(\"_Blob_Near_Distance_\", this.blobNearDistance);\n this._activeEffect.setFloat(\"_Blob_Far_Distance_\", this.blobFarDistance);\n this._activeEffect.setFloat(\"_Blob_Fade_Length_\", this.blobFadeLength);\n this._activeEffect.setFloat(\"_Blob_Inner_Fade_\", this.leftBlobInnerFade);\n this._activeEffect.setFloat(\"_Blob_Pulse_\", this.leftBlobPulse);\n this._activeEffect.setFloat(\"_Blob_Fade_\", this.leftBlobFade);\n // \"Blob 2\"\n this._activeEffect.setFloat(\"_Blob_Enable_2_\", this.rightBlobEnable ? 1.0 : 0.0);\n this._activeEffect.setFloat(\"_Blob_Near_Size_2_\", this.rightBlobNearSize);\n this._activeEffect.setFloat(\"_Blob_Inner_Fade_2_\", this.rightBlobInnerFade);\n this._activeEffect.setFloat(\"_Blob_Pulse_2_\", this.rightBlobPulse);\n this._activeEffect.setFloat(\"_Blob_Fade_2_\", this.rightBlobFade);\n // \"Active Face\"\n this._activeEffect.setVector3(\"_Active_Face_Dir_\", this.activeFaceDir);\n this._activeEffect.setVector3(\"_Active_Face_Up_\", this.activeFaceUp);\n // \"Hololens Edge Fade\"\n //define _Enable_Fade_ true;\n this._activeEffect.setFloat(\"_Fade_Width_\", this.fadeWidth);\n this._activeEffect.setFloat(\"_Smooth_Active_Face_\", this.smoothActiveFace ? 1.0 : 0.0);\n // \"Debug\"\n this._activeEffect.setFloat(\"_Show_Frame_\", this.showFrame ? 1.0 : 0.0);\n this._activeEffect.setFloat(\"_Use_Blob_Texture_\", this.useBlobTexture ? 1.0 : 0.0);\n // Global inputs\n this._activeEffect.setFloat(\"Use_Global_Left_Index\", 1.0);\n this._activeEffect.setFloat(\"Use_Global_Right_Index\", 1.0);\n this._activeEffect.setVector4(\"Global_Left_Index_Tip_Position\", new Vector4(this.globalLeftIndexTipPosition.x, this.globalLeftIndexTipPosition.y, this.globalLeftIndexTipPosition.z, 1.0));\n this._activeEffect.setVector4(\"Global_Right_Index_Tip_Position\", new Vector4(this.globalRightIndexTipPosition.x, this.globalRightIndexTipPosition.y, this.globalRightIndexTipPosition.z, 1.0));\n this._afterBind(mesh, this._activeEffect);\n }\n /**\n * Get the list of animatables in the material.\n * @returns the list of animatables object used in the material\n */\n getAnimatables() {\n return [];\n }\n dispose(forceDisposeEffect) {\n super.dispose(forceDisposeEffect);\n }\n clone(name) {\n return SerializationHelper.Clone(() => new FluentButtonMaterial(name, this.getScene()), this);\n }\n serialize() {\n const serializationObject = super.serialize();\n serializationObject.customType = \"BABYLON.FluentButtonMaterial\";\n return serializationObject;\n }\n getClassName() {\n return \"FluentButtonMaterial\";\n }\n // Statics\n static Parse(source, scene, rootUrl) {\n return SerializationHelper.Parse(() => new FluentButtonMaterial(source.name, scene), source, scene, rootUrl);\n }\n}\n/**\n * URL pointing to the texture used to define the coloring for the fluent blob effect.\n */\nFluentButtonMaterial.BLOB_TEXTURE_URL = \"https://assets.babylonjs.com/meshes/MRTK/mrtk-fluent-button-blob.png\";\n__decorate([\n serialize()\n], FluentButtonMaterial.prototype, \"edgeWidth\", void 0);\n__decorate([\n serializeAsColor4()\n], FluentButtonMaterial.prototype, \"edgeColor\", void 0);\n__decorate([\n serialize()\n], FluentButtonMaterial.prototype, \"proximityMaxIntensity\", void 0);\n__decorate([\n serialize()\n], FluentButtonMaterial.prototype, \"proximityFarDistance\", void 0);\n__decorate([\n serialize()\n], FluentButtonMaterial.prototype, \"proximityNearRadius\", void 0);\n__decorate([\n serialize()\n], FluentButtonMaterial.prototype, \"proximityAnisotropy\", void 0);\n__decorate([\n serialize()\n], FluentButtonMaterial.prototype, \"selectionFuzz\", void 0);\n__decorate([\n serialize()\n], FluentButtonMaterial.prototype, \"selected\", void 0);\n__decorate([\n serialize()\n], FluentButtonMaterial.prototype, \"selectionFade\", void 0);\n__decorate([\n serialize()\n], FluentButtonMaterial.prototype, \"selectionFadeSize\", void 0);\n__decorate([\n serialize()\n], FluentButtonMaterial.prototype, \"selectedDistance\", void 0);\n__decorate([\n serialize()\n], FluentButtonMaterial.prototype, \"selectedFadeLength\", void 0);\n__decorate([\n serialize()\n], FluentButtonMaterial.prototype, \"blobIntensity\", void 0);\n__decorate([\n serialize()\n], FluentButtonMaterial.prototype, \"blobFarSize\", void 0);\n__decorate([\n serialize()\n], FluentButtonMaterial.prototype, \"blobNearDistance\", void 0);\n__decorate([\n serialize()\n], FluentButtonMaterial.prototype, \"blobFarDistance\", void 0);\n__decorate([\n serialize()\n], FluentButtonMaterial.prototype, \"blobFadeLength\", void 0);\n__decorate([\n serialize()\n], FluentButtonMaterial.prototype, \"leftBlobEnable\", void 0);\n__decorate([\n serialize()\n], FluentButtonMaterial.prototype, \"leftBlobNearSize\", void 0);\n__decorate([\n serialize()\n], FluentButtonMaterial.prototype, \"leftBlobPulse\", void 0);\n__decorate([\n serialize()\n], FluentButtonMaterial.prototype, \"leftBlobFade\", void 0);\n__decorate([\n serialize()\n], FluentButtonMaterial.prototype, \"leftBlobInnerFade\", void 0);\n__decorate([\n serialize()\n], FluentButtonMaterial.prototype, \"rightBlobEnable\", void 0);\n__decorate([\n serialize()\n], FluentButtonMaterial.prototype, \"rightBlobNearSize\", void 0);\n__decorate([\n serialize()\n], FluentButtonMaterial.prototype, \"rightBlobPulse\", void 0);\n__decorate([\n serialize()\n], FluentButtonMaterial.prototype, \"rightBlobFade\", void 0);\n__decorate([\n serialize()\n], FluentButtonMaterial.prototype, \"rightBlobInnerFade\", void 0);\n__decorate([\n serializeAsVector3()\n], FluentButtonMaterial.prototype, \"activeFaceDir\", void 0);\n__decorate([\n serializeAsVector3()\n], FluentButtonMaterial.prototype, \"activeFaceUp\", void 0);\n__decorate([\n serialize()\n], FluentButtonMaterial.prototype, \"enableFade\", void 0);\n__decorate([\n serialize()\n], FluentButtonMaterial.prototype, \"fadeWidth\", void 0);\n__decorate([\n serialize()\n], FluentButtonMaterial.prototype, \"smoothActiveFace\", void 0);\n__decorate([\n serialize()\n], FluentButtonMaterial.prototype, \"showFrame\", void 0);\n__decorate([\n serialize()\n], FluentButtonMaterial.prototype, \"useBlobTexture\", void 0);\n__decorate([\n serializeAsVector3()\n], FluentButtonMaterial.prototype, \"globalLeftIndexTipPosition\", void 0);\n__decorate([\n serializeAsVector3()\n], FluentButtonMaterial.prototype, \"globalRightIndexTipPosition\", void 0);\nRegisterClass(\"BABYLON.GUI.FluentButtonMaterial\", FluentButtonMaterial);\n//# sourceMappingURL=fluentButtonMaterial.js.map","// Assumptions: absolute position of button mesh is inside the mesh\nimport { Vector3, TmpVectors } from \"@babylonjs/core/Maths/math.vector.js\";\nimport { PointerEventTypes } from \"@babylonjs/core/Events/pointerEvents.js\";\nimport { Observable } from \"@babylonjs/core/Misc/observable.js\";\nimport { Button3D } from \"./button3D.js\";\n/**\n * Class used to create a touchable button in 3D\n */\nexport class TouchButton3D extends Button3D {\n /**\n * Creates a new touchable button\n * @param name defines the control name\n * @param collisionMesh mesh to track collisions with\n */\n constructor(name, collisionMesh) {\n super(name);\n this._isNearPressed = false;\n this._interactionSurfaceHeight = 0;\n this._isToggleButton = false;\n this._toggleState = false;\n this._toggleButtonCallback = () => {\n this._onToggle(!this._toggleState);\n };\n /**\n * An event triggered when the button is toggled. Only fired if 'isToggleButton' is true\n */\n this.onToggleObservable = new Observable();\n this.collidableFrontDirection = Vector3.Zero();\n if (collisionMesh) {\n this.collisionMesh = collisionMesh;\n }\n }\n /**\n * Whether the current interaction is caused by near interaction or not\n */\n get isActiveNearInteraction() {\n return this._isNearPressed;\n }\n /**\n * Sets the front-facing direction of the button. Pass in Vector3.Zero to allow interactions from any direction\n * @param frontWorldDir the forward direction of the button\n */\n set collidableFrontDirection(frontWorldDir) {\n this._collidableFrontDirection = frontWorldDir.normalize();\n if (this._collisionMesh) {\n const invert = TmpVectors.Matrix[0];\n invert.copyFrom(this._collisionMesh.getWorldMatrix());\n invert.invert();\n Vector3.TransformNormalToRef(this._collidableFrontDirection, invert, this._collidableFrontDirection);\n this._collidableFrontDirection.normalize();\n }\n }\n /**\n * Returns the front-facing direction of the button, or Vector3.Zero if there is no 'front'\n */\n get collidableFrontDirection() {\n if (this._collisionMesh) {\n // Update the front direction to reflect any rotations of the collision mesh\n const transformedDirection = TmpVectors.Vector3[0];\n Vector3.TransformNormalToRef(this._collidableFrontDirection, this._collisionMesh.getWorldMatrix(), transformedDirection);\n return transformedDirection.normalize();\n }\n return this._collidableFrontDirection;\n }\n /**\n * Sets the mesh used for testing input collision\n * @param collisionMesh the new collision mesh for the button\n */\n set collisionMesh(collisionMesh) {\n var _a;\n // Remove the GUI3DManager's data from the previous collision mesh's reserved data store, and reset interactability\n if (this._collisionMesh) {\n this._collisionMesh.isNearPickable = false;\n if ((_a = this._collisionMesh.reservedDataStore) === null || _a === void 0 ? void 0 : _a.GUI3D) {\n this._collisionMesh.reservedDataStore.GUI3D = {};\n }\n this._collisionMesh.getChildMeshes().forEach((mesh) => {\n var _a;\n mesh.isNearPickable = false;\n if ((_a = mesh.reservedDataStore) === null || _a === void 0 ? void 0 : _a.GUI3D) {\n mesh.reservedDataStore.GUI3D = {};\n }\n });\n }\n this._collisionMesh = collisionMesh;\n this._injectGUI3DReservedDataStore(this._collisionMesh).control = this;\n this._collisionMesh.isNearPickable = true;\n this._collisionMesh.getChildMeshes().forEach((mesh) => {\n this._injectGUI3DReservedDataStore(mesh).control = this;\n mesh.isNearPickable = true;\n });\n this.collidableFrontDirection = collisionMesh.forward;\n }\n /**\n * Setter for if this TouchButton3D should be treated as a toggle button\n * @param value If this TouchHolographicButton should act like a toggle button\n */\n set isToggleButton(value) {\n if (value === this._isToggleButton) {\n return;\n }\n this._isToggleButton = value;\n if (value) {\n this.onPointerUpObservable.add(this._toggleButtonCallback);\n }\n else {\n this.onPointerUpObservable.removeCallback(this._toggleButtonCallback);\n // Safety check, reset the button if it's toggled on but no longer a toggle button\n if (this._toggleState) {\n this._onToggle(false);\n }\n }\n }\n get isToggleButton() {\n return this._isToggleButton;\n }\n /**\n * A public entrypoint to set the toggle state of the TouchHolographicButton. Only works if 'isToggleButton' is true\n * @param newState The new state to set the TouchHolographicButton's toggle state to\n */\n set isToggled(newState) {\n if (this._isToggleButton && this._toggleState !== newState) {\n this._onToggle(newState);\n }\n }\n get isToggled() {\n return this._toggleState;\n }\n _onToggle(newState) {\n this._toggleState = newState;\n this.onToggleObservable.notifyObservers(newState);\n }\n // Returns true if the collidable is in front of the button, or if the button has no front direction\n _isInteractionInFrontOfButton(collidablePos) {\n return this._getInteractionHeight(collidablePos, this._collisionMesh.getAbsolutePosition()) > 0;\n }\n /**\n * Get the height of the touchPoint from the collidable part of the button\n * @param touchPoint the point to compare to the button, in absolute position\n * @returns the depth of the touch point into the front of the button\n */\n getPressDepth(touchPoint) {\n if (!this._isNearPressed) {\n return 0;\n }\n const interactionHeight = this._getInteractionHeight(touchPoint, this._collisionMesh.getAbsolutePosition());\n return this._interactionSurfaceHeight - interactionHeight;\n }\n // Returns true if the collidable is in front of the button, or if the button has no front direction\n _getInteractionHeight(interactionPos, basePos) {\n const frontDir = this.collidableFrontDirection;\n if (frontDir.length() === 0) {\n // The button has no front, just return the distance to the base\n return Vector3.Distance(interactionPos, basePos);\n }\n const d = Vector3.Dot(basePos, frontDir);\n const abc = Vector3.Dot(interactionPos, frontDir);\n return abc - d;\n }\n /**\n * @internal\n */\n _generatePointerEventType(providedType, nearMeshPosition, activeInteractionCount) {\n if (providedType === PointerEventTypes.POINTERDOWN || providedType === PointerEventTypes.POINTERMOVE) {\n if (!this._isInteractionInFrontOfButton(nearMeshPosition)) {\n // Near interaction mesh is behind the button, don't send a pointer down\n return PointerEventTypes.POINTERMOVE;\n }\n else {\n this._isNearPressed = true;\n this._interactionSurfaceHeight = this._getInteractionHeight(nearMeshPosition, this._collisionMesh.getAbsolutePosition());\n }\n }\n if (providedType === PointerEventTypes.POINTERUP) {\n if (activeInteractionCount == 0) {\n // We get the release for the down we swallowed earlier, swallow as well\n return PointerEventTypes.POINTERMOVE;\n }\n else {\n this._isNearPressed = false;\n }\n }\n return providedType;\n }\n _getTypeName() {\n return \"TouchButton3D\";\n }\n // Mesh association\n _createNode(scene) {\n return super._createNode(scene);\n }\n /**\n * Releases all associated resources\n */\n dispose() {\n super.dispose();\n // Clean up toggle observables\n this.onPointerUpObservable.removeCallback(this._toggleButtonCallback);\n this.onToggleObservable.clear();\n if (this._collisionMesh) {\n this._collisionMesh.dispose();\n }\n }\n}\n//# sourceMappingURL=touchButton3D.js.map","import { Vector3 } from \"@babylonjs/core/Maths/math.vector.js\";\nimport { StandardMaterial } from \"@babylonjs/core/Materials/standardMaterial.js\";\nimport { TransformNode } from \"@babylonjs/core/Meshes/transformNode.js\";\nimport { Mesh } from \"@babylonjs/core/Meshes/mesh.js\";\nimport { CreatePlane } from \"@babylonjs/core/Meshes/Builders/planeBuilder.js\";\nimport { CreateBox } from \"@babylonjs/core/Meshes/Builders/boxBuilder.js\";\nimport { FadeInOutBehavior } from \"@babylonjs/core/Behaviors/Meshes/fadeInOutBehavior.js\";\nimport { FluentMaterial } from \"../materials/fluent/fluentMaterial.js\";\nimport { FluentButtonMaterial } from \"../materials/fluentButton/fluentButtonMaterial.js\";\nimport { StackPanel } from \"../../2D/controls/stackPanel.js\";\nimport { Image } from \"../../2D/controls/image.js\";\nimport { TextBlock } from \"../../2D/controls/textBlock.js\";\nimport { AdvancedDynamicTexture } from \"../../2D/advancedDynamicTexture.js\";\nimport { Color3 } from \"@babylonjs/core/Maths/math.color.js\";\nimport { TouchButton3D } from \"./touchButton3D.js\";\nimport { SceneLoader } from \"@babylonjs/core/Loading/sceneLoader.js\";\nimport { IsDocumentAvailable } from \"@babylonjs/core/Misc/domManagement.js\";\nimport { Scalar } from \"@babylonjs/core/Maths/math.scalar.js\";\n/**\n * Class used to create a holographic button in 3D\n * @since 5.0.0\n */\nexport class TouchHolographicButton extends TouchButton3D {\n _disposeTooltip() {\n this._tooltipFade = null;\n if (this._tooltipTextBlock) {\n this._tooltipTextBlock.dispose();\n }\n if (this._tooltipTexture) {\n this._tooltipTexture.dispose();\n }\n if (this._tooltipMesh) {\n this._tooltipMesh.dispose();\n }\n this.onPointerEnterObservable.remove(this._tooltipHoverObserver);\n this.onPointerOutObservable.remove(this._tooltipOutObserver);\n }\n /**\n * Rendering ground id of all the mesh in the button\n */\n set renderingGroupId(id) {\n this._backPlate.renderingGroupId = id;\n this._textPlate.renderingGroupId = id;\n this._frontPlate.renderingGroupId = id;\n if (this._tooltipMesh) {\n this._tooltipMesh.renderingGroupId = id;\n }\n }\n get renderingGroupId() {\n return this._backPlate.renderingGroupId;\n }\n /**\n * Gets the mesh used to render this control\n */\n get mesh() {\n return this._backPlate;\n }\n /**\n * Text to be displayed on the tooltip shown when hovering on the button. When set to null tooltip is disabled. (Default: null)\n */\n set tooltipText(text) {\n if (!text) {\n this._disposeTooltip();\n return;\n }\n if (!this._tooltipFade) {\n const rightHandedScene = this._backPlate._scene.useRightHandedSystem;\n // Create tooltip with mesh and text\n this._tooltipMesh = CreatePlane(\"\", { size: 1 }, this._backPlate._scene);\n const tooltipBackground = CreatePlane(\"\", { size: 1, sideOrientation: Mesh.DOUBLESIDE }, this._backPlate._scene);\n const mat = new StandardMaterial(\"\", this._backPlate._scene);\n mat.diffuseColor = Color3.FromHexString(\"#212121\");\n tooltipBackground.material = mat;\n tooltipBackground.isPickable = false;\n this._tooltipMesh.addChild(tooltipBackground);\n tooltipBackground.position = Vector3.Forward(rightHandedScene).scale(0.05);\n this._tooltipMesh.scaling.y = 1 / 3;\n this._tooltipMesh.position = Vector3.Up().scale(0.7).add(Vector3.Forward(rightHandedScene).scale(-0.15));\n this._tooltipMesh.isPickable = false;\n this._tooltipMesh.parent = this._backPlate;\n // Create text texture for the tooltip\n this._tooltipTexture = AdvancedDynamicTexture.CreateForMesh(this._tooltipMesh);\n this._tooltipTextBlock = new TextBlock();\n this._tooltipTextBlock.scaleY = 3;\n this._tooltipTextBlock.color = \"white\";\n this._tooltipTextBlock.fontSize = 130;\n this._tooltipTexture.addControl(this._tooltipTextBlock);\n // Add hover action to tooltip\n this._tooltipFade = new FadeInOutBehavior();\n this._tooltipFade.delay = 500;\n this._tooltipMesh.addBehavior(this._tooltipFade);\n this._tooltipHoverObserver = this.onPointerEnterObservable.add(() => {\n if (this._tooltipFade) {\n this._tooltipFade.fadeIn(true);\n }\n });\n this._tooltipOutObserver = this.onPointerOutObservable.add(() => {\n if (this._tooltipFade) {\n this._tooltipFade.fadeIn(false);\n }\n });\n }\n if (this._tooltipTextBlock) {\n this._tooltipTextBlock.text = text;\n }\n }\n get tooltipText() {\n if (this._tooltipTextBlock) {\n return this._tooltipTextBlock.text;\n }\n return null;\n }\n /**\n * Gets or sets text for the button\n */\n get text() {\n return this._text;\n }\n set text(value) {\n if (this._text === value) {\n return;\n }\n this._text = value;\n this._rebuildContent();\n }\n /**\n * Gets or sets the image url for the button\n */\n get imageUrl() {\n return this._imageUrl;\n }\n set imageUrl(value) {\n if (this._imageUrl === value) {\n return;\n }\n this._imageUrl = value;\n this._rebuildContent();\n }\n /**\n * Gets the back material used by this button\n */\n get backMaterial() {\n return this._backMaterial;\n }\n /**\n * Gets the front material used by this button\n */\n get frontMaterial() {\n return this._frontMaterial;\n }\n /**\n * Gets the plate material used by this button\n */\n get plateMaterial() {\n return this._plateMaterial;\n }\n /**\n * Gets a boolean indicating if this button shares its material with other HolographicButtons\n */\n get shareMaterials() {\n return this._shareMaterials;\n }\n /**\n * Sets whether the backplate is visible or hidden. Hiding the backplate is not recommended without some sort of replacement\n */\n set isBackplateVisible(isVisible) {\n if (this.mesh && !!this._backMaterial) {\n if (isVisible && !this._isBackplateVisible) {\n this._backPlate.visibility = 1;\n }\n else if (!isVisible && this._isBackplateVisible) {\n this._backPlate.visibility = 0;\n }\n }\n this._isBackplateVisible = isVisible;\n }\n /**\n * Creates a new button\n * @param name defines the control name\n * @param shareMaterials\n */\n constructor(name, shareMaterials = true) {\n super(name);\n this._shareMaterials = true;\n this._isBackplateVisible = true;\n this._frontPlateDepth = 0.5;\n this._backPlateDepth = 0.04;\n this._backplateColor = new Color3(0.08, 0.15, 0.55);\n this._backplateToggledColor = new Color3(0.25, 0.4, 0.95);\n this._shareMaterials = shareMaterials;\n this.pointerEnterAnimation = () => {\n this._frontMaterial.leftBlobEnable = true;\n this._frontMaterial.rightBlobEnable = true;\n };\n this.pointerOutAnimation = () => {\n this._frontMaterial.leftBlobEnable = false;\n this._frontMaterial.rightBlobEnable = false;\n };\n this.pointerDownAnimation = () => {\n if (this._frontPlate && !this.isActiveNearInteraction) {\n this._frontPlate.scaling.z = this._frontPlateDepth * 0.2;\n this._frontPlate.position = Vector3.Forward(this._frontPlate._scene.useRightHandedSystem).scale((this._frontPlateDepth - 0.2 * this._frontPlateDepth) / 2);\n this._textPlate.position = Vector3.Forward(this._textPlate._scene.useRightHandedSystem).scale(-(this._backPlateDepth + 0.2 * this._frontPlateDepth) / 2);\n }\n };\n this.pointerUpAnimation = () => {\n if (this._frontPlate) {\n this._frontPlate.scaling.z = this._frontPlateDepth;\n this._frontPlate.position = Vector3.Forward(this._frontPlate._scene.useRightHandedSystem).scale((this._frontPlateDepth - this._frontPlateDepth) / 2);\n this._textPlate.position = Vector3.Forward(this._textPlate._scene.useRightHandedSystem).scale(-(this._backPlateDepth + this._frontPlateDepth) / 2);\n }\n };\n this.onPointerMoveObservable.add((position) => {\n if (this._frontPlate && this.isActiveNearInteraction) {\n const scale = Vector3.Zero();\n if (this._backPlate.getWorldMatrix().decompose(scale, undefined, undefined)) {\n let interactionHeight = this._getInteractionHeight(position, this._backPlate.getAbsolutePosition()) / scale.z;\n interactionHeight = Scalar.Clamp(interactionHeight - this._backPlateDepth / 2, 0.2 * this._frontPlateDepth, this._frontPlateDepth);\n this._frontPlate.scaling.z = interactionHeight;\n this._frontPlate.position = Vector3.Forward(this._frontPlate._scene.useRightHandedSystem).scale((this._frontPlateDepth - interactionHeight) / 2);\n this._textPlate.position = Vector3.Forward(this._textPlate._scene.useRightHandedSystem).scale(-(this._backPlateDepth + interactionHeight) / 2);\n }\n }\n });\n this._pointerHoverObserver = this.onPointerMoveObservable.add((hoverPosition) => {\n this._frontMaterial.globalLeftIndexTipPosition = hoverPosition;\n });\n }\n _getTypeName() {\n return \"TouchHolographicButton\";\n }\n _rebuildContent() {\n this._disposeFacadeTexture();\n const panel = new StackPanel();\n panel.isVertical = true;\n if (IsDocumentAvailable() && !!document.createElement) {\n if (this._imageUrl) {\n const image = new Image();\n image.source = this._imageUrl;\n image.paddingTop = \"40px\";\n image.height = \"180px\";\n image.width = \"100px\";\n image.paddingBottom = \"40px\";\n panel.addControl(image);\n }\n }\n if (this._text) {\n const text = new TextBlock();\n text.text = this._text;\n text.color = \"white\";\n text.height = \"30px\";\n text.fontSize = 24;\n panel.addControl(text);\n }\n this.content = panel;\n }\n // Mesh association\n _createNode(scene) {\n var _a;\n this.name = (_a = this.name) !== null && _a !== void 0 ? _a : \"TouchHolographicButton\";\n const collisionMesh = CreateBox(`${this.name}_collisionMesh`, {\n width: 1.0,\n height: 1.0,\n depth: this._frontPlateDepth,\n }, scene);\n collisionMesh.isPickable = true;\n collisionMesh.isNearPickable = true;\n collisionMesh.visibility = 0;\n collisionMesh.position = Vector3.Forward(scene.useRightHandedSystem).scale(-this._frontPlateDepth / 2);\n SceneLoader.ImportMeshAsync(undefined, TouchHolographicButton.MODEL_BASE_URL, TouchHolographicButton.MODEL_FILENAME, scene).then((result) => {\n const alphaMesh = CreateBox(\"${this.name}_alphaMesh\", {\n width: 1.0,\n height: 1.0,\n depth: 1.0,\n }, scene);\n alphaMesh.isPickable = false;\n alphaMesh.material = new StandardMaterial(\"${this.name}_alphaMesh_material\", scene);\n alphaMesh.material.alpha = 0.15;\n const importedFrontPlate = result.meshes[1];\n importedFrontPlate.name = `${this.name}_frontPlate`;\n importedFrontPlate.isPickable = false;\n importedFrontPlate.scaling.z = this._frontPlateDepth;\n alphaMesh.parent = importedFrontPlate;\n importedFrontPlate.parent = collisionMesh;\n if (this._frontMaterial) {\n importedFrontPlate.material = this._frontMaterial;\n }\n this._frontPlate = importedFrontPlate;\n });\n this._backPlate = CreateBox(`${this.name}_backPlate`, {\n width: 1.0,\n height: 1.0,\n depth: this._backPlateDepth,\n }, scene);\n this._backPlate.position = Vector3.Forward(scene.useRightHandedSystem).scale(this._backPlateDepth / 2);\n this._backPlate.isPickable = false;\n this._textPlate = super._createNode(scene);\n this._textPlate.name = `${this.name}_textPlate`;\n this._textPlate.isPickable = false;\n this._textPlate.position = Vector3.Forward(scene.useRightHandedSystem).scale(-this._frontPlateDepth / 2);\n this._backPlate.addChild(collisionMesh);\n this._backPlate.addChild(this._textPlate);\n const tn = new TransformNode(`{this.name}_root`, scene);\n this._backPlate.setParent(tn);\n this.collisionMesh = collisionMesh;\n this.collidableFrontDirection = this._backPlate.forward.negate(); // Mesh is facing the wrong way\n return tn;\n }\n _applyFacade(facadeTexture) {\n this._plateMaterial.emissiveTexture = facadeTexture;\n this._plateMaterial.opacityTexture = facadeTexture;\n this._plateMaterial.diffuseColor = new Color3(0.4, 0.4, 0.4);\n }\n _createBackMaterial(mesh) {\n this._backMaterial = new FluentMaterial(this.name + \"backPlateMaterial\", mesh.getScene());\n this._backMaterial.albedoColor = this._backplateColor;\n this._backMaterial.renderBorders = true;\n this._backMaterial.renderHoverLight = false;\n }\n _createFrontMaterial(mesh) {\n this._frontMaterial = new FluentButtonMaterial(this.name + \"Front Material\", mesh.getScene());\n }\n _createPlateMaterial(mesh) {\n this._plateMaterial = new StandardMaterial(this.name + \"Plate Material\", mesh.getScene());\n this._plateMaterial.specularColor = Color3.Black();\n }\n _onToggle(newState) {\n if (this._backMaterial) {\n if (newState) {\n this._backMaterial.albedoColor = this._backplateToggledColor;\n }\n else {\n this._backMaterial.albedoColor = this._backplateColor;\n }\n }\n super._onToggle(newState);\n }\n _affectMaterial(mesh) {\n if (this._shareMaterials) {\n // Back\n if (!this._host._touchSharedMaterials[\"backFluentMaterial\"]) {\n this._createBackMaterial(mesh);\n this._host._touchSharedMaterials[\"backFluentMaterial\"] = this._backMaterial;\n }\n else {\n this._backMaterial = this._host._touchSharedMaterials[\"backFluentMaterial\"];\n }\n // Front\n if (!this._host._touchSharedMaterials[\"frontFluentMaterial\"]) {\n this._createFrontMaterial(mesh);\n this._host._touchSharedMaterials[\"frontFluentMaterial\"] = this._frontMaterial;\n }\n else {\n this._frontMaterial = this._host._touchSharedMaterials[\"frontFluentMaterial\"];\n }\n }\n else {\n this._createBackMaterial(mesh);\n this._createFrontMaterial(mesh);\n }\n this._createPlateMaterial(mesh);\n this._backPlate.material = this._backMaterial;\n this._textPlate.material = this._plateMaterial;\n if (!this._isBackplateVisible) {\n this._backPlate.visibility = 0;\n }\n if (this._frontPlate) {\n this._frontPlate.material = this._frontMaterial;\n }\n this._rebuildContent();\n }\n /**\n * Releases all associated resources\n */\n dispose() {\n super.dispose(); // will dispose main mesh ie. back plate\n this._disposeTooltip();\n this.onPointerMoveObservable.remove(this._pointerHoverObserver);\n if (!this.shareMaterials) {\n this._backMaterial.dispose();\n this._frontMaterial.dispose();\n this._plateMaterial.dispose();\n if (this._pickedPointObserver) {\n this._host.onPickedPointChangedObservable.remove(this._pickedPointObserver);\n this._pickedPointObserver = null;\n }\n }\n }\n}\n/**\n * Base Url for the button model.\n */\nTouchHolographicButton.MODEL_BASE_URL = \"https://assets.babylonjs.com/meshes/MRTK/\";\n/**\n * File name for the button model.\n */\nTouchHolographicButton.MODEL_FILENAME = \"mrtk-fluent-button.glb\";\n//# sourceMappingURL=touchHolographicButton.js.map","import { FollowBehavior } from \"@babylonjs/core/Behaviors/Meshes/followBehavior.js\";\nimport { SixDofDragBehavior } from \"@babylonjs/core/Behaviors/Meshes/sixDofDragBehavior.js\";\nimport { SurfaceMagnetismBehavior } from \"@babylonjs/core/Behaviors/Meshes/surfaceMagnetismBehavior.js\";\n/**\n * Default behavior for 3D UI elements.\n * Handles a FollowBehavior, SixDofBehavior and SurfaceMagnetismBehavior\n * @since 5.0.0\n */\nexport class DefaultBehavior {\n /**\n * Instantiates the default behavior\n */\n constructor() {\n /**\n * Enables the follow behavior\n */\n this.followBehaviorEnabled = false;\n /**\n * Enables the six DoF drag behavior\n */\n this.sixDofDragBehaviorEnabled = true;\n /**\n * Enables the surface magnetism behavior\n */\n this.surfaceMagnetismBehaviorEnabled = true;\n this._followBehavior = new FollowBehavior();\n this._sixDofDragBehavior = new SixDofDragBehavior();\n this._surfaceMagnetismBehavior = new SurfaceMagnetismBehavior();\n }\n /**\n * The name of the behavior\n */\n get name() {\n return \"Default\";\n }\n /**\n * The follow behavior\n */\n get followBehavior() {\n return this._followBehavior;\n }\n /**\n * The six DoF drag behavior\n */\n get sixDofDragBehavior() {\n return this._sixDofDragBehavior;\n }\n /**\n * The surface magnetism behavior\n */\n get surfaceMagnetismBehavior() {\n return this._surfaceMagnetismBehavior;\n }\n /**\n * Initializes the behavior\n */\n init() { }\n /**\n * Attaches the default behavior\n * @param ownerMesh The top level mesh\n * @param draggablesMeshes Descendant meshes that can be used for dragging the owner mesh\n * @param sceneUnderstandingMeshes Meshes from the scene understanding that will be used for surface magnetism\n */\n attach(ownerMesh, draggablesMeshes, sceneUnderstandingMeshes) {\n this._scene = ownerMesh.getScene();\n this.attachedNode = ownerMesh;\n this._addObservables();\n // Since our observables are bound before the child behaviors', ours are called first\n this._followBehavior.attach(ownerMesh);\n this._sixDofDragBehavior.attach(ownerMesh);\n this._sixDofDragBehavior.draggableMeshes = draggablesMeshes || null;\n this._sixDofDragBehavior.faceCameraOnDragStart = true;\n this._surfaceMagnetismBehavior.attach(ownerMesh, this._scene);\n if (sceneUnderstandingMeshes) {\n this._surfaceMagnetismBehavior.meshes = sceneUnderstandingMeshes;\n }\n // We disable this behavior because we will handle pose changing event manually with sixDofDragBehavior\n this._surfaceMagnetismBehavior.enabled = false;\n }\n /**\n * Detaches the behavior from the mesh\n */\n detach() {\n this.attachedNode = null;\n this._removeObservables();\n this._followBehavior.detach();\n this._sixDofDragBehavior.detach();\n this._surfaceMagnetismBehavior.detach();\n }\n _addObservables() {\n this._onBeforeRenderObserver = this._scene.onBeforeRenderObservable.add(() => {\n this._followBehavior._enabled = !this._sixDofDragBehavior.isMoving && this.followBehaviorEnabled;\n });\n this._onDragObserver = this._sixDofDragBehavior.onDragObservable.add((event) => {\n this._sixDofDragBehavior.disableMovement = this._surfaceMagnetismBehavior.findAndUpdateTarget(event.pickInfo);\n });\n }\n _removeObservables() {\n this._scene.onBeforeRenderObservable.remove(this._onBeforeRenderObserver);\n this._sixDofDragBehavior.onDragObservable.remove(this._onDragObserver);\n }\n}\n//# sourceMappingURL=defaultBehavior.js.map","// Do not edit.\nimport { ShaderStore } from \"@babylonjs/core/Engines/shaderStore.js\";\nconst name = \"handleVertexShader\";\nconst shader = `precision highp float;attribute vec3 position;uniform vec3 positionOffset;uniform mat4 worldViewProjection;uniform float scale;void main(void) {vec4 vPos=vec4((vec3(position)+positionOffset)*scale,1.0);gl_Position=worldViewProjection*vPos;}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const handleVertexShader = { name, shader };\n//# sourceMappingURL=handle.vertex.js.map","// Do not edit.\nimport { ShaderStore } from \"@babylonjs/core/Engines/shaderStore.js\";\nconst name = \"handlePixelShader\";\nconst shader = `uniform vec3 color;void main(void) {gl_FragColor=vec4(color,1.0);}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const handlePixelShader = { name, shader };\n//# sourceMappingURL=handle.fragment.js.map","import { ShaderMaterial } from \"@babylonjs/core/Materials/shaderMaterial.js\";\nimport { Color3, TmpColors } from \"@babylonjs/core/Maths/math.color.js\";\nimport { Vector3 } from \"@babylonjs/core/Maths/math.vector.js\";\nimport \"./shaders/handle.vertex.js\";\nimport \"./shaders/handle.fragment.js\";\n/**\n * Class used to render gizmo handles with fluent design\n */\nexport class HandleMaterial extends ShaderMaterial {\n /**\n * Is the material indicating hovering state\n */\n get hover() {\n return this._hover;\n }\n set hover(b) {\n this._hover = b;\n this._updateInterpolationTarget();\n }\n /**\n * Is the material indicating drag state\n */\n get drag() {\n return this._drag;\n }\n set drag(b) {\n this._drag = b;\n this._updateInterpolationTarget();\n }\n /**\n * Creates a handle material\n * @param name Name of the material\n * @param scene Scene\n */\n constructor(name, scene) {\n super(name, scene, \"handle\", {\n attributes: [\"position\"],\n uniforms: [\"worldViewProjection\", \"color\", \"scale\", \"positionOffset\"],\n needAlphaBlending: false,\n needAlphaTesting: false,\n });\n this._hover = false;\n this._drag = false;\n this._color = new Color3();\n this._scale = 1;\n this._lastTick = -1;\n /**\n * Length of animation\n */\n this.animationLength = 100;\n /**\n * Color of the handle when hovered\n */\n this.hoverColor = new Color3(0, 0.467, 0.84);\n /**\n * Color of the handle when idle\n */\n this.baseColor = new Color3(1, 1, 1);\n /**\n * Scale of the handle when hovered\n */\n this.hoverScale = 0.75;\n /**\n * Scale of the handle when idle\n */\n this.baseScale = 0.35;\n /**\n * Scale of the handle when dragged\n */\n this.dragScale = 0.55;\n /**\n * @internal\n */\n this._positionOffset = Vector3.Zero();\n this._updateInterpolationTarget();\n // Register callback for scene after render\n this._lastTick = Date.now();\n this._onBeforeRender = this.getScene().onBeforeRenderObservable.add(() => {\n const tick = Date.now();\n const delta = tick - this._lastTick;\n const scaleDiff = this._targetScale - this._scale;\n const colorDiff = TmpColors.Color3[0].copyFrom(this._targetColor).subtractToRef(this._color, TmpColors.Color3[0]);\n this._scale = this._scale + (scaleDiff * delta) / this.animationLength;\n colorDiff.scaleToRef(delta / this.animationLength, colorDiff);\n this._color.addToRef(colorDiff, this._color);\n this.setColor3(\"color\", this._color);\n this.setFloat(\"scale\", this._scale);\n this.setVector3(\"positionOffset\", this._positionOffset);\n this._lastTick = tick;\n });\n }\n _updateInterpolationTarget() {\n if (this.drag) {\n this._targetColor = this.hoverColor;\n this._targetScale = this.dragScale;\n }\n else if (this.hover) {\n this._targetColor = this.hoverColor;\n this._targetScale = this.hoverScale;\n }\n else {\n this._targetColor = this.baseColor;\n this._targetScale = this.baseScale;\n }\n }\n /**\n * Disposes the handle material\n */\n dispose() {\n super.dispose();\n this.getScene().onBeforeRenderObservable.remove(this._onBeforeRender);\n }\n}\n//# sourceMappingURL=handleMaterial.js.map","import { CreateBox } from \"@babylonjs/core/Meshes/Builders/boxBuilder.js\";\nimport { TransformNode } from \"@babylonjs/core/Meshes/transformNode.js\";\nimport { Vector3 } from \"@babylonjs/core/Maths/math.vector.js\";\nimport { HandleMaterial } from \"../materials/handle/handleMaterial.js\";\nimport { BaseSixDofDragBehavior } from \"@babylonjs/core/Behaviors/Meshes/baseSixDofDragBehavior.js\";\n/**\n * State of the handle regarding user interaction\n */\nexport var HandleState;\n(function (HandleState) {\n /**\n * Handle is idle\n */\n HandleState[HandleState[\"IDLE\"] = 0] = \"IDLE\";\n /**\n * Handle is hovered\n */\n HandleState[HandleState[\"HOVER\"] = 1] = \"HOVER\";\n /**\n * Handle is dragged\n */\n HandleState[HandleState[\"DRAG\"] = 2] = \"DRAG\";\n})(HandleState || (HandleState = {}));\n/**\n * Base class for SlateGizmo handles\n */\nexport class GizmoHandle {\n /**\n * The current state of the handle\n */\n get state() {\n return this._state;\n }\n /**\n * Returns the gizmo carrying this handle\n */\n get gizmo() {\n return this._gizmo;\n }\n /**\n * Sets hover state\n */\n set hover(value) {\n if (value) {\n this._state |= HandleState.HOVER;\n }\n else {\n this._state &= ~HandleState.HOVER;\n }\n this._updateMaterial();\n }\n /**\n * Sets drag state\n */\n set drag(value) {\n if (value) {\n this._state |= HandleState.DRAG;\n }\n else {\n this._state &= ~HandleState.DRAG;\n }\n this._updateMaterial();\n }\n /**\n * Creates a handle for a SlateGizmo\n * @param gizmo associated SlateGizmo\n * @param scene scene\n */\n constructor(gizmo, scene) {\n this._state = HandleState.IDLE;\n this._materials = [];\n this._scene = scene;\n this._gizmo = gizmo;\n this.node = this.createNode();\n this.node.reservedDataStore = {\n handle: this,\n };\n }\n _createMaterial(positionOffset) {\n const mat = new HandleMaterial(\"handle\", this._scene);\n if (positionOffset) {\n mat._positionOffset = positionOffset;\n }\n return mat;\n }\n _updateMaterial() {\n const state = this._state;\n for (const mat of this._materials) {\n mat.hover = false;\n mat.drag = false;\n }\n if (state & HandleState.DRAG) {\n for (const mat of this._materials) {\n mat.drag = true;\n }\n }\n else if (state & HandleState.HOVER) {\n for (const mat of this._materials) {\n mat.hover = true;\n }\n }\n }\n /**\n * Binds callbacks from dragging interaction\n * @param dragStartFn Function to call on drag start\n * @param dragFn Function to call on drag\n * @param dragEndFn Function to call on drag end\n */\n setDragBehavior(dragStartFn, dragFn, dragEndFn) {\n const dragBehavior = new BaseSixDofDragBehavior();\n this._dragBehavior = dragBehavior;\n this._dragStartObserver = dragBehavior.onDragStartObservable.add(dragStartFn);\n this._draggingObserver = dragBehavior.onDragObservable.add(dragFn);\n this._dragEndObserver = dragBehavior.onDragEndObservable.add(dragEndFn);\n this._dragBehavior.attach(this.node);\n }\n /**\n * Disposes the handle\n */\n dispose() {\n this._dragBehavior.onDragStartObservable.remove(this._dragStartObserver);\n this._dragBehavior.onDragObservable.remove(this._draggingObserver);\n this._dragBehavior.onDragEndObservable.remove(this._dragEndObserver);\n this._dragBehavior.detach();\n for (const material of this._materials) {\n material.dispose();\n }\n this.node.dispose();\n }\n}\n/**\n * Side handle class that rotates the slate\n */\nexport class SideHandle extends GizmoHandle {\n /**\n * Creates the meshes and parent node of the handle\n * @returns created node\n */\n createNode() {\n // Create a simple vertical rectangle\n const verticalBox = CreateBox(\"sideVert\", { width: 1, height: 10, depth: 0.1 }, this._scene);\n const sideNode = new TransformNode(\"side\", this._scene);\n verticalBox.parent = sideNode;\n const mat = this._createMaterial();\n verticalBox.material = mat;\n verticalBox.isNearGrabbable = true;\n this._materials.push(mat);\n return sideNode;\n }\n}\n/**\n * Corner handle that resizes the slate\n */\nexport class CornerHandle extends GizmoHandle {\n /**\n * Creates the meshes and parent node of the handle\n * @returns created node\n */\n createNode() {\n // Create 2 boxes making a bottom left corner\n const horizontalBox = CreateBox(\"angleHor\", { width: 3, height: 1, depth: 0.1 }, this._scene);\n const verticalBox = CreateBox(\"angleVert\", { width: 1, height: 3, depth: 0.1 }, this._scene);\n const angleNode = new TransformNode(\"angle\", this._scene);\n horizontalBox.parent = angleNode;\n verticalBox.parent = angleNode;\n horizontalBox.material = this._createMaterial(new Vector3(1, 0, 0));\n verticalBox.material = this._createMaterial(new Vector3(0, 1, 0));\n verticalBox.isNearGrabbable = true;\n horizontalBox.isNearGrabbable = true;\n this._materials.push(horizontalBox.material);\n this._materials.push(verticalBox.material);\n return angleNode;\n }\n}\n//# sourceMappingURL=gizmoHandle.js.map","import { Gizmo } from \"@babylonjs/core/Gizmos/gizmo.js\";\nimport { Epsilon } from \"@babylonjs/core/Maths/math.constants.js\";\nimport { Matrix, Quaternion, TmpVectors, Vector3 } from \"@babylonjs/core/Maths/math.vector.js\";\nimport { TransformNode } from \"@babylonjs/core/Meshes/transformNode.js\";\nimport { PivotTools } from \"@babylonjs/core/Misc/pivotTools.js\";\nimport { CornerHandle, SideHandle } from \"./gizmoHandle.js\";\n/**\n * Gizmo to resize 2D slates\n */\nexport class SlateGizmo extends Gizmo {\n /**\n * The slate attached to this gizmo\n */\n set attachedSlate(control) {\n if (control) {\n this.attachedMesh = control.mesh;\n this.updateBoundingBox();\n this._pickedPointObserver = control._host.onPickingObservable.add((pickedMesh) => {\n if (this._handleHovered && (!pickedMesh || pickedMesh.parent !== this._handleHovered.node)) {\n this._handleHovered.hover = false;\n this._handleHovered = null;\n }\n if (pickedMesh && pickedMesh.parent && pickedMesh.parent.reservedDataStore && pickedMesh.parent.reservedDataStore.handle) {\n const handle = pickedMesh.parent.reservedDataStore.handle;\n if (handle.gizmo === this) {\n this._handleHovered = handle;\n this._handleHovered.hover = true;\n }\n }\n });\n }\n else if (this._attachedSlate) {\n this._attachedSlate._host.onPickingObservable.remove(this._pickedPointObserver);\n }\n this._attachedSlate = control;\n }\n get attachedSlate() {\n return this._attachedSlate;\n }\n constructor(utilityLayer) {\n super(utilityLayer);\n this._boundingDimensions = new Vector3(0, 0, 0);\n this._renderObserver = null;\n this._tmpQuaternion = new Quaternion();\n this._tmpVector = new Vector3(0, 0, 0);\n // Ordered bl, br, tr, tl\n this._corners = [];\n // Ordered left, bottom, right, top\n this._sides = [];\n this._boundingBoxGizmo = {\n min: new Vector3(),\n max: new Vector3(),\n };\n /**\n * Value we use to offset handles from mesh\n */\n this._margin = 0.35;\n this._handleSize = 0.075;\n this._attachedSlate = null;\n this._existingSlateScale = new Vector3();\n /**\n * If set, the handles will increase in size based on the distance away from the camera to have a consistent screen size (Default: true)\n */\n this.fixedScreenSize = false;\n /**\n * The distance away from the object which the draggable meshes should appear world sized when fixedScreenSize is set to true (default: 10)\n */\n this.fixedScreenSizeDistanceFactor = 10;\n this._createNode();\n this.updateScale = false;\n this._renderObserver = this.gizmoLayer.originalScene.onBeforeRenderObservable.add(() => {\n // Only update the bounding box if scaling has changed\n if (this.attachedMesh && !this._existingSlateScale.equals(this.attachedMesh.scaling)) {\n this.updateBoundingBox();\n }\n });\n }\n _createNode() {\n this._handlesParent = new TransformNode(\"handlesParent\", this.gizmoLayer.utilityLayerScene);\n this._handlesParent.rotationQuaternion = Quaternion.Identity();\n const masksCorners = [\n {\n dimensions: new Vector3(-1, -1, 0),\n origin: new Vector3(1, 0, 0),\n },\n {\n dimensions: new Vector3(1, -1, 0),\n origin: new Vector3(0, 0, 0),\n },\n {\n dimensions: new Vector3(1, 1, 0),\n origin: new Vector3(0, 1, 0),\n },\n {\n dimensions: new Vector3(-1, 1, 0),\n origin: new Vector3(1, 1, 0),\n },\n ];\n for (let i = 0; i < 4; i++) {\n const corner = new CornerHandle(this, this.gizmoLayer.utilityLayerScene);\n this._corners.push(corner);\n corner.node.rotation.z = (Math.PI / 2) * i;\n corner.node.parent = this._handlesParent;\n this._assignDragBehaviorCorners(corner, (originStart, dimensionsStart, offset, masks) => this._moveHandle(originStart, dimensionsStart, offset, masks, true), masksCorners[i]);\n }\n for (let i = 0; i < 4; i++) {\n const side = new SideHandle(this, this.gizmoLayer.utilityLayerScene);\n this._sides.push(side);\n side.node.rotation.z = (Math.PI / 2) * i;\n side.node.parent = this._handlesParent;\n this._assignDragBehaviorSides(side, i % 2 === 0 ? new Vector3(0, 1, 0) : new Vector3(1, 0, 0));\n }\n this._handlesParent.parent = this._rootMesh;\n }\n _keepAspectRatio(vector, aspectRatio, invertDiagonal = false) {\n const axis = TmpVectors.Vector3[0];\n axis.copyFromFloats(aspectRatio, 1, 0).normalize();\n if (invertDiagonal) {\n axis.y *= -1;\n }\n const dot = Vector3.Dot(vector, axis);\n vector.copyFrom(axis).scaleInPlace(dot);\n }\n _clampDimensions(vector, dimensions, mask, keepAspectRatio = false) {\n const impact = TmpVectors.Vector3[0];\n impact.copyFrom(vector).multiplyInPlace(mask);\n const clampedDimensions = TmpVectors.Vector3[1];\n clampedDimensions.copyFromFloats(Math.max(this._attachedSlate.minDimensions.x, impact.x + dimensions.x), Math.max(this._attachedSlate.minDimensions.y, impact.y + dimensions.y), 0);\n if (keepAspectRatio) {\n // Extra logic to ensure the ratio is maintained when the vector has been clamped\n const ratio = dimensions.x / dimensions.y;\n clampedDimensions.x = Math.max(clampedDimensions.x, clampedDimensions.y * ratio);\n clampedDimensions.y = Math.max(clampedDimensions.y, clampedDimensions.x / ratio);\n }\n // Calculating the real impact of vector on clamped dimensions\n impact.copyFrom(clampedDimensions).subtractInPlace(dimensions);\n vector.x = Math.sign(vector.x) * Math.abs(impact.x);\n vector.y = Math.sign(vector.y) * Math.abs(impact.y);\n }\n _moveHandle(originStart, dimensionsStart, offset, masks, isCorner) {\n if (!this._attachedSlate) {\n return;\n }\n if (isCorner) {\n const aspectRatio = dimensionsStart.x / dimensionsStart.y;\n this._keepAspectRatio(offset, aspectRatio, masks.dimensions.x * masks.dimensions.y < 0);\n }\n this._clampDimensions(offset, dimensionsStart, masks.dimensions, isCorner);\n const offsetOriginMasked = TmpVectors.Vector3[0];\n const offsetDimensionsMasked = TmpVectors.Vector3[1];\n offsetOriginMasked.copyFrom(offset).multiplyInPlace(masks.origin);\n offsetDimensionsMasked.copyFrom(offset).multiplyInPlace(masks.dimensions);\n this._attachedSlate.origin.copyFrom(originStart).addInPlace(offsetOriginMasked);\n this._attachedSlate.dimensions.set(dimensionsStart.x + offsetDimensionsMasked.x, dimensionsStart.y + offsetDimensionsMasked.y);\n }\n _assignDragBehaviorCorners(handle, moveFn, masks) {\n const dimensionsStart = new Vector3();\n const originStart = new Vector3();\n const dragOrigin = new Vector3();\n const toObjectFrame = new Matrix();\n const dragPlaneNormal = new Vector3();\n const projectToRef = (position, normal, origin, ref) => {\n // Projects on the plane with its normal and origin\n position.subtractToRef(origin, TmpVectors.Vector3[0]);\n const dot = Vector3.Dot(TmpVectors.Vector3[0], normal);\n TmpVectors.Vector3[1].copyFrom(normal).scaleInPlace(dot);\n TmpVectors.Vector3[0].subtractInPlace(TmpVectors.Vector3[1]);\n TmpVectors.Vector3[0].addToRef(origin, ref);\n };\n const dragStart = (event) => {\n if (this.attachedSlate && this.attachedMesh) {\n dimensionsStart.set(this.attachedSlate.dimensions.x, this.attachedSlate.dimensions.y, Epsilon);\n originStart.copyFrom(this.attachedSlate.origin);\n dragOrigin.copyFrom(event.position);\n toObjectFrame.copyFrom(this.attachedMesh.computeWorldMatrix(true));\n toObjectFrame.invert();\n this.attachedSlate._followButton.isToggled = false;\n Vector3.TransformNormalToRef(Vector3.Forward(), this.attachedMesh.getWorldMatrix(), dragPlaneNormal);\n dragPlaneNormal.normalize();\n if (this._handleHovered) {\n this._handleDragged = this._handleHovered;\n this._handleDragged.drag = true;\n }\n }\n };\n const dragging = (event) => {\n if (this.attachedSlate && this.attachedMesh) {\n projectToRef(event.position, dragPlaneNormal, dragOrigin, this._tmpVector);\n this._tmpVector.subtractInPlace(dragOrigin);\n Vector3.TransformNormalToRef(this._tmpVector, toObjectFrame, this._tmpVector);\n moveFn(originStart, dimensionsStart, this._tmpVector, masks);\n this.attachedSlate._positionElements();\n this.updateBoundingBox();\n }\n };\n const dragEnd = () => {\n if (this.attachedSlate && this.attachedNode) {\n this.attachedSlate._updatePivot();\n if (this._handleDragged) {\n this._handleDragged.drag = false;\n this._handleDragged = null;\n }\n }\n };\n handle.setDragBehavior(dragStart, dragging, dragEnd);\n }\n _assignDragBehaviorSides(handle, dragPlaneNormal) {\n const quaternionOrigin = new Quaternion();\n const dragOrigin = new Vector3();\n const directionOrigin = new Vector3();\n const worldPivot = new Vector3();\n const worldPlaneNormal = new Vector3();\n const dragStart = (event) => {\n if (this.attachedSlate && this.attachedMesh) {\n quaternionOrigin.copyFrom(this.attachedMesh.rotationQuaternion);\n dragOrigin.copyFrom(event.position);\n worldPivot.copyFrom(this.attachedMesh.getAbsolutePivotPoint());\n directionOrigin.copyFrom(dragOrigin).subtractInPlace(worldPivot).normalize();\n this.attachedSlate._followButton.isToggled = false;\n Vector3.TransformNormalToRef(dragPlaneNormal, this.attachedMesh.getWorldMatrix(), worldPlaneNormal);\n worldPlaneNormal.normalize();\n if (this._handleHovered) {\n this._handleDragged = this._handleHovered;\n this._handleDragged.drag = true;\n }\n }\n };\n const dragging = (event) => {\n if (this.attachedSlate && this.attachedMesh) {\n this._tmpVector.copyFrom(event.position);\n this._tmpVector.subtractInPlace(worldPivot);\n this._tmpVector.normalize();\n const angle = -Vector3.GetAngleBetweenVectorsOnPlane(this._tmpVector, directionOrigin, worldPlaneNormal);\n Quaternion.RotationAxisToRef(dragPlaneNormal, angle, this._tmpQuaternion);\n quaternionOrigin.multiplyToRef(this._tmpQuaternion, this.attachedMesh.rotationQuaternion);\n }\n };\n const dragEnd = () => {\n if (this.attachedSlate && this.attachedNode) {\n this.attachedSlate._updatePivot();\n if (this._handleDragged) {\n this._handleDragged.drag = false;\n this._handleDragged = null;\n }\n }\n };\n handle.setDragBehavior(dragStart, dragging, dragEnd);\n }\n _attachedNodeChanged(value) {\n if (value) {\n this.updateBoundingBox();\n }\n }\n /**\n * Updates the bounding box information for the gizmo\n */\n updateBoundingBox() {\n if (this.attachedMesh) {\n PivotTools._RemoveAndStorePivotPoint(this.attachedMesh);\n // Store original parent\n const originalParent = this.attachedMesh.parent;\n this.attachedMesh.setParent(null);\n this._update();\n // Rotate based on axis\n if (!this.attachedMesh.rotationQuaternion) {\n this.attachedMesh.rotationQuaternion = Quaternion.RotationYawPitchRoll(this.attachedMesh.rotation.y, this.attachedMesh.rotation.x, this.attachedMesh.rotation.z);\n }\n // Store original position and reset mesh to origin before computing the bounding box\n this._tmpQuaternion.copyFrom(this.attachedMesh.rotationQuaternion);\n this._tmpVector.copyFrom(this.attachedMesh.position);\n this.attachedMesh.rotationQuaternion.set(0, 0, 0, 1);\n this.attachedMesh.position.set(0, 0, 0);\n // Update bounding dimensions/positions\n const boundingMinMax = this.attachedMesh.getHierarchyBoundingVectors();\n boundingMinMax.max.subtractToRef(boundingMinMax.min, this._boundingDimensions);\n this._boundingBoxGizmo.min = boundingMinMax.min;\n this._boundingBoxGizmo.max = boundingMinMax.max;\n // Update handles of the gizmo\n this._updateHandlesPosition();\n this._updateHandlesScaling();\n // Restore position/rotation values\n this.attachedMesh.rotationQuaternion.copyFrom(this._tmpQuaternion);\n this.attachedMesh.position.copyFrom(this._tmpVector);\n PivotTools._RestorePivotPoint(this.attachedMesh);\n // Restore original parent\n this.attachedMesh.setParent(originalParent);\n this.attachedMesh.computeWorldMatrix(true);\n this._existingSlateScale.copyFrom(this.attachedMesh.scaling);\n }\n }\n _updateHandlesPosition() {\n const min = this._boundingBoxGizmo.min.clone();\n const max = this._boundingBoxGizmo.max.clone();\n const handleScaling = this._corners[0].node.scaling.length();\n min.x -= this._margin * handleScaling;\n min.y -= this._margin * handleScaling;\n max.x += this._margin * handleScaling;\n max.y += this._margin * handleScaling;\n const center = min.add(max).scaleInPlace(0.5);\n this._corners[0].node.position.copyFromFloats(min.x, min.y, 0);\n this._corners[1].node.position.copyFromFloats(max.x, min.y, 0);\n this._corners[2].node.position.copyFromFloats(max.x, max.y, 0);\n this._corners[3].node.position.copyFromFloats(min.x, max.y, 0);\n this._sides[0].node.position.copyFromFloats(min.x, center.y, 0);\n this._sides[1].node.position.copyFromFloats(center.x, min.y, 0);\n this._sides[2].node.position.copyFromFloats(max.x, center.y, 0);\n this._sides[3].node.position.copyFromFloats(center.x, max.y, 0);\n }\n _updateHandlesScaling() {\n if (this._attachedSlate && this._attachedSlate.mesh) {\n const scaledWidth = this._attachedSlate.mesh.scaling.x * this._attachedSlate.dimensions.x;\n const scaledHeight = this._attachedSlate.mesh.scaling.y * this._attachedSlate.dimensions.y;\n const scale = Math.min(scaledWidth, scaledHeight) * this._handleSize;\n for (let index = 0; index < this._corners.length; index++) {\n this._corners[index].node.scaling.setAll(scale);\n }\n for (let index = 0; index < this._sides.length; index++) {\n this._sides[index].node.scaling.setAll(scale);\n }\n }\n }\n _update() {\n super._update();\n if (!this.gizmoLayer.utilityLayerScene.activeCamera) {\n return;\n }\n if (this._attachedSlate && this._attachedSlate.mesh) {\n if (this.fixedScreenSize) {\n this._attachedSlate.mesh.absolutePosition.subtractToRef(this.gizmoLayer.utilityLayerScene.activeCamera.position, this._tmpVector);\n const distanceFromCamera = (this._handleSize * this._tmpVector.length()) / this.fixedScreenSizeDistanceFactor;\n for (let i = 0; i < this._corners.length; i++) {\n this._corners[i].node.scaling.set(distanceFromCamera, distanceFromCamera, distanceFromCamera);\n }\n for (let i = 0; i < this._sides.length; i++) {\n this._sides[i].node.scaling.set(distanceFromCamera, distanceFromCamera, distanceFromCamera);\n }\n }\n this._updateHandlesPosition();\n }\n }\n dispose() {\n this.gizmoLayer.originalScene.onBeforeRenderObservable.remove(this._renderObserver);\n // Will dispose rootMesh and all descendants\n super.dispose();\n for (const corner of this._corners) {\n corner.dispose();\n }\n for (const side of this._sides) {\n side.dispose();\n }\n }\n}\n//# sourceMappingURL=slateGizmo.js.map","import { ContentDisplay3D } from \"./contentDisplay3D.js\";\nimport { TouchHolographicButton } from \"./touchHolographicButton.js\";\nimport { AdvancedDynamicTexture } from \"../../2D/advancedDynamicTexture.js\";\nimport { Control } from \"../../2D/controls/control.js\";\nimport { TextBlock, TextWrapping } from \"../../2D/controls/textBlock.js\";\nimport { DefaultBehavior } from \"../behaviors/defaultBehavior.js\";\nimport { SlateGizmo } from \"../gizmos/slateGizmo.js\";\nimport { FluentMaterial } from \"../materials/fluent/fluentMaterial.js\";\nimport { FluentBackplateMaterial } from \"../materials/fluentBackplate/fluentBackplateMaterial.js\";\nimport { PointerDragBehavior } from \"@babylonjs/core/Behaviors/Meshes/pointerDragBehavior.js\";\nimport { Vector4 } from \"@babylonjs/core/Maths/math.js\";\nimport { Epsilon } from \"@babylonjs/core/Maths/math.constants.js\";\nimport { Scalar } from \"@babylonjs/core/Maths/math.scalar.js\";\nimport { Quaternion, Vector2, Vector3 } from \"@babylonjs/core/Maths/math.vector.js\";\nimport { Viewport } from \"@babylonjs/core/Maths/math.viewport.js\";\nimport { CreateBox } from \"@babylonjs/core/Meshes/Builders/boxBuilder.js\";\nimport { CreatePlane } from \"@babylonjs/core/Meshes/Builders/planeBuilder.js\";\nimport { Mesh } from \"@babylonjs/core/Meshes/mesh.js\";\nimport { VertexData } from \"@babylonjs/core/Meshes/mesh.vertexData.js\";\n/**\n * Class used to create a holographic slate\n * @since 5.0.0\n */\nexport class HolographicSlate extends ContentDisplay3D {\n /**\n * Regroups all mesh behaviors for the slate\n */\n get defaultBehavior() {\n return this._defaultBehavior;\n }\n /**\n * 2D dimensions of the slate\n */\n get dimensions() {\n return this._dimensions;\n }\n set dimensions(value) {\n //clamp, respecting ratios\n let scale = 1.0;\n if (value.x < this.minDimensions.x || value.y < this.minDimensions.y) {\n const newRatio = value.x / value.y;\n const minRatio = this.minDimensions.x / this.minDimensions.y;\n if (minRatio > newRatio) {\n // We just need to make sure the x-val is greater than the min\n scale = this.minDimensions.x / value.x;\n }\n else {\n // We just need to make sure the y-val is greater than the min\n scale = this.minDimensions.y / value.y;\n }\n }\n this._dimensions.copyFrom(value).scaleInPlace(scale);\n this._updatePivot();\n this._positionElements();\n }\n /**\n * Height of the title bar component\n */\n get titleBarHeight() {\n return this._titleBarHeight;\n }\n set titleBarHeight(value) {\n this._titleBarHeight = value;\n }\n /**\n * Rendering ground id of all the meshes\n */\n set renderingGroupId(id) {\n this._titleBar.renderingGroupId = id;\n this._titleBarTitle.renderingGroupId = id;\n this._contentPlate.renderingGroupId = id;\n this._backPlate.renderingGroupId = id;\n }\n get renderingGroupId() {\n return this._titleBar.renderingGroupId;\n }\n /**\n * The title text displayed at the top of the slate\n */\n set title(title) {\n this._titleText = title;\n if (this._titleTextComponent) {\n this._titleTextComponent.text = title;\n }\n }\n get title() {\n return this._titleText;\n }\n /**\n * Creates a new slate\n * @param name defines the control name\n */\n constructor(name) {\n super(name);\n /**\n * Margin between title bar and contentplate\n */\n this.titleBarMargin = 0.005;\n /**\n * Origin in local coordinates (top left corner)\n */\n this.origin = new Vector3(0, 0, 0);\n this._dimensions = new Vector2(21.875, 12.5);\n this._titleBarHeight = 0.625;\n this._titleText = \"\";\n this._contentScaleRatio = 1;\n /**\n * Minimum dimensions of the slate\n */\n this.minDimensions = new Vector2(15.625, 6.25);\n /**\n * Default dimensions of the slate\n */\n this.defaultDimensions = this._dimensions.clone();\n this._followButton = new TouchHolographicButton(\"followButton\" + this.name);\n this._followButton.isToggleButton = true;\n this._closeButton = new TouchHolographicButton(\"closeButton\" + this.name);\n this._contentViewport = new Viewport(0, 0, 1, 1);\n this._contentDragBehavior = new PointerDragBehavior({\n dragPlaneNormal: new Vector3(0, 0, -1),\n });\n }\n /**\n * Apply the facade texture (created from the content property).\n * This function can be overloaded by child classes\n * @param facadeTexture defines the AdvancedDynamicTexture to use\n */\n _applyFacade(facadeTexture) {\n this._contentMaterial.albedoTexture = facadeTexture;\n this._resetContentPositionAndZoom();\n this._applyContentViewport();\n facadeTexture.attachToMesh(this._contentPlate, true);\n }\n _addControl(control) {\n control._host = this._host;\n if (this._host.utilityLayer) {\n control._prepareNode(this._host.utilityLayer.utilityLayerScene);\n }\n }\n _getTypeName() {\n return \"HolographicSlate\";\n }\n /**\n * @internal\n */\n _positionElements() {\n const followButton = this._followButton;\n const closeButton = this._closeButton;\n const titleBar = this._titleBar;\n const titleBarTitle = this._titleBarTitle;\n const contentPlate = this._contentPlate;\n const backPlate = this._backPlate;\n if (followButton && closeButton && titleBar) {\n closeButton.scaling.setAll(this.titleBarHeight);\n followButton.scaling.setAll(this.titleBarHeight);\n closeButton.position.copyFromFloats(this.dimensions.x - this.titleBarHeight / 2, -this.titleBarHeight / 2, 0).addInPlace(this.origin);\n followButton.position.copyFromFloats(this.dimensions.x - (3 * this.titleBarHeight) / 2, -this.titleBarHeight / 2, 0).addInPlace(this.origin);\n const contentPlateHeight = this.dimensions.y - this.titleBarHeight - this.titleBarMargin;\n const rightHandScene = contentPlate.getScene().useRightHandedSystem;\n titleBar.scaling.set(this.dimensions.x, this.titleBarHeight, Epsilon);\n titleBarTitle.scaling.set(this.dimensions.x - 2 * this.titleBarHeight, this.titleBarHeight, Epsilon);\n contentPlate.scaling.copyFromFloats(this.dimensions.x, contentPlateHeight, Epsilon);\n backPlate.scaling.copyFromFloats(this.dimensions.x, contentPlateHeight, Epsilon);\n titleBar.position.copyFromFloats(this.dimensions.x / 2, -(this.titleBarHeight / 2), 0).addInPlace(this.origin);\n titleBarTitle.position\n .copyFromFloats(this.dimensions.x / 2 - this.titleBarHeight, -(this.titleBarHeight / 2), rightHandScene ? Epsilon : -Epsilon)\n .addInPlace(this.origin);\n contentPlate.position.copyFromFloats(this.dimensions.x / 2, -(this.titleBarHeight + this.titleBarMargin + contentPlateHeight / 2), 0).addInPlace(this.origin);\n backPlate.position\n .copyFromFloats(this.dimensions.x / 2, -(this.titleBarHeight + this.titleBarMargin + contentPlateHeight / 2), rightHandScene ? -Epsilon : Epsilon)\n .addInPlace(this.origin);\n // Update the title's AdvancedDynamicTexture scale to avoid visual stretching\n this._titleTextComponent.host.scaleTo((HolographicSlate._DEFAULT_TEXT_RESOLUTION_Y * titleBarTitle.scaling.x) / titleBarTitle.scaling.y, HolographicSlate._DEFAULT_TEXT_RESOLUTION_Y);\n const aspectRatio = this.dimensions.x / contentPlateHeight;\n this._contentViewport.width = this._contentScaleRatio;\n this._contentViewport.height = this._contentScaleRatio / aspectRatio;\n this._applyContentViewport();\n if (this._gizmo) {\n this._gizmo.updateBoundingBox();\n }\n }\n }\n _applyContentViewport() {\n var _a;\n if (((_a = this._contentPlate) === null || _a === void 0 ? void 0 : _a.material) && this._contentPlate.material.albedoTexture) {\n const tex = this._contentPlate.material.albedoTexture;\n tex.uScale = this._contentScaleRatio;\n tex.vScale = (this._contentScaleRatio / this._contentViewport.width) * this._contentViewport.height;\n tex.uOffset = this._contentViewport.x;\n tex.vOffset = this._contentViewport.y;\n }\n }\n _resetContentPositionAndZoom() {\n this._contentViewport.x = 0;\n this._contentViewport.y = 1 - this._contentViewport.height / this._contentViewport.width;\n this._contentScaleRatio = 1;\n }\n /**\n * @internal\n */\n _updatePivot() {\n if (!this.mesh) {\n return;\n }\n // Update pivot point so it is at the center of geometry\n // As origin is topleft corner in 2D, dimensions are calculated towards bottom right corner, thus y axis is downwards\n const center = new Vector3(this.dimensions.x * 0.5, -this.dimensions.y * 0.5, Epsilon);\n center.addInPlace(this.origin);\n center.z = 0;\n const origin = new Vector3(0, 0, 0);\n Vector3.TransformCoordinatesToRef(origin, this.mesh.computeWorldMatrix(true), origin);\n this.mesh.setPivotPoint(center);\n const origin2 = new Vector3(0, 0, 0);\n Vector3.TransformCoordinatesToRef(origin2, this.mesh.computeWorldMatrix(true), origin2);\n this.mesh.position.addInPlace(origin).subtractInPlace(origin2);\n }\n // Mesh association\n _createNode(scene) {\n const node = new Mesh(\"slate_\" + this.name, scene);\n this._titleBar = CreateBox(\"titleBar_\" + this.name, { size: 1 }, scene);\n this._titleBarTitle = CreatePlane(\"titleText_\" + this.name, { size: 1 }, scene);\n this._titleBarTitle.parent = node;\n this._titleBarTitle.isPickable = false;\n const adt = AdvancedDynamicTexture.CreateForMesh(this._titleBarTitle);\n this._titleTextComponent = new TextBlock(\"titleText_\" + this.name, this._titleText);\n this._titleTextComponent.textWrapping = TextWrapping.Ellipsis;\n this._titleTextComponent.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;\n this._titleTextComponent.color = \"white\";\n this._titleTextComponent.fontSize = HolographicSlate._DEFAULT_TEXT_RESOLUTION_Y / 2;\n this._titleTextComponent.paddingLeft = HolographicSlate._DEFAULT_TEXT_RESOLUTION_Y / 4;\n adt.addControl(this._titleTextComponent);\n if (scene.useRightHandedSystem) {\n const faceUV = new Vector4(0, 0, 1, 1);\n this._contentPlate = CreatePlane(\"contentPlate_\" + this.name, { size: 1, sideOrientation: VertexData.BACKSIDE, frontUVs: faceUV }, scene);\n this._backPlate = CreatePlane(\"backPlate_\" + this.name, { size: 1, sideOrientation: VertexData.FRONTSIDE }, scene);\n }\n else {\n const faceUV = new Vector4(0, 0, 1, 1);\n this._contentPlate = CreatePlane(\"contentPlate_\" + this.name, { size: 1, sideOrientation: VertexData.FRONTSIDE, frontUVs: faceUV }, scene);\n this._backPlate = CreatePlane(\"backPlate_\" + this.name, { size: 1, sideOrientation: VertexData.BACKSIDE }, scene);\n }\n this._titleBar.parent = node;\n this._titleBar.isNearGrabbable = true;\n this._contentPlate.parent = node;\n this._backPlate.parent = node;\n this._attachContentPlateBehavior();\n this._addControl(this._followButton);\n this._addControl(this._closeButton);\n const followButton = this._followButton;\n const closeButton = this._closeButton;\n followButton.node.parent = node;\n closeButton.node.parent = node;\n this._positionElements();\n this._followButton.imageUrl = HolographicSlate.ASSETS_BASE_URL + HolographicSlate.FOLLOW_ICON_FILENAME;\n this._closeButton.imageUrl = HolographicSlate.ASSETS_BASE_URL + HolographicSlate.CLOSE_ICON_FILENAME;\n this._followButton.isBackplateVisible = false;\n this._closeButton.isBackplateVisible = false;\n this._followButton.onToggleObservable.add((isToggled) => {\n this._defaultBehavior.followBehaviorEnabled = isToggled;\n if (this._defaultBehavior.followBehaviorEnabled) {\n this._defaultBehavior.followBehavior.recenter();\n }\n });\n this._closeButton.onPointerClickObservable.add(() => {\n this.dispose();\n });\n node.rotationQuaternion = Quaternion.Identity();\n node.isVisible = false;\n return node;\n }\n _attachContentPlateBehavior() {\n this._contentDragBehavior.attach(this._contentPlate);\n this._contentDragBehavior.moveAttached = false;\n this._contentDragBehavior.useObjectOrientationForDragging = true;\n this._contentDragBehavior.updateDragPlane = false;\n const origin = new Vector3();\n const worldDimensions = new Vector3();\n const upWorld = new Vector3();\n const rightWorld = new Vector3();\n const projectedOffset = new Vector2();\n let startViewport;\n let worldMatrix;\n this._contentDragBehavior.onDragStartObservable.add((event) => {\n if (!this.node) {\n return;\n }\n startViewport = this._contentViewport.clone();\n worldMatrix = this.node.computeWorldMatrix(true);\n origin.copyFrom(event.dragPlanePoint);\n worldDimensions.set(this.dimensions.x, this.dimensions.y, Epsilon);\n worldDimensions.y -= this.titleBarHeight + this.titleBarMargin;\n Vector3.TransformNormalToRef(worldDimensions, worldMatrix, worldDimensions);\n upWorld.copyFromFloats(0, 1, 0);\n Vector3.TransformNormalToRef(upWorld, worldMatrix, upWorld);\n rightWorld.copyFromFloats(1, 0, 0);\n Vector3.TransformNormalToRef(rightWorld, worldMatrix, rightWorld);\n upWorld.normalize();\n upWorld.scaleInPlace(1 / Vector3.Dot(upWorld, worldDimensions));\n rightWorld.normalize();\n rightWorld.scaleInPlace(1 / Vector3.Dot(rightWorld, worldDimensions));\n });\n const offset = new Vector3();\n this._contentDragBehavior.onDragObservable.add((event) => {\n offset.copyFrom(event.dragPlanePoint);\n offset.subtractInPlace(origin);\n projectedOffset.copyFromFloats(Vector3.Dot(offset, rightWorld), Vector3.Dot(offset, upWorld));\n // By default, content takes full width available and height is cropped to keep aspect ratio\n this._contentViewport.x = Scalar.Clamp(startViewport.x - offset.x, 0, 1 - this._contentViewport.width * this._contentScaleRatio);\n this._contentViewport.y = Scalar.Clamp(startViewport.y - offset.y, 0, 1 - this._contentViewport.height * this._contentScaleRatio);\n this._applyContentViewport();\n });\n }\n _affectMaterial(mesh) {\n // TODO share materials\n this._titleBarMaterial = new FluentBackplateMaterial(`${this.name} plateMaterial`, mesh.getScene());\n this._contentMaterial = new FluentMaterial(`${this.name} contentMaterial`, mesh.getScene());\n this._contentMaterial.renderBorders = true;\n this._backMaterial = new FluentBackplateMaterial(`${this.name} backPlate`, mesh.getScene());\n this._backMaterial.lineWidth = Epsilon;\n this._backMaterial.radius = 0.005;\n this._backMaterial.backFaceCulling = true;\n this._titleBar.material = this._titleBarMaterial;\n this._contentPlate.material = this._contentMaterial;\n this._backPlate.material = this._backMaterial;\n this._resetContent();\n this._applyContentViewport();\n }\n /**\n * @internal*\n */\n _prepareNode(scene) {\n super._prepareNode(scene);\n this._gizmo = new SlateGizmo(this._host.utilityLayer);\n this._gizmo.attachedSlate = this;\n this._defaultBehavior = new DefaultBehavior();\n this._defaultBehavior.attach(this.node, [this._titleBar]);\n this._defaultBehavior.sixDofDragBehavior.onDragStartObservable.add(() => {\n this._followButton.isToggled = false;\n });\n this._positionChangedObserver = this._defaultBehavior.sixDofDragBehavior.onPositionChangedObservable.add(() => {\n this._gizmo.updateBoundingBox();\n });\n this._updatePivot();\n this.resetDefaultAspectAndPose(false);\n }\n /**\n * Resets the aspect and pose of the slate so it is right in front of the active camera, facing towards it.\n * @param resetAspect Should the slate's dimensions/aspect ratio be reset as well\n */\n resetDefaultAspectAndPose(resetAspect = true) {\n if (!this._host || !this._host.utilityLayer || !this.node) {\n return;\n }\n const scene = this._host.utilityLayer.utilityLayerScene;\n const camera = scene.activeCamera;\n if (camera) {\n const worldMatrix = camera.getWorldMatrix();\n const backward = Vector3.TransformNormal(Vector3.Backward(scene.useRightHandedSystem), worldMatrix);\n this.origin.setAll(0);\n this._gizmo.updateBoundingBox();\n const pivot = this.node.getAbsolutePivotPoint();\n this.node.position.copyFrom(camera.position).subtractInPlace(backward).subtractInPlace(pivot);\n this.node.rotationQuaternion = Quaternion.FromLookDirectionLH(backward, new Vector3(0, 1, 0));\n if (resetAspect) {\n this.dimensions = this.defaultDimensions;\n }\n }\n }\n /**\n * Releases all associated resources\n */\n dispose() {\n super.dispose();\n this._titleBarMaterial.dispose();\n this._contentMaterial.dispose();\n this._titleBar.dispose();\n this._titleBarTitle.dispose();\n this._contentPlate.dispose();\n this._backPlate.dispose();\n this._followButton.dispose();\n this._closeButton.dispose();\n this._host.onPickedPointChangedObservable.remove(this._pickedPointObserver);\n this._defaultBehavior.sixDofDragBehavior.onPositionChangedObservable.remove(this._positionChangedObserver);\n this._defaultBehavior.detach();\n this._gizmo.dispose();\n this._contentDragBehavior.detach();\n }\n}\n/**\n * Base Url for the assets.\n */\nHolographicSlate.ASSETS_BASE_URL = \"https://assets.babylonjs.com/meshes/MRTK/\";\n/**\n * File name for the close icon.\n */\nHolographicSlate.CLOSE_ICON_FILENAME = \"IconClose.png\";\n/**\n * File name for the close icon.\n */\nHolographicSlate.FOLLOW_ICON_FILENAME = \"IconFollowMe.png\";\nHolographicSlate._DEFAULT_TEXT_RESOLUTION_Y = 102.4;\n//# sourceMappingURL=holographicSlate.js.map","import { TouchHolographicButton } from \"./touchHolographicButton.js\";\nimport { DefaultBehavior } from \"../behaviors/defaultBehavior.js\";\nimport { TouchHolographicMenu } from \"./touchHolographicMenu.js\";\n/**\n * NearMenu that displays buttons and follows the camera\n * @since 5.0.0\n */\nexport class NearMenu extends TouchHolographicMenu {\n /**\n * Regroups all mesh behaviors for the near menu\n */\n get defaultBehavior() {\n return this._defaultBehavior;\n }\n /**\n * Indicates if the near menu is world-pinned\n */\n get isPinned() {\n return this._isPinned;\n }\n set isPinned(value) {\n // Tell the pin button to toggle if this was called manually, for clean state control\n if (this._pinButton.isToggled !== value) {\n this._pinButton.isToggled = value;\n return;\n }\n this._isPinned = value;\n if (value) {\n this._defaultBehavior.followBehaviorEnabled = false;\n }\n else {\n this._defaultBehavior.followBehaviorEnabled = true;\n }\n }\n _createPinButton(parent) {\n const control = new TouchHolographicButton(\"pin\" + this.name, false);\n control.imageUrl = NearMenu._ASSETS_BASE_URL + NearMenu._PIN_ICON_FILENAME;\n control.parent = this;\n control._host = this._host;\n control.isToggleButton = true;\n control.onToggleObservable.add((newState) => {\n this.isPinned = newState;\n });\n if (this._host.utilityLayer) {\n control._prepareNode(this._host.utilityLayer.utilityLayerScene);\n control.scaling.scaleInPlace(TouchHolographicMenu.MENU_BUTTON_SCALE);\n if (control.node) {\n control.node.parent = parent;\n }\n }\n return control;\n }\n _createNode(scene) {\n const node = super._createNode(scene);\n this._pinButton = this._createPinButton(node);\n this.isPinned = false;\n this._defaultBehavior.attach(node, [this._backPlate]);\n this._defaultBehavior.followBehavior.ignoreCameraPitchAndRoll = true;\n this._defaultBehavior.followBehavior.pitchOffset = -15;\n this._defaultBehavior.followBehavior.minimumDistance = 0.3;\n this._defaultBehavior.followBehavior.defaultDistance = 0.4;\n this._defaultBehavior.followBehavior.maximumDistance = 0.6;\n this._backPlate.isNearGrabbable = true;\n node.isVisible = false;\n return node;\n }\n _finalProcessing() {\n super._finalProcessing();\n this._pinButton.position.copyFromFloats((this._backPlate.scaling.x + TouchHolographicMenu.MENU_BUTTON_SCALE) / 2, this._backPlate.scaling.y / 2, 0);\n }\n /**\n * Creates a near menu GUI 3D control\n * @param name name of the near menu\n */\n constructor(name) {\n super(name);\n this._isPinned = false;\n this._defaultBehavior = new DefaultBehavior();\n this._dragObserver = this._defaultBehavior.sixDofDragBehavior.onDragObservable.add(() => {\n this.isPinned = true;\n });\n this.backPlateMargin = 1;\n }\n /**\n * Disposes the near menu\n */\n dispose() {\n super.dispose();\n this._defaultBehavior.sixDofDragBehavior.onDragObservable.remove(this._dragObserver);\n this._defaultBehavior.detach();\n }\n}\n/**\n * Base Url for the assets.\n */\nNearMenu._ASSETS_BASE_URL = \"https://assets.babylonjs.com/meshes/MRTK/\";\n/**\n * File name for the close icon.\n */\nNearMenu._PIN_ICON_FILENAME = \"IconPin.png\";\n//# sourceMappingURL=nearMenu.js.map","// Do not edit.\nimport { ShaderStore } from \"@babylonjs/core/Engines/shaderStore.js\";\nconst name = \"mrdlSliderBarPixelShader\";\nconst shader = `uniform vec3 cameraPosition;varying vec3 vPosition;varying vec3 vNormal;varying vec2 vUV;varying vec3 vTangent;varying vec3 vBinormal;varying vec4 vColor;varying vec4 vExtra1;varying vec4 vExtra2;varying vec4 vExtra3;uniform float _Radius_;uniform float _Bevel_Front_;uniform float _Bevel_Front_Stretch_;uniform float _Bevel_Back_;uniform float _Bevel_Back_Stretch_;uniform float _Radius_Top_Left_;uniform float _Radius_Top_Right_;uniform float _Radius_Bottom_Left_;uniform float _Radius_Bottom_Right_;uniform bool _Bulge_Enabled_;uniform float _Bulge_Height_;uniform float _Bulge_Radius_;uniform float _Sun_Intensity_;uniform float _Sun_Theta_;uniform float _Sun_Phi_;uniform float _Indirect_Diffuse_;uniform vec4 _Albedo_;uniform float _Specular_;uniform float _Shininess_;uniform float _Sharpness_;uniform float _Subsurface_;uniform vec4 _Left_Color_;uniform vec4 _Right_Color_;uniform float _Reflection_;uniform float _Front_Reflect_;uniform float _Edge_Reflect_;uniform float _Power_;uniform vec4 _Sky_Color_;uniform vec4 _Horizon_Color_;uniform vec4 _Ground_Color_;uniform float _Horizon_Power_;uniform sampler2D _Reflection_Map_;uniform sampler2D _Indirect_Environment_;uniform float _Width_;uniform float _Fuzz_;uniform float _Min_Fuzz_;uniform float _Clip_Fade_;uniform float _Hue_Shift_;uniform float _Saturation_Shift_;uniform float _Value_Shift_;uniform vec3 _Blob_Position_;uniform float _Blob_Intensity_;uniform float _Blob_Near_Size_;uniform float _Blob_Far_Size_;uniform float _Blob_Near_Distance_;uniform float _Blob_Far_Distance_;uniform float _Blob_Fade_Length_;uniform float _Blob_Pulse_;uniform float _Blob_Fade_;uniform sampler2D _Blob_Texture_;uniform vec3 _Blob_Position_2_;uniform float _Blob_Near_Size_2_;uniform float _Blob_Pulse_2_;uniform float _Blob_Fade_2_;uniform vec3 _Left_Index_Pos_;uniform vec3 _Right_Index_Pos_;uniform vec3 _Left_Index_Middle_Pos_;uniform vec3 _Right_Index_Middle_Pos_;uniform sampler2D _Decal_;uniform vec2 _Decal_Scale_XY_;uniform bool _Decal_Front_Only_;uniform float _Rim_Intensity_;uniform sampler2D _Rim_Texture_;uniform float _Rim_Hue_Shift_;uniform float _Rim_Saturation_Shift_;uniform float _Rim_Value_Shift_;uniform float _Iridescence_Intensity_;uniform sampler2D _Iridescence_Texture_;uniform bool Use_Global_Left_Index;uniform bool Use_Global_Right_Index;uniform vec4 Global_Left_Index_Tip_Position;uniform vec4 Global_Right_Index_Tip_Position;uniform vec4 Global_Left_Thumb_Tip_Position;uniform vec4 Global_Right_Thumb_Tip_Position;uniform vec4 Global_Left_Index_Middle_Position;uniform vec4 Global_Right_Index_Middle_Position;uniform float Global_Left_Index_Tip_Proximity;uniform float Global_Right_Index_Tip_Proximity;void Blob_Fragment_B30(\nsampler2D Blob_Texture,\nvec4 Blob_Info1,\nvec4 Blob_Info2,\nout vec4 Blob_Color)\n{float k1=dot(Blob_Info1.xy,Blob_Info1.xy);float k2=dot(Blob_Info2.xy,Blob_Info2.xy);vec3 closer=k10.0) {C=mix(H,S,k);} else {C=mix(H,G,k); }\nreturn C;}\nvoid Sky_Environment_B50(\nvec3 Normal,\nvec3 Reflected,\nvec4 Sky_Color,\nvec4 Horizon_Color,\nvec4 Ground_Color,\nfloat Horizon_Power,\nout vec4 Reflected_Color,\nout vec4 Indirect_Color)\n{Reflected_Color=SampleEnv_Bid50(Reflected,Sky_Color,Horizon_Color,Ground_Color,Horizon_Power);Indirect_Color=mix(Ground_Color,Sky_Color,Normal.y*0.5+0.5);}\nvoid Min_Segment_Distance_B65(\nvec3 P0,\nvec3 P1,\nvec3 Q0,\nvec3 Q1,\nout vec3 NearP,\nout vec3 NearQ,\nout float Distance)\n{vec3 u=P1-P0;vec3 v=Q1-Q0;vec3 w=P0-Q0;float a=dot(u,u);float b=dot(u,v);float c=dot(v,v);float d=dot(u,w);float e=dot(v,w);float D=a*c-b*b;float sD=D;float tD=D;float sc,sN,tc,tN;if (D<0.00001) {sN=0.0;sD=1.0;tN=e;tD=c;} else {sN=(b*e-c*d);tN=(a*e-b*d);if (sN<0.0) {sN=0.0;tN=e;tD=c;} else if (sN>sD) {sN=sD;tN=e+b;tD=c;}}\nif (tN<0.0) {tN=0.0;if (-d<0.0) {sN=0.0;} else if (-d>a) {sN=sD;} else {sN=-d;sD=a;}} else if (tN>tD) {tN=tD;if ((-d+b)<0.0) {sN=0.0;} else if ((-d+b)>a) {sN=sD;} else {sN=(-d+b);sD=a;}}\nsc=abs(sN)<0.000001 ? 0.0 : sN/sD;tc=abs(tN)<0.000001 ? 0.0 : tN/tD;NearP=P0+sc*u;NearQ=Q0+tc*v;Distance=distance(NearP,NearQ);}\nvoid To_XYZ_B74(\nvec3 Vec3,\nout float X,\nout float Y,\nout float Z)\n{X=Vec3.x;Y=Vec3.y;Z=Vec3.z;}\nvoid Finger_Positions_B64(\nvec3 Left_Index_Pos,\nvec3 Right_Index_Pos,\nvec3 Left_Index_Middle_Pos,\nvec3 Right_Index_Middle_Pos,\nout vec3 Left_Index,\nout vec3 Right_Index,\nout vec3 Left_Index_Middle,\nout vec3 Right_Index_Middle)\n{Left_Index= (Use_Global_Left_Index ? Global_Left_Index_Tip_Position.xyz : Left_Index_Pos);Right_Index= (Use_Global_Right_Index ? Global_Right_Index_Tip_Position.xyz : Right_Index_Pos);Left_Index_Middle= (Use_Global_Left_Index ? Global_Left_Index_Middle_Position.xyz : Left_Index_Middle_Pos);Right_Index_Middle= (Use_Global_Right_Index ? Global_Right_Index_Middle_Position.xyz : Right_Index_Middle_Pos);}\nvoid VaryHSV_B108(\nvec3 HSV_In,\nfloat Hue_Shift,\nfloat Saturation_Shift,\nfloat Value_Shift,\nout vec3 HSV_Out)\n{HSV_Out=vec3(fract(HSV_In.x+Hue_Shift),clamp(HSV_In.y+Saturation_Shift,0.0,1.0),clamp(HSV_In.z+Value_Shift,0.0,1.0));}\nvoid Remap_Range_B114(\nfloat In_Min,\nfloat In_Max,\nfloat Out_Min,\nfloat Out_Max,\nfloat In,\nout float Out)\n{Out=mix(Out_Min,Out_Max,clamp((In-In_Min)/(In_Max-In_Min),0.0,1.0));}\nvoid To_HSV_B75(\nvec4 Color,\nout float Hue,\nout float Saturation,\nout float Value,\nout float Alpha,\nout vec3 HSV)\n{vec4 K=vec4(0.0,-1.0/3.0,2.0/3.0,-1.0);vec4 p=Color.g0.0;Result=Position.x<0.0 ? (whichY ? Radius_Top_Left : Radius_Bottom_Left) : (whichY ? Radius_Top_Right : Radius_Bottom_Right);Result*=Radius;}\nvoid Conditional_Float_B36(\nbool Which,\nfloat If_True,\nfloat If_False,\nout float Result)\n{Result=Which ? If_True : If_False;}\nvoid Greater_Than_B37(\nfloat Left,\nfloat Right,\nout bool Not_Greater_Than,\nout bool Greater_Than)\n{Greater_Than=Left>Right;Not_Greater_Than=!Greater_Than;}\nvoid Remap_Range_B105(\nfloat In_Min,\nfloat In_Max,\nfloat Out_Min,\nfloat Out_Max,\nfloat In,\nout float Out)\n{Out=mix(Out_Min,Out_Max,clamp((In-In_Min)/(In_Max-In_Min),0.0,1.0));}\nvoid main()\n{vec2 XY_Q85;XY_Q85=(uv-vec2(0.5,0.5))*_Decal_Scale_XY_+vec2(0.5,0.5);vec3 Tangent_World_Q27;vec3 Tangent_World_N_Q27;float Tangent_Length_Q27;Tangent_World_Q27=(world*vec4(vec3(1,0,0),0.0)).xyz;Tangent_Length_Q27=length(Tangent_World_Q27);Tangent_World_N_Q27=Tangent_World_Q27/Tangent_Length_Q27;vec3 Normal_World_Q60;vec3 Normal_World_N_Q60;float Normal_Length_Q60;Object_To_World_Dir_B60(vec3(0,0,1),Normal_World_Q60,Normal_World_N_Q60,Normal_Length_Q60);float X_Q78;float Y_Q78;float Z_Q78;To_XYZ_B78(position,X_Q78,Y_Q78,Z_Q78);vec3 Nrm_World_Q26;Nrm_World_Q26=normalize((world*vec4(normal,0.0)).xyz);vec3 Binormal_World_Q28;vec3 Binormal_World_N_Q28;float Binormal_Length_Q28;Object_To_World_Dir_B28(vec3(0,1,0),Binormal_World_Q28,Binormal_World_N_Q28,Binormal_Length_Q28);float Anisotropy_Q29=Tangent_Length_Q27/Binormal_Length_Q28;float Result_Q69;Pick_Radius_B69(_Radius_,_Radius_Top_Left_,_Radius_Top_Right_,_Radius_Bottom_Left_,_Radius_Bottom_Right_,position,Result_Q69);float Anisotropy_Q53=Binormal_Length_Q28/Normal_Length_Q60;bool Not_Greater_Than_Q37;bool Greater_Than_Q37;Greater_Than_B37(Z_Q78,0.0,Not_Greater_Than_Q37,Greater_Than_Q37);vec4 Linear_Q101;Linear_Q101.rgb=clamp(_Left_Color_.rgb*_Left_Color_.rgb,0.0,1.0);Linear_Q101.a=_Left_Color_.a;vec4 Linear_Q102;Linear_Q102.rgb=clamp(_Right_Color_.rgb*_Right_Color_.rgb,0.0,1.0);Linear_Q102.a=_Right_Color_.a;vec3 Difference_Q61=vec3(0,0,0)-Normal_World_N_Q60;vec4 Out_Color_Q34=vec4(X_Q78,Y_Q78,Z_Q78,1);float Result_Q36;Conditional_Float_B36(Greater_Than_Q37,_Bevel_Back_,_Bevel_Front_,Result_Q36);float Result_Q94;Conditional_Float_B36(Greater_Than_Q37,_Bevel_Back_Stretch_,_Bevel_Front_Stretch_,Result_Q94);vec3 New_P_Q130;vec2 New_UV_Q130;float Radial_Gradient_Q130;vec3 Radial_Dir_Q130;vec3 New_Normal_Q130;Move_Verts_B130(Anisotropy_Q29,position,Result_Q69,Result_Q36,normal,Anisotropy_Q53,Result_Q94,New_P_Q130,New_UV_Q130,Radial_Gradient_Q130,Radial_Dir_Q130,New_Normal_Q130);float X_Q98;float Y_Q98;X_Q98=New_UV_Q130.x;Y_Q98=New_UV_Q130.y;vec3 Pos_World_Q12;Object_To_World_Pos_B12(New_P_Q130,Pos_World_Q12);vec3 Nrm_World_Q32;Object_To_World_Normal_B32(New_Normal_Q130,Nrm_World_Q32);vec4 Blob_Info_Q23;\n#if BLOB_ENABLE\nBlob_Vertex_B23(Pos_World_Q12,Nrm_World_Q26,Tangent_World_N_Q27,Binormal_World_N_Q28,_Blob_Position_,_Blob_Intensity_,_Blob_Near_Size_,_Blob_Far_Size_,_Blob_Near_Distance_,_Blob_Far_Distance_,_Blob_Fade_Length_,_Blob_Pulse_,_Blob_Fade_,Blob_Info_Q23);\n#else\nBlob_Info_Q23=vec4(0,0,0,0);\n#endif\nvec4 Blob_Info_Q24;\n#if BLOB_ENABLE_2\nBlob_Vertex_B24(Pos_World_Q12,Nrm_World_Q26,Tangent_World_N_Q27,Binormal_World_N_Q28,_Blob_Position_2_,_Blob_Intensity_,_Blob_Near_Size_2_,_Blob_Far_Size_,_Blob_Near_Distance_,_Blob_Far_Distance_,_Blob_Fade_Length_,_Blob_Pulse_2_,_Blob_Fade_2_,Blob_Info_Q24);\n#else\nBlob_Info_Q24=vec4(0,0,0,0);\n#endif\nfloat Out_Q105;Remap_Range_B105(0.0,1.0,0.0,1.0,X_Q98,Out_Q105);float X_Q86;float Y_Q86;float Z_Q86;To_XYZ_B78(Nrm_World_Q32,X_Q86,Y_Q86,Z_Q86);vec4 Color_At_T_Q97=mix(Linear_Q101,Linear_Q102,Out_Q105);float Minus_F_Q87=-Z_Q86;float R_Q99;float G_Q99;float B_Q99;float A_Q99;R_Q99=Color_At_T_Q97.r; G_Q99=Color_At_T_Q97.g; B_Q99=Color_At_T_Q97.b; A_Q99=Color_At_T_Q97.a;float ClampF_Q88=clamp(0.0,Minus_F_Q87,1.0);float Result_Q93;Conditional_Float_B93(_Decal_Front_Only_,ClampF_Q88,1.0,Result_Q93);vec4 Vec4_Q89=vec4(Result_Q93,Radial_Gradient_Q130,G_Q99,B_Q99);vec3 Position=Pos_World_Q12;vec3 Normal=Nrm_World_Q32;vec2 UV=XY_Q85;vec3 Tangent=Tangent_World_N_Q27;vec3 Binormal=Difference_Q61;vec4 Color=Out_Color_Q34;vec4 Extra1=Vec4_Q89;vec4 Extra2=Blob_Info_Q23;vec4 Extra3=Blob_Info_Q24;gl_Position=viewProjection*vec4(Position,1);vPosition=Position;vNormal=Normal;vUV=UV;vTangent=Tangent;vBinormal=Binormal;vColor=Color;vExtra1=Extra1;vExtra2=Extra2;vExtra3=Extra3;}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const mrdlSliderBarVertexShader = { name, shader };\n//# sourceMappingURL=mrdlSliderBar.vertex.js.map","import { __decorate } from \"@babylonjs/core/tslib.es6.js\";\nimport { SerializationHelper, serialize } from \"@babylonjs/core/Misc/decorators.js\";\nimport { Vector2, Vector3, Vector4 } from \"@babylonjs/core/Maths/math.vector.js\";\nimport { Texture } from \"@babylonjs/core/Materials/Textures/texture.js\";\nimport { MaterialDefines } from \"@babylonjs/core/Materials/materialDefines.js\";\nimport { MaterialHelper } from \"@babylonjs/core/Materials/materialHelper.js\";\nimport { PushMaterial } from \"@babylonjs/core/Materials/pushMaterial.js\";\nimport { VertexBuffer } from \"@babylonjs/core/Buffers/buffer.js\";\nimport { RegisterClass } from \"@babylonjs/core/Misc/typeStore.js\";\nimport { Color4 } from \"@babylonjs/core/Maths/math.color.js\";\nimport { EffectFallbacks } from \"@babylonjs/core/Materials/effectFallbacks.js\";\nimport { Constants } from \"@babylonjs/core/Engines/constants.js\";\nimport \"./shaders/mrdlSliderBar.fragment.js\";\nimport \"./shaders/mrdlSliderBar.vertex.js\";\n/** @internal */\nclass MRDLSliderBarMaterialDefines extends MaterialDefines {\n constructor() {\n super();\n /*\n \"SKY_ENABLED\", \"BLOB_ENABLE_2\", \"IRIDESCENCE_ENABLED\"\n */\n this.SKY_ENABLED = true;\n this.BLOB_ENABLE_2 = true;\n this.IRIDESCENCE_ENABLED = true;\n this._needNormals = true;\n this._needUVs = true;\n this.rebuild();\n }\n}\n/**\n * Class used to render Slider Bar material with MRDL\n */\nexport class MRDLSliderBarMaterial extends PushMaterial {\n constructor(name, scene) {\n super(name, scene);\n /**\n * Gets or sets the corner Radius on the slider bar.\n */\n this.radius = 0.6;\n /**\n * Gets or sets the Bevel Front on the slider bar.\n */\n this.bevelFront = 0.6;\n /**\n * Gets or sets the Bevel Front Stretch on the slider bar.\n */\n this.bevelFrontStretch = 0.077;\n /**\n * Gets or sets the Bevel Back on the slider bar.\n */\n this.bevelBack = 0;\n /**\n * Gets or sets the Bevel Back Stretch on the slider bar.\n */\n this.bevelBackStretch = 0;\n /**\n * Gets or sets the top left Radii Multiplier.\n */\n this.radiusTopLeft = 1.0;\n /**\n * Gets or sets the top left Radii Multiplier.\n */\n this.radiusTopRight = 1.0;\n /**\n * Gets or sets the top left Radii Multiplier.\n */\n this.radiusBottomLeft = 1.0;\n /**\n * Gets or sets the top left Radii Multiplier.\n */\n this.radiusBottomRight = 1.0;\n /**\n * Gets or sets whether Bulge is enabled.\n * Default is false.\n */\n this.bulgeEnabled = false;\n /**\n * Gets or sets the Bulge Height.\n */\n this.bulgeHeight = -0.323;\n /**\n * Gets or sets the Bulge Radius.\n */\n this.bulgeRadius = 0.73;\n /**\n * Gets or sets the Sun Intensity.\n */\n this.sunIntensity = 1.102;\n /**\n * Gets or sets the Sun Theta.\n */\n this.sunTheta = 0.76;\n /**\n * Gets or sets the Sun Phi.\n */\n this.sunPhi = 0.526;\n /**\n * Gets or sets the Indirect Diffuse.\n */\n this.indirectDiffuse = 0.658;\n /**\n * Gets or sets the base albedo.\n */\n this.albedo = new Color4(0.0117647, 0.505882, 0.996078, 1);\n /**\n * Gets or sets the Specular value.\n */\n this.specular = 0;\n /**\n * Gets or sets the Shininess value.\n */\n this.shininess = 10;\n /**\n * Gets or sets the Sharpness value.\n */\n this.sharpness = 0;\n /**\n * Gets or sets the Subsurface value.\n */\n this.subsurface = 0;\n /**\n * Gets or sets the left gradient color.\n */\n this.leftGradientColor = new Color4(0.0117647, 0.505882, 0.996078, 1);\n /**\n * Gets or sets the right gradient color.\n */\n this.rightGradientColor = new Color4(0.0117647, 0.505882, 0.996078, 1);\n /**\n * Gets or sets the reflection value.\n */\n this.reflection = 0.749;\n /**\n * Gets or sets the front reflect value.\n */\n this.frontReflect = 0;\n /**\n * Gets or sets the edge reflect value.\n */\n this.edgeReflect = 0.09;\n /**\n * Gets or sets the power value.\n */\n this.power = 8.13;\n /**\n * Gets or sets the sky color.\n */\n this.skyColor = new Color4(0.0117647, 0.964706, 0.996078, 1);\n /**\n * Gets or sets the horizon color.\n */\n this.horizonColor = new Color4(0.0117647, 0.333333, 0.996078, 1);\n /**\n * Gets or sets the ground color.\n */\n this.groundColor = new Color4(0, 0.254902, 0.996078, 1);\n /**\n * Gets or sets the horizon power value.\n */\n this.horizonPower = 1;\n /**\n * Gets or sets the finger occlusion width value.\n */\n this.width = 0.02;\n /**\n * Gets or sets the finger occlusion fuzz value.\n */\n this.fuzz = 0.5;\n /**\n * Gets or sets the minimum finger occlusion fuzz value.\n */\n this.minFuzz = 0.001;\n /**\n * Gets or sets the finger occlusion clip fade value.\n */\n this.clipFade = 0.01;\n /**\n * Gets or sets the hue shift value.\n */\n this.hueShift = 0;\n /**\n * Gets or sets the saturation shift value.\n */\n this.saturationShift = 0;\n /**\n * Gets or sets the value shift.\n */\n this.valueShift = 0;\n /**\n * Gets or sets the position of the hover glow effect.\n */\n this.blobPosition = new Vector3(0, 0, 0.1);\n /**\n * Gets or sets the intensity of the hover glow effect.\n */\n this.blobIntensity = 0.5;\n /**\n * Gets or sets the near size of the hover glow effect.\n */\n this.blobNearSize = 0.01;\n /**\n * Gets or sets the far size of the hover glow effect.\n */\n this.blobFarSize = 0.03;\n /**\n * Gets or sets the distance considered \"near\" to the mesh, which controls the size of the hover glow effect (see blobNearSize).\n */\n this.blobNearDistance = 0;\n /**\n * Gets or sets the distance considered \"far\" from the mesh, which controls the size of the hover glow effect (see blobFarSize).\n */\n this.blobFarDistance = 0.08;\n /**\n * Gets or sets the length of the hover glow effect fade.\n */\n this.blobFadeLength = 0.576;\n /**\n * Gets or sets the progress of the hover glow effect selection animation corresponding to the left pointer (0.0 - 1.0).\n */\n this.blobPulse = 0;\n /**\n * Gets or sets the opacity of the hover glow effect corresponding to the left pointer (0.0 - 1.0). Default is 0.\n */\n this.blobFade = 1;\n /**\n * Gets or sets the position of the hover glow effect.\n */\n this.blobPosition2 = new Vector3(0.2, 0, 0.1);\n /**\n * Gets or sets the size of the hover glow effect when the right pointer is considered \"near\" to the mesh (see blobNearDistance).\n */\n this.blobNearSize2 = 0.01;\n /**\n * Gets or sets the progress of the hover glow effect selection animation corresponding to the right pointer (0.0 - 1.0).\n */\n this.blobPulse2 = 0;\n /**\n * Gets or sets the opacity of the hover glow effect corresponding to the right pointer (0.0 - 1.0). Default is 1.\n */\n this.blobFade2 = 1;\n /**\n * Gets or sets the texture of the hover glow effect.\n */\n this.blobTexture = new Texture(\"\", this.getScene());\n /**\n * Gets or sets the finger position for left index.\n */\n this.leftIndexPosition = new Vector3(0, 0, 1);\n /**\n * Gets or sets the finger position for right index.\n */\n this.rightIndexPosition = new Vector3(-1, -1, -1);\n /**\n * Gets or sets the finger position for left index middle position.\n */\n this.leftIndexMiddlePosition = new Vector3(0, 0, 0);\n /**\n * Gets or sets the finger position for right index middle position.\n */\n this.rightIndexMiddlePosition = new Vector3(0, 0, 0);\n /**\n * Gets or sets the Decal Scle for XY.\n */\n this.decalScaleXY = new Vector2(1.5, 1.5);\n /**\n * Gets or sets decalFrontOnly\n * Default is true\n */\n this.decalFrontOnly = true;\n /**\n * Gets or sets the Rim Light intensity.\n */\n this.rimIntensity = 0.287;\n /**\n * Gets or sets the Rim Light hue shift value.\n */\n this.rimHueShift = 0;\n /**\n * Gets or sets the Rim Light saturation shift value.\n */\n this.rimSaturationShift = 0;\n /**\n * Gets or sets the Rim Light value shift.\n */\n this.rimValueShift = -1;\n /**\n * Gets or sets the intensity of the iridescence effect.\n */\n this.iridescenceIntensity = 0;\n /**\n * @internal\n */\n this.useGlobalLeftIndex = 1.0;\n /**\n * @internal\n */\n this.useGlobalRightIndex = 1.0;\n /**\n * @internal\n */\n this.globalLeftIndexTipProximity = 0.0;\n /**\n * @internal\n */\n this.globalRightIndexTipProximity = 0.0;\n /**\n * @internal\n */\n this.globalLeftIndexTipPosition = new Vector4(0.5, 0.0, -0.55, 1.0);\n /**\n * @internal\n */\n this.globaRightIndexTipPosition = new Vector4(0.0, 0.0, 0.0, 1.0);\n /**\n * @internal\n */\n this.globalLeftThumbTipPosition = new Vector4(0.5, 0.0, -0.55, 1.0);\n /**\n * @internal\n */\n this.globalRightThumbTipPosition = new Vector4(0.0, 0.0, 0.0, 1.0);\n /**\n * @internal\n */\n this.globalLeftIndexMiddlePosition = new Vector4(0.5, 0.0, -0.55, 1.0);\n /**\n * @internal\n */\n this.globalRightIndexMiddlePosition = new Vector4(0.0, 0.0, 0.0, 1.0);\n this.alphaMode = Constants.ALPHA_DISABLE;\n this.backFaceCulling = false;\n this._blueGradientTexture = new Texture(MRDLSliderBarMaterial.BLUE_GRADIENT_TEXTURE_URL, this.getScene(), true, false, Texture.NEAREST_SAMPLINGMODE);\n this._decalTexture = new Texture(\"\", this.getScene());\n this._reflectionMapTexture = new Texture(\"\", this.getScene());\n this._indirectEnvTexture = new Texture(\"\", this.getScene());\n }\n needAlphaBlending() {\n return false;\n }\n needAlphaTesting() {\n return false;\n }\n getAlphaTestTexture() {\n return null;\n }\n // Methods\n isReadyForSubMesh(mesh, subMesh) {\n if (this.isFrozen) {\n if (subMesh.effect && subMesh.effect._wasPreviouslyReady) {\n return true;\n }\n }\n if (!subMesh.materialDefines) {\n subMesh.materialDefines = new MRDLSliderBarMaterialDefines();\n }\n const defines = subMesh.materialDefines;\n const scene = this.getScene();\n if (this._isReadyForSubMesh(subMesh)) {\n return true;\n }\n const engine = scene.getEngine();\n // Attribs\n MaterialHelper.PrepareDefinesForAttributes(mesh, defines, false, false);\n // Get correct effect\n if (defines.isDirty) {\n defines.markAsProcessed();\n scene.resetCachedMaterial();\n // Fallbacks\n const fallbacks = new EffectFallbacks();\n if (defines.FOG) {\n fallbacks.addFallback(1, \"FOG\");\n }\n MaterialHelper.HandleFallbacksForShadows(defines, fallbacks);\n defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess;\n //Attributes\n const attribs = [VertexBuffer.PositionKind];\n if (defines.NORMAL) {\n attribs.push(VertexBuffer.NormalKind);\n }\n if (defines.UV1) {\n attribs.push(VertexBuffer.UVKind);\n }\n if (defines.UV2) {\n attribs.push(VertexBuffer.UV2Kind);\n }\n if (defines.VERTEXCOLOR) {\n attribs.push(VertexBuffer.ColorKind);\n }\n if (defines.TANGENT) {\n attribs.push(VertexBuffer.TangentKind);\n }\n MaterialHelper.PrepareAttributesForInstances(attribs, defines);\n // Legacy browser patch\n const shaderName = \"mrdlSliderBar\";\n const join = defines.toString();\n const uniforms = [\n \"world\",\n \"viewProjection\",\n \"cameraPosition\",\n \"_Radius_\",\n \"_Bevel_Front_\",\n \"_Bevel_Front_Stretch_\",\n \"_Bevel_Back_\",\n \"_Bevel_Back_Stretch_\",\n \"_Radius_Top_Left_\",\n \"_Radius_Top_Right_\",\n \"_Radius_Bottom_Left_\",\n \"_Radius_Bottom_Right_\",\n \"_Bulge_Enabled_\",\n \"_Bulge_Height_\",\n \"_Bulge_Radius_\",\n \"_Sun_Intensity_\",\n \"_Sun_Theta_\",\n \"_Sun_Phi_\",\n \"_Indirect_Diffuse_\",\n \"_Albedo_\",\n \"_Specular_\",\n \"_Shininess_\",\n \"_Sharpness_\",\n \"_Subsurface_\",\n \"_Left_Color_\",\n \"_Right_Color_\",\n \"_Reflection_\",\n \"_Front_Reflect_\",\n \"_Edge_Reflect_\",\n \"_Power_\",\n \"_Sky_Color_\",\n \"_Horizon_Color_\",\n \"_Ground_Color_\",\n \"_Horizon_Power_\",\n \"_Reflection_Map_\",\n \"_Indirect_Environment_\",\n \"_Width_\",\n \"_Fuzz_\",\n \"_Min_Fuzz_\",\n \"_Clip_Fade_\",\n \"_Hue_Shift_\",\n \"_Saturation_Shift_\",\n \"_Value_Shift_\",\n \"_Blob_Position_\",\n \"_Blob_Intensity_\",\n \"_Blob_Near_Size_\",\n \"_Blob_Far_Size_\",\n \"_Blob_Near_Distance_\",\n \"_Blob_Far_Distance_\",\n \"_Blob_Fade_Length_\",\n \"_Blob_Pulse_\",\n \"_Blob_Fade_\",\n \"_Blob_Texture_\",\n \"_Blob_Position_2_\",\n \"_Blob_Near_Size_2_\",\n \"_Blob_Pulse_2_\",\n \"_Blob_Fade_2_\",\n \"_Left_Index_Pos_\",\n \"_Right_Index_Pos_\",\n \"_Left_Index_Middle_Pos_\",\n \"_Right_Index_Middle_Pos_\",\n \"_Decal_\",\n \"_Decal_Scale_XY_\",\n \"_Decal_Front_Only_\",\n \"_Rim_Intensity_\",\n \"_Rim_Texture_\",\n \"_Rim_Hue_Shift_\",\n \"_Rim_Saturation_Shift_\",\n \"_Rim_Value_Shift_\",\n \"_Iridescence_Intensity_\",\n \"_Iridescence_Texture_\",\n \"Use_Global_Left_Index\",\n \"Use_Global_Right_Index\",\n \"Global_Left_Index_Tip_Position\",\n \"Global_Right_Index_Tip_Position\",\n \"Global_Left_Thumb_Tip_Position\",\n \"Global_Right_Thumb_Tip_Position\",\n \"Global_Left_Index_Middle_Position;\",\n \"Global_Right_Index_Middle_Position\",\n \"Global_Left_Index_Tip_Proximity\",\n \"Global_Right_Index_Tip_Proximity\",\n ];\n const samplers = [\"_Rim_Texture_\", \"_Iridescence_Texture_\"];\n const uniformBuffers = [];\n MaterialHelper.PrepareUniformsAndSamplersList({\n uniformsNames: uniforms,\n uniformBuffersNames: uniformBuffers,\n samplers: samplers,\n defines: defines,\n maxSimultaneousLights: 4,\n });\n subMesh.setEffect(scene.getEngine().createEffect(shaderName, {\n attributes: attribs,\n uniformsNames: uniforms,\n uniformBuffersNames: uniformBuffers,\n samplers: samplers,\n defines: join,\n fallbacks: fallbacks,\n onCompiled: this.onCompiled,\n onError: this.onError,\n indexParameters: { maxSimultaneousLights: 4 },\n }, engine), defines, this._materialContext);\n }\n if (!subMesh.effect || !subMesh.effect.isReady()) {\n return false;\n }\n defines._renderId = scene.getRenderId();\n subMesh.effect._wasPreviouslyReady = true;\n return true;\n }\n bindForSubMesh(world, mesh, subMesh) {\n const defines = subMesh.materialDefines;\n if (!defines) {\n return;\n }\n const effect = subMesh.effect;\n if (!effect) {\n return;\n }\n this._activeEffect = effect;\n // Matrices\n this.bindOnlyWorldMatrix(world);\n this._activeEffect.setMatrix(\"viewProjection\", this.getScene().getTransformMatrix());\n this._activeEffect.setVector3(\"cameraPosition\", this.getScene().activeCamera.position);\n // \"Round Rect\"\n this._activeEffect.setFloat(\"_Radius_\", this.radius);\n this._activeEffect.setFloat(\"_Bevel_Front_\", this.bevelFront);\n this._activeEffect.setFloat(\"_Bevel_Front_Stretch_\", this.bevelFrontStretch);\n this._activeEffect.setFloat(\"_Bevel_Back_\", this.bevelBack);\n this._activeEffect.setFloat(\"_Bevel_Back_Stretch_\", this.bevelBackStretch);\n // \"Radii Multipliers\"\n this._activeEffect.setFloat(\"_Radius_Top_Left_\", this.radiusTopLeft);\n this._activeEffect.setFloat(\"_Radius_Top_Right_\", this.radiusTopRight);\n this._activeEffect.setFloat(\"_Radius_Bottom_Left_\", this.radiusBottomLeft);\n this._activeEffect.setFloat(\"_Radius_Bottom_Right_\", this.radiusBottomRight);\n // \"Bulge\"\n this._activeEffect.setFloat(\"_Bulge_Enabled_\", this.bulgeEnabled ? 1.0 : 0.0);\n this._activeEffect.setFloat(\"_Bulge_Height_\", this.bulgeHeight);\n this._activeEffect.setFloat(\"_Bulge_Radius_\", this.bulgeRadius);\n // \"Sun\"\n this._activeEffect.setFloat(\"_Sun_Intensity_\", this.sunIntensity);\n this._activeEffect.setFloat(\"_Sun_Theta_\", this.sunTheta);\n this._activeEffect.setFloat(\"_Sun_Phi_\", this.sunPhi);\n this._activeEffect.setFloat(\"_Indirect_Diffuse_\", this.indirectDiffuse);\n // \"Diffuse And Specular\"\n this._activeEffect.setDirectColor4(\"_Albedo_\", this.albedo);\n this._activeEffect.setFloat(\"_Specular_\", this.specular);\n this._activeEffect.setFloat(\"_Shininess_\", this.shininess);\n this._activeEffect.setFloat(\"_Sharpness_\", this.sharpness);\n this._activeEffect.setFloat(\"_Subsurface_\", this.subsurface);\n // \"Gradient\"\n this._activeEffect.setDirectColor4(\"_Left_Color_\", this.leftGradientColor);\n this._activeEffect.setDirectColor4(\"_Right_Color_\", this.rightGradientColor);\n // \"Reflection\"\n this._activeEffect.setFloat(\"_Reflection_\", this.reflection);\n this._activeEffect.setFloat(\"_Front_Reflect_\", this.frontReflect);\n this._activeEffect.setFloat(\"_Edge_Reflect_\", this.edgeReflect);\n this._activeEffect.setFloat(\"_Power_\", this.power);\n // \"Sky Environment\"\n //define SKY_ENABLED true;\n this._activeEffect.setDirectColor4(\"_Sky_Color_\", this.skyColor);\n this._activeEffect.setDirectColor4(\"_Horizon_Color_\", this.horizonColor);\n this._activeEffect.setDirectColor4(\"_Ground_Color_\", this.groundColor);\n this._activeEffect.setFloat(\"_Horizon_Power_\", this.horizonPower);\n // \"Mapped Environment\"\n //define ENV_ENABLE false;\n this._activeEffect.setTexture(\"_Reflection_Map_\", this._reflectionMapTexture);\n this._activeEffect.setTexture(\"_Indirect_Environment_\", this._indirectEnvTexture);\n // \"FingerOcclusion\"\n //define OCCLUSION_ENABLED false;\n this._activeEffect.setFloat(\"_Width_\", this.width);\n this._activeEffect.setFloat(\"_Fuzz_\", this.fuzz);\n this._activeEffect.setFloat(\"_Min_Fuzz_\", this.minFuzz);\n this._activeEffect.setFloat(\"_Clip_Fade_\", this.clipFade);\n // \"View Based Color Shift\"\n this._activeEffect.setFloat(\"_Hue_Shift_\", this.hueShift);\n this._activeEffect.setFloat(\"_Saturation_Shift_\", this.saturationShift);\n this._activeEffect.setFloat(\"_Value_Shift_\", this.valueShift);\n // \"Blob\"\n //define BLOB_ENABLE false;\n this._activeEffect.setVector3(\"_Blob_Position_\", this.blobPosition);\n this._activeEffect.setFloat(\"_Blob_Intensity_\", this.blobIntensity);\n this._activeEffect.setFloat(\"_Blob_Near_Size_\", this.blobNearSize);\n this._activeEffect.setFloat(\"_Blob_Far_Size_\", this.blobFarSize);\n this._activeEffect.setFloat(\"_Blob_Near_Distance_\", this.blobNearDistance);\n this._activeEffect.setFloat(\"_Blob_Far_Distance_\", this.blobFarDistance);\n this._activeEffect.setFloat(\"_Blob_Fade_Length_\", this.blobFadeLength);\n this._activeEffect.setFloat(\"_Blob_Pulse_\", this.blobPulse);\n this._activeEffect.setFloat(\"_Blob_Fade_\", this.blobFade);\n // \"Blob Texture\"\n this._activeEffect.setTexture(\"_Blob_Texture_\", this.blobTexture);\n // \"Blob 2\"\n //define BLOB_ENABLE_2 true;\n this._activeEffect.setVector3(\"_Blob_Position_2_\", this.blobPosition2);\n this._activeEffect.setFloat(\"_Blob_Near_Size_2_\", this.blobNearSize2);\n this._activeEffect.setFloat(\"_Blob_Pulse_2_\", this.blobPulse2);\n this._activeEffect.setFloat(\"_Blob_Fade_2_\", this.blobFade2);\n // \"Finger Positions\"\n this._activeEffect.setVector3(\"_Left_Index_Pos_\", this.leftIndexPosition);\n this._activeEffect.setVector3(\"_Right_Index_Pos_\", this.rightIndexPosition);\n this._activeEffect.setVector3(\"_Left_Index_Middle_Pos_\", this.leftIndexMiddlePosition);\n this._activeEffect.setVector3(\"_Right_Index_Middle_Pos_\", this.rightIndexMiddlePosition);\n // \"Decal Texture\"\n //define DECAL_ENABLE false;\n this._activeEffect.setTexture(\"_Decal_\", this._decalTexture);\n this._activeEffect.setVector2(\"_Decal_Scale_XY_\", this.decalScaleXY);\n this._activeEffect.setFloat(\"_Decal_Front_Only_\", this.decalFrontOnly ? 1.0 : 0.0);\n // \"Rim Light\"\n this._activeEffect.setFloat(\"_Rim_Intensity_\", this.rimIntensity);\n this._activeEffect.setTexture(\"_Rim_Texture_\", this._blueGradientTexture);\n this._activeEffect.setFloat(\"_Rim_Hue_Shift_\", this.rimHueShift);\n this._activeEffect.setFloat(\"_Rim_Saturation_Shift_\", this.rimSaturationShift);\n this._activeEffect.setFloat(\"_Rim_Value_Shift_\", this.rimValueShift);\n // \"Iridescence\"\n //define IRIDESCENCE_ENABLED true;\n this._activeEffect.setFloat(\"_Iridescence_Intensity_\", this.iridescenceIntensity);\n this._activeEffect.setTexture(\"_Iridescence_Texture_\", this._blueGradientTexture);\n // Global inputs\n this._activeEffect.setFloat(\"Use_Global_Left_Index\", this.useGlobalLeftIndex);\n this._activeEffect.setFloat(\"Use_Global_Right_Index\", this.useGlobalRightIndex);\n this._activeEffect.setVector4(\"Global_Left_Index_Tip_Position\", this.globalLeftIndexTipPosition);\n this._activeEffect.setVector4(\"Global_Right_Index_Tip_Position\", this.globaRightIndexTipPosition);\n this._activeEffect.setVector4(\"Global_Left_Thumb_Tip_Position\", this.globalLeftThumbTipPosition);\n this._activeEffect.setVector4(\"Global_Right_Thumb_Tip_Position\", this.globalRightThumbTipPosition);\n this._activeEffect.setVector4(\"Global_Left_Index_Middle_Position\", this.globalLeftIndexMiddlePosition);\n this._activeEffect.setVector4(\"Global_Right_Index_Middle_Position\", this.globalRightIndexMiddlePosition);\n this._activeEffect.setFloat(\"Global_Left_Index_Tip_Proximity\", this.globalLeftIndexTipProximity);\n this._activeEffect.setFloat(\"Global_Right_Index_Tip_Proximity\", this.globalRightIndexTipProximity);\n this._afterBind(mesh, this._activeEffect);\n }\n /**\n * Get the list of animatables in the material.\n * @returns the list of animatables object used in the material\n */\n getAnimatables() {\n return [];\n }\n dispose(forceDisposeEffect) {\n super.dispose(forceDisposeEffect);\n this._reflectionMapTexture.dispose();\n this._indirectEnvTexture.dispose();\n this._blueGradientTexture.dispose();\n this._decalTexture.dispose();\n }\n clone(name) {\n return SerializationHelper.Clone(() => new MRDLSliderBarMaterial(name, this.getScene()), this);\n }\n serialize() {\n const serializationObject = super.serialize();\n serializationObject.customType = \"BABYLON.MRDLSliderBarMaterial\";\n return serializationObject;\n }\n getClassName() {\n return \"MRDLSliderBarMaterial\";\n }\n // Statics\n static Parse(source, scene, rootUrl) {\n return SerializationHelper.Parse(() => new MRDLSliderBarMaterial(source.name, scene), source, scene, rootUrl);\n }\n}\n/**\n * URL pointing to the texture used to define the coloring for the Iridescent Map effect.\n */\nMRDLSliderBarMaterial.BLUE_GRADIENT_TEXTURE_URL = \"https://assets.babylonjs.com/meshes/MRTK/MRDL/mrtk-mrdl-blue-gradient.png\";\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"radius\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"bevelFront\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"bevelFrontStretch\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"bevelBack\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"bevelBackStretch\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"radiusTopLeft\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"radiusTopRight\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"radiusBottomLeft\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"radiusBottomRight\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"bulgeEnabled\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"bulgeHeight\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"bulgeRadius\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"sunIntensity\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"sunTheta\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"sunPhi\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"indirectDiffuse\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"albedo\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"specular\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"shininess\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"sharpness\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"subsurface\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"leftGradientColor\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"rightGradientColor\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"reflection\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"frontReflect\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"edgeReflect\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"power\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"skyColor\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"horizonColor\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"groundColor\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"horizonPower\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"width\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"fuzz\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"minFuzz\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"clipFade\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"hueShift\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"saturationShift\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"valueShift\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"blobPosition\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"blobIntensity\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"blobNearSize\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"blobFarSize\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"blobNearDistance\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"blobFarDistance\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"blobFadeLength\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"blobPulse\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"blobFade\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"blobPosition2\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"blobNearSize2\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"blobPulse2\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"blobFade2\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"blobTexture\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"leftIndexPosition\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"rightIndexPosition\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"leftIndexMiddlePosition\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"rightIndexMiddlePosition\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"decalScaleXY\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"decalFrontOnly\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"rimIntensity\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"rimHueShift\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"rimSaturationShift\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"rimValueShift\", void 0);\n__decorate([\n serialize()\n], MRDLSliderBarMaterial.prototype, \"iridescenceIntensity\", void 0);\nRegisterClass(\"BABYLON.GUI.MRDLSliderBarMaterial\", MRDLSliderBarMaterial);\n//# sourceMappingURL=mrdlSliderBarMaterial.js.map","// Do not edit.\nimport { ShaderStore } from \"@babylonjs/core/Engines/shaderStore.js\";\nconst name = \"mrdlSliderThumbPixelShader\";\nconst shader = `uniform vec3 cameraPosition;varying vec3 vPosition;varying vec3 vNormal;varying vec2 vUV;varying vec3 vTangent;varying vec3 vBinormal;varying vec4 vColor;varying vec4 vExtra1;varying vec4 vExtra2;varying vec4 vExtra3;uniform float _Radius_;uniform float _Bevel_Front_;uniform float _Bevel_Front_Stretch_;uniform float _Bevel_Back_;uniform float _Bevel_Back_Stretch_;uniform float _Radius_Top_Left_;uniform float _Radius_Top_Right_;uniform float _Radius_Bottom_Left_;uniform float _Radius_Bottom_Right_;uniform bool _Bulge_Enabled_;uniform float _Bulge_Height_;uniform float _Bulge_Radius_;uniform float _Sun_Intensity_;uniform float _Sun_Theta_;uniform float _Sun_Phi_;uniform float _Indirect_Diffuse_;uniform vec4 _Albedo_;uniform float _Specular_;uniform float _Shininess_;uniform float _Sharpness_;uniform float _Subsurface_;uniform vec4 _Left_Color_;uniform vec4 _Right_Color_;uniform float _Reflection_;uniform float _Front_Reflect_;uniform float _Edge_Reflect_;uniform float _Power_;uniform vec4 _Sky_Color_;uniform vec4 _Horizon_Color_;uniform vec4 _Ground_Color_;uniform float _Horizon_Power_;uniform sampler2D _Reflection_Map_;uniform sampler2D _Indirect_Environment_;uniform float _Width_;uniform float _Fuzz_;uniform float _Min_Fuzz_;uniform float _Clip_Fade_;uniform float _Hue_Shift_;uniform float _Saturation_Shift_;uniform float _Value_Shift_;uniform vec3 _Blob_Position_;uniform float _Blob_Intensity_;uniform float _Blob_Near_Size_;uniform float _Blob_Far_Size_;uniform float _Blob_Near_Distance_;uniform float _Blob_Far_Distance_;uniform float _Blob_Fade_Length_;uniform float _Blob_Pulse_;uniform float _Blob_Fade_;uniform sampler2D _Blob_Texture_;uniform vec3 _Blob_Position_2_;uniform float _Blob_Near_Size_2_;uniform float _Blob_Pulse_2_;uniform float _Blob_Fade_2_;uniform vec3 _Left_Index_Pos_;uniform vec3 _Right_Index_Pos_;uniform vec3 _Left_Index_Middle_Pos_;uniform vec3 _Right_Index_Middle_Pos_;uniform sampler2D _Decal_;uniform vec2 _Decal_Scale_XY_;uniform bool _Decal_Front_Only_;uniform float _Rim_Intensity_;uniform sampler2D _Rim_Texture_;uniform float _Rim_Hue_Shift_;uniform float _Rim_Saturation_Shift_;uniform float _Rim_Value_Shift_;uniform float _Iridescence_Intensity_;uniform sampler2D _Iridescence_Texture_;uniform bool Use_Global_Left_Index;uniform bool Use_Global_Right_Index;uniform vec4 Global_Left_Index_Tip_Position;uniform vec4 Global_Right_Index_Tip_Position;uniform vec4 Global_Left_Thumb_Tip_Position;uniform vec4 Global_Right_Thumb_Tip_Position;uniform vec4 Global_Left_Index_Middle_Position;uniform vec4 Global_Right_Index_Middle_Position;uniform float Global_Left_Index_Tip_Proximity;uniform float Global_Right_Index_Tip_Proximity;void Blob_Fragment_B180(\nsampler2D Blob_Texture,\nvec4 Blob_Info1,\nvec4 Blob_Info2,\nout vec4 Blob_Color)\n{float k1=dot(Blob_Info1.xy,Blob_Info1.xy);float k2=dot(Blob_Info2.xy,Blob_Info2.xy);vec3 closer=k10.0) {C=mix(H,S,k);} else {C=mix(H,G,k); }\nreturn C;}\nvoid Sky_Environment_B200(\nvec3 Normal,\nvec3 Reflected,\nvec4 Sky_Color,\nvec4 Horizon_Color,\nvec4 Ground_Color,\nfloat Horizon_Power,\nout vec4 Reflected_Color,\nout vec4 Indirect_Color)\n{Reflected_Color=SampleEnv_Bid200(Reflected,Sky_Color,Horizon_Color,Ground_Color,Horizon_Power);Indirect_Color=mix(Ground_Color,Sky_Color,Normal.y*0.5+0.5);}\nvoid Min_Segment_Distance_B215(\nvec3 P0,\nvec3 P1,\nvec3 Q0,\nvec3 Q1,\nout vec3 NearP,\nout vec3 NearQ,\nout float Distance)\n{vec3 u=P1-P0;vec3 v=Q1-Q0;vec3 w=P0-Q0;float a=dot(u,u);float b=dot(u,v);float c=dot(v,v);float d=dot(u,w);float e=dot(v,w);float D=a*c-b*b;float sD=D;float tD=D;float sc,sN,tc,tN;if (D<0.00001) {sN=0.0;sD=1.0;tN=e;tD=c;} else {sN=(b*e-c*d);tN=(a*e-b*d);if (sN<0.0) {sN=0.0;tN=e;tD=c;} else if (sN>sD) {sN=sD;tN=e+b;tD=c;}}\nif (tN<0.0) {tN=0.0;if (-d<0.0) {sN=0.0;} else if (-d>a) {sN=sD;} else {sN=-d;sD=a;}} else if (tN>tD) {tN=tD;if ((-d+b)<0.0) {sN=0.0;} else if ((-d+b)>a) {sN=sD;} else {sN=(-d+b);sD=a;}}\nsc=abs(sN)<0.000001 ? 0.0 : sN/sD;tc=abs(tN)<0.000001 ? 0.0 : tN/tD;NearP=P0+sc*u;NearQ=Q0+tc*v;Distance=distance(NearP,NearQ);}\nvoid To_XYZ_B224(\nvec3 Vec3,\nout float X,\nout float Y,\nout float Z)\n{X=Vec3.x;Y=Vec3.y;Z=Vec3.z;}\nvoid Finger_Positions_B214(\nvec3 Left_Index_Pos,\nvec3 Right_Index_Pos,\nvec3 Left_Index_Middle_Pos,\nvec3 Right_Index_Middle_Pos,\nout vec3 Left_Index,\nout vec3 Right_Index,\nout vec3 Left_Index_Middle,\nout vec3 Right_Index_Middle)\n{Left_Index= (Use_Global_Left_Index ? Global_Left_Index_Tip_Position.xyz : Left_Index_Pos);Right_Index= (Use_Global_Right_Index ? Global_Right_Index_Tip_Position.xyz : Right_Index_Pos);Left_Index_Middle= (Use_Global_Left_Index ? Global_Left_Index_Middle_Position.xyz : Left_Index_Middle_Pos);Right_Index_Middle= (Use_Global_Right_Index ? Global_Right_Index_Middle_Position.xyz : Right_Index_Middle_Pos);}\nvoid VaryHSV_B258(\nvec3 HSV_In,\nfloat Hue_Shift,\nfloat Saturation_Shift,\nfloat Value_Shift,\nout vec3 HSV_Out)\n{HSV_Out=vec3(fract(HSV_In.x+Hue_Shift),clamp(HSV_In.y+Saturation_Shift,0.0,1.0),clamp(HSV_In.z+Value_Shift,0.0,1.0));}\nvoid Remap_Range_B264(\nfloat In_Min,\nfloat In_Max,\nfloat Out_Min,\nfloat Out_Max,\nfloat In,\nout float Out)\n{Out=mix(Out_Min,Out_Max,clamp((In-In_Min)/(In_Max-In_Min),0.0,1.0));}\nvoid To_HSV_B225(\nvec4 Color,\nout float Hue,\nout float Saturation,\nout float Value,\nout float Alpha,\nout vec3 HSV)\n{vec4 K=vec4(0.0,-1.0/3.0,2.0/3.0,-1.0);vec4 p=Color.g0.0;Result=Position.x<0.0 ? (whichY ? Radius_Top_Left : Radius_Bottom_Left) : (whichY ? Radius_Top_Right : Radius_Bottom_Right);Result*=Radius;}\nvoid Conditional_Float_B186(\nbool Which,\nfloat If_True,\nfloat If_False,\nout float Result)\n{Result=Which ? If_True : If_False;}\nvoid Greater_Than_B187(\nfloat Left,\nfloat Right,\nout bool Not_Greater_Than,\nout bool Greater_Than)\n{Greater_Than=Left>Right;Not_Greater_Than=!Greater_Than;}\nvoid Remap_Range_B255(\nfloat In_Min,\nfloat In_Max,\nfloat Out_Min,\nfloat Out_Max,\nfloat In,\nout float Out)\n{Out=mix(Out_Min,Out_Max,clamp((In-In_Min)/(In_Max-In_Min),0.0,1.0));}\nvoid main()\n{vec2 XY_Q235;XY_Q235=(uv-vec2(0.5,0.5))*_Decal_Scale_XY_+vec2(0.5,0.5);vec3 Tangent_World_Q177;vec3 Tangent_World_N_Q177;float Tangent_Length_Q177;Tangent_World_Q177=(world*vec4(vec3(1,0,0),0.0)).xyz;Tangent_Length_Q177=length(Tangent_World_Q177);Tangent_World_N_Q177=Tangent_World_Q177/Tangent_Length_Q177;vec3 Normal_World_Q210;vec3 Normal_World_N_Q210;float Normal_Length_Q210;Object_To_World_Dir_B210(vec3(0,0,1),Normal_World_Q210,Normal_World_N_Q210,Normal_Length_Q210);float X_Q228;float Y_Q228;float Z_Q228;To_XYZ_B228(position,X_Q228,Y_Q228,Z_Q228);vec3 Nrm_World_Q176;Nrm_World_Q176=normalize((world*vec4(normal,0.0)).xyz);vec3 Binormal_World_Q178;vec3 Binormal_World_N_Q178;float Binormal_Length_Q178;Object_To_World_Dir_B178(vec3(0,1,0),Binormal_World_Q178,Binormal_World_N_Q178,Binormal_Length_Q178);float Anisotropy_Q179=Tangent_Length_Q177/Binormal_Length_Q178;float Result_Q219;Pick_Radius_B219(_Radius_,_Radius_Top_Left_,_Radius_Top_Right_,_Radius_Bottom_Left_,_Radius_Bottom_Right_,position,Result_Q219);float Anisotropy_Q203=Binormal_Length_Q178/Normal_Length_Q210;bool Not_Greater_Than_Q187;bool Greater_Than_Q187;Greater_Than_B187(Z_Q228,0.0,Not_Greater_Than_Q187,Greater_Than_Q187);vec4 Linear_Q251;Linear_Q251.rgb=clamp(_Left_Color_.rgb*_Left_Color_.rgb,0.0,1.0);Linear_Q251.a=_Left_Color_.a;vec4 Linear_Q252;Linear_Q252.rgb=clamp(_Right_Color_.rgb*_Right_Color_.rgb,0.0,1.0);Linear_Q252.a=_Right_Color_.a;vec3 Difference_Q211=vec3(0,0,0)-Normal_World_N_Q210;vec4 Out_Color_Q184=vec4(X_Q228,Y_Q228,Z_Q228,1);float Result_Q186;Conditional_Float_B186(Greater_Than_Q187,_Bevel_Back_,_Bevel_Front_,Result_Q186);float Result_Q244;Conditional_Float_B186(Greater_Than_Q187,_Bevel_Back_Stretch_,_Bevel_Front_Stretch_,Result_Q244);vec3 New_P_Q280;vec2 New_UV_Q280;float Radial_Gradient_Q280;vec3 Radial_Dir_Q280;vec3 New_Normal_Q280;Move_Verts_B280(Anisotropy_Q179,position,Result_Q219,Result_Q186,normal,Anisotropy_Q203,Result_Q244,New_P_Q280,New_UV_Q280,Radial_Gradient_Q280,Radial_Dir_Q280,New_Normal_Q280);float X_Q248;float Y_Q248;X_Q248=New_UV_Q280.x;Y_Q248=New_UV_Q280.y;vec3 Pos_World_Q162;Object_To_World_Pos_B162(New_P_Q280,Pos_World_Q162);vec3 Nrm_World_Q182;Object_To_World_Normal_B182(New_Normal_Q280,Nrm_World_Q182);vec4 Blob_Info_Q173;\n#if BLOB_ENABLE\nBlob_Vertex_B173(Pos_World_Q162,Nrm_World_Q176,Tangent_World_N_Q177,Binormal_World_N_Q178,_Blob_Position_,_Blob_Intensity_,_Blob_Near_Size_,_Blob_Far_Size_,_Blob_Near_Distance_,_Blob_Far_Distance_,_Blob_Fade_Length_,_Blob_Pulse_,_Blob_Fade_,Blob_Info_Q173);\n#else\nBlob_Info_Q173=vec4(0,0,0,0);\n#endif\nvec4 Blob_Info_Q174;\n#if BLOB_ENABLE_2\nBlob_Vertex_B174(Pos_World_Q162,Nrm_World_Q176,Tangent_World_N_Q177,Binormal_World_N_Q178,_Blob_Position_2_,_Blob_Intensity_,_Blob_Near_Size_2_,_Blob_Far_Size_,_Blob_Near_Distance_,_Blob_Far_Distance_,_Blob_Fade_Length_,_Blob_Pulse_2_,_Blob_Fade_2_,Blob_Info_Q174);\n#else\nBlob_Info_Q174=vec4(0,0,0,0);\n#endif\nfloat Out_Q255;Remap_Range_B255(0.0,1.0,0.0,1.0,X_Q248,Out_Q255);float X_Q236;float Y_Q236;float Z_Q236;To_XYZ_B228(Nrm_World_Q182,X_Q236,Y_Q236,Z_Q236);vec4 Color_At_T_Q247=mix(Linear_Q251,Linear_Q252,Out_Q255);float Minus_F_Q237=-Z_Q236;float R_Q249;float G_Q249;float B_Q249;float A_Q249;R_Q249=Color_At_T_Q247.r; G_Q249=Color_At_T_Q247.g; B_Q249=Color_At_T_Q247.b; A_Q249=Color_At_T_Q247.a;float ClampF_Q238=clamp(0.0,Minus_F_Q237,1.0);float Result_Q243;Conditional_Float_B243(_Decal_Front_Only_,ClampF_Q238,1.0,Result_Q243);vec4 Vec4_Q239=vec4(Result_Q243,Radial_Gradient_Q280,G_Q249,B_Q249);vec3 Position=Pos_World_Q162;vec3 Normal=Nrm_World_Q182;vec2 UV=XY_Q235;vec3 Tangent=Tangent_World_N_Q177;vec3 Binormal=Difference_Q211;vec4 Color=Out_Color_Q184;vec4 Extra1=Vec4_Q239;vec4 Extra2=Blob_Info_Q173;vec4 Extra3=Blob_Info_Q174;gl_Position=viewProjection*vec4(Position,1);vPosition=Position;vNormal=Normal;vUV=UV;vTangent=Tangent;vBinormal=Binormal;vColor=Color;vExtra1=Extra1;vExtra2=Extra2;vExtra3=Extra3;}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const mrdlSliderThumbVertexShader = { name, shader };\n//# sourceMappingURL=mrdlSliderThumb.vertex.js.map","import { __decorate } from \"@babylonjs/core/tslib.es6.js\";\nimport { SerializationHelper, serialize } from \"@babylonjs/core/Misc/decorators.js\";\nimport { Vector2, Vector3, Vector4 } from \"@babylonjs/core/Maths/math.vector.js\";\nimport { Texture } from \"@babylonjs/core/Materials/Textures/texture.js\";\nimport { MaterialDefines } from \"@babylonjs/core/Materials/materialDefines.js\";\nimport { MaterialHelper } from \"@babylonjs/core/Materials/materialHelper.js\";\nimport { PushMaterial } from \"@babylonjs/core/Materials/pushMaterial.js\";\nimport { VertexBuffer } from \"@babylonjs/core/Buffers/buffer.js\";\nimport { RegisterClass } from \"@babylonjs/core/Misc/typeStore.js\";\nimport { Color4 } from \"@babylonjs/core/Maths/math.color.js\";\nimport { EffectFallbacks } from \"@babylonjs/core/Materials/effectFallbacks.js\";\nimport { Constants } from \"@babylonjs/core/Engines/constants.js\";\nimport \"./shaders/mrdlSliderThumb.fragment.js\";\nimport \"./shaders/mrdlSliderThumb.vertex.js\";\n/** @internal */\nclass MRDLSliderThumbMaterialDefines extends MaterialDefines {\n constructor() {\n super();\n /*\n \"SKY_ENABLED\", \"BLOB_ENABLE_2\", \"IRIDESCENCE_ENABLED\"\n */\n this.SKY_ENABLED = true;\n this.BLOB_ENABLE_2 = true;\n this.IRIDESCENCE_ENABLED = true;\n this._needNormals = true;\n this._needUVs = true;\n this.rebuild();\n }\n}\n/**\n * Class used to render Slider Thumb material with MRDL\n */\nexport class MRDLSliderThumbMaterial extends PushMaterial {\n constructor(name, scene) {\n super(name, scene);\n /**\n * Gets or sets the corner Radius on the slider thumb.\n */\n this.radius = 0.157;\n /**\n * Gets or sets the Bevel Front on the slider thumb.\n */\n this.bevelFront = 0.065;\n /**\n * Gets or sets the Bevel Front Stretch on the slider thumb.\n */\n this.bevelFrontStretch = 0.077;\n /**\n * Gets or sets the Bevel Back on the slider thumb.\n */\n this.bevelBack = 0.031;\n /**\n * Gets or sets the Bevel Back Stretch on the slider thumb.\n */\n this.bevelBackStretch = 0;\n /**\n * Gets or sets the top left Radii Multiplier.\n */\n this.radiusTopLeft = 1.0;\n /**\n * Gets or sets the top left Radii Multiplier.\n */\n this.radiusTopRight = 1.0;\n /**\n * Gets or sets the top left Radii Multiplier.\n */\n this.radiusBottomLeft = 1.0;\n /**\n * Gets or sets the top left Radii Multiplier.\n */\n this.radiusBottomRight = 1.0;\n /**\n * Gets or sets whether Bulge is enabled.\n * Default is false.\n */\n this.bulgeEnabled = false;\n /**\n * Gets or sets the Bulge Height.\n */\n this.bulgeHeight = -0.323;\n /**\n * Gets or sets the Bulge Radius.\n */\n this.bulgeRadius = 0.73;\n /**\n * Gets or sets the Sun Intensity.\n */\n this.sunIntensity = 2;\n /**\n * Gets or sets the Sun Theta.\n */\n this.sunTheta = 0.937;\n /**\n * Gets or sets the Sun Phi.\n */\n this.sunPhi = 0.555;\n /**\n * Gets or sets the Indirect Diffuse.\n */\n this.indirectDiffuse = 1;\n /**\n * Gets or sets the base albedo.\n */\n this.albedo = new Color4(0.0117647, 0.505882, 0.996078, 1);\n /**\n * Gets or sets the Specular value.\n */\n this.specular = 0;\n /**\n * Gets or sets the Shininess value.\n */\n this.shininess = 10;\n /**\n * Gets or sets the Sharpness value.\n */\n this.sharpness = 0;\n /**\n * Gets or sets the Subsurface value.\n */\n this.subsurface = 0.31;\n /**\n * Gets or sets the left gradient color.\n */\n this.leftGradientColor = new Color4(0.0117647, 0.505882, 0.996078, 1);\n /**\n * Gets or sets the right gradient color.\n */\n this.rightGradientColor = new Color4(0.0117647, 0.505882, 0.996078, 1);\n /**\n * Gets or sets the reflection value.\n */\n this.reflection = 0.749;\n /**\n * Gets or sets the front reflect value.\n */\n this.frontReflect = 0;\n /**\n * Gets or sets the edge reflect value.\n */\n this.edgeReflect = 0.09;\n /**\n * Gets or sets the power value.\n */\n this.power = 8.1;\n /**\n * Gets or sets the sky color.\n */\n this.skyColor = new Color4(0.0117647, 0.960784, 0.996078, 1);\n /**\n * Gets or sets the horizon color.\n */\n this.horizonColor = new Color4(0.0117647, 0.333333, 0.996078, 1);\n /**\n * Gets or sets the ground color.\n */\n this.groundColor = new Color4(0, 0.254902, 0.996078, 1);\n /**\n * Gets or sets the horizon power value.\n */\n this.horizonPower = 1;\n /**\n * Gets or sets the finger occlusion width value.\n */\n this.width = 0.02;\n /**\n * Gets or sets the finger occlusion fuzz value.\n */\n this.fuzz = 0.5;\n /**\n * Gets or sets the minimum finger occlusion fuzz value.\n */\n this.minFuzz = 0.001;\n /**\n * Gets or sets the finger occlusion clip fade value.\n */\n this.clipFade = 0.01;\n /**\n * Gets or sets the hue shift value.\n */\n this.hueShift = 0;\n /**\n * Gets or sets the saturation shift value.\n */\n this.saturationShift = 0;\n /**\n * Gets or sets the value shift.\n */\n this.valueShift = 0;\n /**\n * Gets or sets the position of the hover glow effect.\n */\n this.blobPosition = new Vector3(0, 0, 0.1);\n /**\n * Gets or sets the intensity of the hover glow effect.\n */\n this.blobIntensity = 0.5;\n /**\n * Gets or sets the near size of the hover glow effect.\n */\n this.blobNearSize = 0.01;\n /**\n * Gets or sets the far size of the hover glow effect.\n */\n this.blobFarSize = 0.03;\n /**\n * Gets or sets the distance considered \"near\" to the mesh, which controls the size of the hover glow effect (see blobNearSize).\n */\n this.blobNearDistance = 0;\n /**\n * Gets or sets the distance considered \"far\" from the mesh, which controls the size of the hover glow effect (see blobFarSize).\n */\n this.blobFarDistance = 0.08;\n /**\n * Gets or sets the length of the hover glow effect fade.\n */\n this.blobFadeLength = 0.576;\n /**\n * Gets or sets the progress of the hover glow effect selection animation corresponding to the left pointer (0.0 - 1.0).\n */\n this.blobPulse = 0;\n /**\n * Gets or sets the opacity of the hover glow effect corresponding to the left pointer (0.0 - 1.0). Default is 0.\n */\n this.blobFade = 1;\n /**\n * Gets or sets the position of the hover glow effect.\n */\n this.blobPosition2 = new Vector3(0.2, 0, 0.1);\n /**\n * Gets or sets the size of the hover glow effect when the right pointer is considered \"near\" to the mesh (see blobNearDistance).\n */\n this.blobNearSize2 = 0.01;\n /**\n * Gets or sets the progress of the hover glow effect selection animation corresponding to the right pointer (0.0 - 1.0).\n */\n this.blobPulse2 = 0;\n /**\n * Gets or sets the opacity of the hover glow effect corresponding to the right pointer (0.0 - 1.0). Default is 1.\n */\n this.blobFade2 = 1;\n /**\n * Gets or sets the texture of the hover glow effect.\n */\n this.blobTexture = new Texture(\"\", this.getScene());\n /**\n * Gets or sets the finger position for left index.\n */\n this.leftIndexPosition = new Vector3(0, 0, 1);\n /**\n * Gets or sets the finger position for right index.\n */\n this.rightIndexPosition = new Vector3(-1, -1, -1);\n /**\n * Gets or sets the finger position for left index middle position.\n */\n this.leftIndexMiddlePosition = new Vector3(0, 0, 0);\n /**\n * Gets or sets the finger position for right index middle position.\n */\n this.rightIndexMiddlePosition = new Vector3(0, 0, 0);\n /**\n * Gets or sets the Decal Scale for XY.\n */\n this.decalScaleXY = new Vector2(1.5, 1.5);\n /**\n * Gets or sets decalFrontOnly\n * Default is true\n */\n this.decalFrontOnly = true;\n /**\n * Gets or sets the Rim Light intensity.\n */\n this.rimIntensity = 0.287;\n /**\n * Gets or sets the Rim Light hue shift value.\n */\n this.rimHueShift = 0;\n /**\n * Gets or sets the Rim Light saturation shift value.\n */\n this.rimSaturationShift = 0;\n /**\n * Gets or sets the Rim Light value shift.\n */\n this.rimValueShift = -1;\n /**\n * Gets or sets the intensity of the iridescence effect.\n */\n this.iridescenceIntensity = 0;\n /**\n * @internal\n */\n this.useGlobalLeftIndex = 1.0;\n /**\n * @internal\n */\n this.useGlobalRightIndex = 1.0;\n /**\n * @internal\n */\n this.globalLeftIndexTipProximity = 0.0;\n /**\n * @internal\n */\n this.globalRightIndexTipProximity = 0.0;\n /**\n * @internal\n */\n this.globalLeftIndexTipPosition = new Vector4(0.5, 0.0, -0.55, 1.0);\n /**\n * @internal\n */\n this.globaRightIndexTipPosition = new Vector4(0.0, 0.0, 0.0, 1.0);\n /**\n * @internal\n */\n this.globalLeftThumbTipPosition = new Vector4(0.5, 0.0, -0.55, 1.0);\n /**\n * @internal\n */\n this.globalRightThumbTipPosition = new Vector4(0.0, 0.0, 0.0, 1.0);\n /**\n * @internal\n */\n this.globalLeftIndexMiddlePosition = new Vector4(0.5, 0.0, -0.55, 1.0);\n /**\n * @internal\n */\n this.globalRightIndexMiddlePosition = new Vector4(0.0, 0.0, 0.0, 1.0);\n this.alphaMode = Constants.ALPHA_DISABLE;\n this.backFaceCulling = false;\n this._blueGradientTexture = new Texture(MRDLSliderThumbMaterial.BLUE_GRADIENT_TEXTURE_URL, scene, true, false, Texture.NEAREST_SAMPLINGMODE);\n this._decalTexture = new Texture(\"\", this.getScene());\n this._reflectionMapTexture = new Texture(\"\", this.getScene());\n this._indirectEnvTexture = new Texture(\"\", this.getScene());\n }\n needAlphaBlending() {\n return false;\n }\n needAlphaTesting() {\n return false;\n }\n getAlphaTestTexture() {\n return null;\n }\n // Methods\n isReadyForSubMesh(mesh, subMesh) {\n if (this.isFrozen) {\n if (subMesh.effect && subMesh.effect._wasPreviouslyReady) {\n return true;\n }\n }\n if (!subMesh.materialDefines) {\n subMesh.materialDefines = new MRDLSliderThumbMaterialDefines();\n }\n const defines = subMesh.materialDefines;\n const scene = this.getScene();\n if (this._isReadyForSubMesh(subMesh)) {\n return true;\n }\n const engine = scene.getEngine();\n // Attribs\n MaterialHelper.PrepareDefinesForAttributes(mesh, defines, false, false);\n // Get correct effect\n if (defines.isDirty) {\n defines.markAsProcessed();\n scene.resetCachedMaterial();\n // Fallbacks\n const fallbacks = new EffectFallbacks();\n if (defines.FOG) {\n fallbacks.addFallback(1, \"FOG\");\n }\n MaterialHelper.HandleFallbacksForShadows(defines, fallbacks);\n defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess;\n //Attributes\n const attribs = [VertexBuffer.PositionKind];\n if (defines.NORMAL) {\n attribs.push(VertexBuffer.NormalKind);\n }\n if (defines.UV1) {\n attribs.push(VertexBuffer.UVKind);\n }\n if (defines.UV2) {\n attribs.push(VertexBuffer.UV2Kind);\n }\n if (defines.VERTEXCOLOR) {\n attribs.push(VertexBuffer.ColorKind);\n }\n if (defines.TANGENT) {\n attribs.push(VertexBuffer.TangentKind);\n }\n MaterialHelper.PrepareAttributesForInstances(attribs, defines);\n // Legacy browser patch\n const shaderName = \"mrdlSliderThumb\";\n const join = defines.toString();\n const uniforms = [\n \"world\",\n \"viewProjection\",\n \"cameraPosition\",\n \"_Radius_\",\n \"_Bevel_Front_\",\n \"_Bevel_Front_Stretch_\",\n \"_Bevel_Back_\",\n \"_Bevel_Back_Stretch_\",\n \"_Radius_Top_Left_\",\n \"_Radius_Top_Right_\",\n \"_Radius_Bottom_Left_\",\n \"_Radius_Bottom_Right_\",\n \"_Bulge_Enabled_\",\n \"_Bulge_Height_\",\n \"_Bulge_Radius_\",\n \"_Sun_Intensity_\",\n \"_Sun_Theta_\",\n \"_Sun_Phi_\",\n \"_Indirect_Diffuse_\",\n \"_Albedo_\",\n \"_Specular_\",\n \"_Shininess_\",\n \"_Sharpness_\",\n \"_Subsurface_\",\n \"_Left_Color_\",\n \"_Right_Color_\",\n \"_Reflection_\",\n \"_Front_Reflect_\",\n \"_Edge_Reflect_\",\n \"_Power_\",\n \"_Sky_Color_\",\n \"_Horizon_Color_\",\n \"_Ground_Color_\",\n \"_Horizon_Power_\",\n \"_Reflection_Map_\",\n \"_Indirect_Environment_\",\n \"_Width_\",\n \"_Fuzz_\",\n \"_Min_Fuzz_\",\n \"_Clip_Fade_\",\n \"_Hue_Shift_\",\n \"_Saturation_Shift_\",\n \"_Value_Shift_\",\n \"_Blob_Position_\",\n \"_Blob_Intensity_\",\n \"_Blob_Near_Size_\",\n \"_Blob_Far_Size_\",\n \"_Blob_Near_Distance_\",\n \"_Blob_Far_Distance_\",\n \"_Blob_Fade_Length_\",\n \"_Blob_Pulse_\",\n \"_Blob_Fade_\",\n \"_Blob_Texture_\",\n \"_Blob_Position_2_\",\n \"_Blob_Near_Size_2_\",\n \"_Blob_Pulse_2_\",\n \"_Blob_Fade_2_\",\n \"_Left_Index_Pos_\",\n \"_Right_Index_Pos_\",\n \"_Left_Index_Middle_Pos_\",\n \"_Right_Index_Middle_Pos_\",\n \"_Decal_\",\n \"_Decal_Scale_XY_\",\n \"_Decal_Front_Only_\",\n \"_Rim_Intensity_\",\n \"_Rim_Texture_\",\n \"_Rim_Hue_Shift_\",\n \"_Rim_Saturation_Shift_\",\n \"_Rim_Value_Shift_\",\n \"_Iridescence_Intensity_\",\n \"_Iridescence_Texture_\",\n \"Use_Global_Left_Index\",\n \"Use_Global_Right_Index\",\n \"Global_Left_Index_Tip_Position\",\n \"Global_Right_Index_Tip_Position\",\n \"Global_Left_Thumb_Tip_Position\",\n \"Global_Right_Thumb_Tip_Position\",\n \"Global_Left_Index_Middle_Position;\",\n \"Global_Right_Index_Middle_Position\",\n \"Global_Left_Index_Tip_Proximity\",\n \"Global_Right_Index_Tip_Proximity\",\n ];\n const samplers = [\"_Rim_Texture_\", \"_Iridescence_Texture_\"];\n const uniformBuffers = [];\n MaterialHelper.PrepareUniformsAndSamplersList({\n uniformsNames: uniforms,\n uniformBuffersNames: uniformBuffers,\n samplers: samplers,\n defines: defines,\n maxSimultaneousLights: 4,\n });\n subMesh.setEffect(scene.getEngine().createEffect(shaderName, {\n attributes: attribs,\n uniformsNames: uniforms,\n uniformBuffersNames: uniformBuffers,\n samplers: samplers,\n defines: join,\n fallbacks: fallbacks,\n onCompiled: this.onCompiled,\n onError: this.onError,\n indexParameters: { maxSimultaneousLights: 4 },\n }, engine), defines);\n }\n if (!subMesh.effect || !subMesh.effect.isReady()) {\n return false;\n }\n defines._renderId = scene.getRenderId();\n subMesh.effect._wasPreviouslyReady = true;\n return true;\n }\n bindForSubMesh(world, mesh, subMesh) {\n const defines = subMesh.materialDefines;\n if (!defines) {\n return;\n }\n const effect = subMesh.effect;\n if (!effect) {\n return;\n }\n this._activeEffect = effect;\n // Matrices\n this.bindOnlyWorldMatrix(world);\n this._activeEffect.setMatrix(\"viewProjection\", this.getScene().getTransformMatrix());\n this._activeEffect.setVector3(\"cameraPosition\", this.getScene().activeCamera.position);\n // \"Round Rect\"\n this._activeEffect.setFloat(\"_Radius_\", this.radius);\n this._activeEffect.setFloat(\"_Bevel_Front_\", this.bevelFront);\n this._activeEffect.setFloat(\"_Bevel_Front_Stretch_\", this.bevelFrontStretch);\n this._activeEffect.setFloat(\"_Bevel_Back_\", this.bevelBack);\n this._activeEffect.setFloat(\"_Bevel_Back_Stretch_\", this.bevelBackStretch);\n // \"Radii Multipliers\"\n this._activeEffect.setFloat(\"_Radius_Top_Left_\", this.radiusTopLeft);\n this._activeEffect.setFloat(\"_Radius_Top_Right_\", this.radiusTopRight);\n this._activeEffect.setFloat(\"_Radius_Bottom_Left_\", this.radiusBottomLeft);\n this._activeEffect.setFloat(\"_Radius_Bottom_Right_\", this.radiusBottomRight);\n // \"Bulge\"\n this._activeEffect.setFloat(\"_Bulge_Enabled_\", this.bulgeEnabled ? 1.0 : 0.0);\n this._activeEffect.setFloat(\"_Bulge_Height_\", this.bulgeHeight);\n this._activeEffect.setFloat(\"_Bulge_Radius_\", this.bulgeRadius);\n // \"Sun\"\n this._activeEffect.setFloat(\"_Sun_Intensity_\", this.sunIntensity);\n this._activeEffect.setFloat(\"_Sun_Theta_\", this.sunTheta);\n this._activeEffect.setFloat(\"_Sun_Phi_\", this.sunPhi);\n this._activeEffect.setFloat(\"_Indirect_Diffuse_\", this.indirectDiffuse);\n // \"Diffuse And Specular\"\n this._activeEffect.setDirectColor4(\"_Albedo_\", this.albedo);\n this._activeEffect.setFloat(\"_Specular_\", this.specular);\n this._activeEffect.setFloat(\"_Shininess_\", this.shininess);\n this._activeEffect.setFloat(\"_Sharpness_\", this.sharpness);\n this._activeEffect.setFloat(\"_Subsurface_\", this.subsurface);\n // \"Gradient\"\n this._activeEffect.setDirectColor4(\"_Left_Color_\", this.leftGradientColor);\n this._activeEffect.setDirectColor4(\"_Right_Color_\", this.rightGradientColor);\n // \"Reflection\"\n this._activeEffect.setFloat(\"_Reflection_\", this.reflection);\n this._activeEffect.setFloat(\"_Front_Reflect_\", this.frontReflect);\n this._activeEffect.setFloat(\"_Edge_Reflect_\", this.edgeReflect);\n this._activeEffect.setFloat(\"_Power_\", this.power);\n // \"Sky Environment\"\n //define SKY_ENABLED true;\n this._activeEffect.setDirectColor4(\"_Sky_Color_\", this.skyColor);\n this._activeEffect.setDirectColor4(\"_Horizon_Color_\", this.horizonColor);\n this._activeEffect.setDirectColor4(\"_Ground_Color_\", this.groundColor);\n this._activeEffect.setFloat(\"_Horizon_Power_\", this.horizonPower);\n // \"Mapped Environment\"\n //define ENV_ENABLE false;\n this._activeEffect.setTexture(\"_Reflection_Map_\", this._reflectionMapTexture);\n this._activeEffect.setTexture(\"_Indirect_Environment_\", this._indirectEnvTexture);\n // \"FingerOcclusion\"\n //define OCCLUSION_ENABLED false;\n this._activeEffect.setFloat(\"_Width_\", this.width);\n this._activeEffect.setFloat(\"_Fuzz_\", this.fuzz);\n this._activeEffect.setFloat(\"_Min_Fuzz_\", this.minFuzz);\n this._activeEffect.setFloat(\"_Clip_Fade_\", this.clipFade);\n // \"View Based Color Shift\"\n this._activeEffect.setFloat(\"_Hue_Shift_\", this.hueShift);\n this._activeEffect.setFloat(\"_Saturation_Shift_\", this.saturationShift);\n this._activeEffect.setFloat(\"_Value_Shift_\", this.valueShift);\n // \"Blob\"\n //define BLOB_ENABLE false;\n this._activeEffect.setVector3(\"_Blob_Position_\", this.blobPosition);\n this._activeEffect.setFloat(\"_Blob_Intensity_\", this.blobIntensity);\n this._activeEffect.setFloat(\"_Blob_Near_Size_\", this.blobNearSize);\n this._activeEffect.setFloat(\"_Blob_Far_Size_\", this.blobFarSize);\n this._activeEffect.setFloat(\"_Blob_Near_Distance_\", this.blobNearDistance);\n this._activeEffect.setFloat(\"_Blob_Far_Distance_\", this.blobFarDistance);\n this._activeEffect.setFloat(\"_Blob_Fade_Length_\", this.blobFadeLength);\n this._activeEffect.setFloat(\"_Blob_Pulse_\", this.blobPulse);\n this._activeEffect.setFloat(\"_Blob_Fade_\", this.blobFade);\n // \"Blob Texture\"\n this._activeEffect.setTexture(\"_Blob_Texture_\", this.blobTexture);\n // \"Blob 2\"\n //define BLOB_ENABLE_2 true;\n this._activeEffect.setVector3(\"_Blob_Position_2_\", this.blobPosition2);\n this._activeEffect.setFloat(\"_Blob_Near_Size_2_\", this.blobNearSize2);\n this._activeEffect.setFloat(\"_Blob_Pulse_2_\", this.blobPulse2);\n this._activeEffect.setFloat(\"_Blob_Fade_2_\", this.blobFade2);\n // \"Finger Positions\"\n this._activeEffect.setVector3(\"_Left_Index_Pos_\", this.leftIndexPosition);\n this._activeEffect.setVector3(\"_Right_Index_Pos_\", this.rightIndexPosition);\n this._activeEffect.setVector3(\"_Left_Index_Middle_Pos_\", this.leftIndexMiddlePosition);\n this._activeEffect.setVector3(\"_Right_Index_Middle_Pos_\", this.rightIndexMiddlePosition);\n // \"Decal Texture\"\n //define DECAL_ENABLE false;\n this._activeEffect.setTexture(\"_Decal_\", this._decalTexture);\n this._activeEffect.setVector2(\"_Decal_Scale_XY_\", this.decalScaleXY);\n this._activeEffect.setFloat(\"_Decal_Front_Only_\", this.decalFrontOnly ? 1.0 : 0.0);\n // \"Rim Light\"\n this._activeEffect.setFloat(\"_Rim_Intensity_\", this.rimIntensity);\n this._activeEffect.setTexture(\"_Rim_Texture_\", this._blueGradientTexture);\n this._activeEffect.setFloat(\"_Rim_Hue_Shift_\", this.rimHueShift);\n this._activeEffect.setFloat(\"_Rim_Saturation_Shift_\", this.rimSaturationShift);\n this._activeEffect.setFloat(\"_Rim_Value_Shift_\", this.rimValueShift);\n // \"Iridescence\"\n //define IRIDESCENCE_ENABLED true;\n this._activeEffect.setFloat(\"_Iridescence_Intensity_\", this.iridescenceIntensity);\n this._activeEffect.setTexture(\"_Iridescence_Texture_\", this._blueGradientTexture);\n // Global inputs\n this._activeEffect.setFloat(\"Use_Global_Left_Index\", this.useGlobalLeftIndex);\n this._activeEffect.setFloat(\"Use_Global_Right_Index\", this.useGlobalRightIndex);\n this._activeEffect.setVector4(\"Global_Left_Index_Tip_Position\", this.globalLeftIndexTipPosition);\n this._activeEffect.setVector4(\"Global_Right_Index_Tip_Position\", this.globaRightIndexTipPosition);\n this._activeEffect.setVector4(\"Global_Left_Thumb_Tip_Position\", this.globalLeftThumbTipPosition);\n this._activeEffect.setVector4(\"Global_Right_Thumb_Tip_Position\", this.globalRightThumbTipPosition);\n this._activeEffect.setVector4(\"Global_Left_Index_Middle_Position\", this.globalLeftIndexMiddlePosition);\n this._activeEffect.setVector4(\"Global_Right_Index_Middle_Position\", this.globalRightIndexMiddlePosition);\n this._activeEffect.setFloat(\"Global_Left_Index_Tip_Proximity\", this.globalLeftIndexTipProximity);\n this._activeEffect.setFloat(\"Global_Right_Index_Tip_Proximity\", this.globalRightIndexTipProximity);\n this._afterBind(mesh, this._activeEffect);\n }\n /**\n * Get the list of animatables in the material.\n * @returns the list of animatables object used in the material\n */\n getAnimatables() {\n return [];\n }\n dispose(forceDisposeEffect) {\n super.dispose(forceDisposeEffect);\n this._reflectionMapTexture.dispose();\n this._indirectEnvTexture.dispose();\n this._blueGradientTexture.dispose();\n this._decalTexture.dispose();\n }\n clone(name) {\n return SerializationHelper.Clone(() => new MRDLSliderThumbMaterial(name, this.getScene()), this);\n }\n serialize() {\n const serializationObject = super.serialize();\n serializationObject.customType = \"BABYLON.MRDLSliderThumbMaterial\";\n return serializationObject;\n }\n getClassName() {\n return \"MRDLSliderThumbMaterial\";\n }\n // Statics\n static Parse(source, scene, rootUrl) {\n return SerializationHelper.Parse(() => new MRDLSliderThumbMaterial(source.name, scene), source, scene, rootUrl);\n }\n}\n/**\n * URL pointing to the texture used to define the coloring for the Iridescent Map effect.\n */\nMRDLSliderThumbMaterial.BLUE_GRADIENT_TEXTURE_URL = \"https://assets.babylonjs.com/meshes/MRTK/MRDL/mrtk-mrdl-blue-gradient.png\";\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"radius\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"bevelFront\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"bevelFrontStretch\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"bevelBack\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"bevelBackStretch\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"radiusTopLeft\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"radiusTopRight\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"radiusBottomLeft\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"radiusBottomRight\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"bulgeEnabled\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"bulgeHeight\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"bulgeRadius\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"sunIntensity\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"sunTheta\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"sunPhi\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"indirectDiffuse\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"albedo\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"specular\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"shininess\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"sharpness\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"subsurface\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"leftGradientColor\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"rightGradientColor\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"reflection\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"frontReflect\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"edgeReflect\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"power\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"skyColor\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"horizonColor\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"groundColor\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"horizonPower\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"width\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"fuzz\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"minFuzz\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"clipFade\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"hueShift\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"saturationShift\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"valueShift\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"blobPosition\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"blobIntensity\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"blobNearSize\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"blobFarSize\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"blobNearDistance\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"blobFarDistance\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"blobFadeLength\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"blobPulse\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"blobFade\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"blobPosition2\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"blobNearSize2\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"blobPulse2\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"blobFade2\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"blobTexture\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"leftIndexPosition\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"rightIndexPosition\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"leftIndexMiddlePosition\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"rightIndexMiddlePosition\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"decalScaleXY\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"decalFrontOnly\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"rimIntensity\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"rimHueShift\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"rimSaturationShift\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"rimValueShift\", void 0);\n__decorate([\n serialize()\n], MRDLSliderThumbMaterial.prototype, \"iridescenceIntensity\", void 0);\nRegisterClass(\"BABYLON.GUI.MRDLSliderThumbMaterial\", MRDLSliderThumbMaterial);\n//# sourceMappingURL=mrdlSliderThumbMaterial.js.map","// Do not edit.\nimport { ShaderStore } from \"@babylonjs/core/Engines/shaderStore.js\";\nconst name = \"mrdlBackplatePixelShader\";\nconst shader = `uniform vec3 cameraPosition;varying vec3 vPosition;varying vec3 vNormal;varying vec2 vUV;varying vec3 vTangent;varying vec3 vBinormal;varying vec4 vExtra1;varying vec4 vExtra2;uniform float _Radius_;uniform float _Line_Width_;uniform bool _Absolute_Sizes_;uniform float _Filter_Width_;uniform vec4 _Base_Color_;uniform vec4 _Line_Color_;uniform float _Radius_Top_Left_;uniform float _Radius_Top_Right_;uniform float _Radius_Bottom_Left_;uniform float _Radius_Bottom_Right_;uniform float _Rate_;uniform vec4 _Highlight_Color_;uniform float _Highlight_Width_;uniform vec4 _Highlight_Transform_;uniform float _Highlight_;uniform float _Iridescence_Intensity_;uniform float _Iridescence_Edge_Intensity_;uniform vec4 _Iridescence_Tint_;uniform sampler2D _Iridescent_Map_;uniform float _Angle_;uniform bool _Reflected_;uniform float _Frequency_;uniform float _Vertical_Offset_;uniform vec4 _Gradient_Color_;uniform vec4 _Top_Left_;uniform vec4 _Top_Right_;uniform vec4 _Bottom_Left_;uniform vec4 _Bottom_Right_;uniform float _Edge_Width_;uniform float _Edge_Power_;uniform float _Line_Gradient_Blend_;uniform float _Fade_Out_;void FastLinearTosRGB_B353(\nvec4 Linear,\nout vec4 sRGB)\n{sRGB.rgb=sqrt(clamp(Linear.rgb,0.0,1.0));sRGB.a=Linear.a;}\nvoid Round_Rect_Fragment_B332(\nfloat Radius,\nfloat Line_Width,\nvec4 Line_Color,\nfloat Filter_Width,\nvec2 UV,\nfloat Line_Visibility,\nvec4 Rect_Parms,\nvec4 Fill_Color,\nout vec4 Color)\n{float d=length(max(abs(UV)-Rect_Parms.xy,0.0));float dx=max(fwidth(d)*Filter_Width,0.00001);float g=min(Rect_Parms.z,Rect_Parms.w);float dgrad=max(fwidth(g)*Filter_Width,0.00001);float Inside_Rect=clamp(g/dgrad,0.0,1.0);float inner=clamp((d+dx*0.5-max(Radius-Line_Width,d-dx*0.5))/dx,0.0,1.0);Color=clamp(mix(Fill_Color,Line_Color,inner),0.0,1.0)*Inside_Rect;}\nvoid Iridescence_B343(\nvec3 Position,\nvec3 Normal,\nvec2 UV,\nvec3 Axis,\nvec3 Eye,\nvec4 Tint,\nsampler2D Texture,\nbool Reflected,\nfloat Frequency,\nfloat Vertical_Offset,\nout vec4 Color)\n{vec3 i=normalize(Position-Eye);vec3 r=reflect(i,Normal);float idota=dot(i,Axis);float idotr=dot(i,r);float x=Reflected ? idotr : idota;vec2 xy;xy.x=fract((x*Frequency+1.0)*0.5+UV.y*Vertical_Offset);xy.y=0.5;Color=texture(Texture,xy);Color.rgb*=Tint.rgb;}\nvoid Scale_RGB_B346(\nvec4 Color,\nfloat Scalar,\nout vec4 Result)\n{Result=vec4(Scalar,Scalar,Scalar,1)*Color;}\nvoid Scale_RGB_B344(\nfloat Scalar,\nvec4 Color,\nout vec4 Result)\n{Result=vec4(Scalar,Scalar,Scalar,1)*Color;}\nvoid Line_Fragment_B362(\nvec4 Base_Color,\nvec4 Highlight_Color,\nfloat Highlight_Width,\nvec3 Line_Vertex,\nfloat Highlight,\nout vec4 Line_Color)\n{float k2=1.0-clamp(abs(Line_Vertex.y/Highlight_Width),0.0,1.0);Line_Color=mix(Base_Color,Highlight_Color,Highlight*k2);}\nvoid Edge_B356(\nvec4 RectParms,\nfloat Radius,\nfloat Line_Width,\nvec2 UV,\nfloat Edge_Width,\nfloat Edge_Power,\nout float Result)\n{float d=length(max(abs(UV)-RectParms.xy,0.0));float edge=1.0-clamp((1.0-d/(Radius-Line_Width))/Edge_Width,0.0,1.0);Result=pow(edge,Edge_Power);}\nvoid Gradient_B355(\nvec4 Gradient_Color,\nvec4 Top_Left,\nvec4 Top_Right,\nvec4 Bottom_Left,\nvec4 Bottom_Right,\nvec2 UV,\nout vec4 Result)\n{vec3 top=Top_Left.rgb+(Top_Right.rgb-Top_Left.rgb)*UV.x;vec3 bottom=Bottom_Left.rgb+(Bottom_Right.rgb-Bottom_Left.rgb)*UV.x;Result.rgb=Gradient_Color.rgb*(bottom+(top-bottom)*UV.y);Result.a=1.0;}\nvoid main()\n{float X_Q338;float Y_Q338;float Z_Q338;float W_Q338;X_Q338=vExtra2.x;Y_Q338=vExtra2.y;Z_Q338=vExtra2.z;W_Q338=vExtra2.w;vec4 Color_Q343;\n#if IRIDESCENCE_ENABLE\nIridescence_B343(vPosition,vNormal,vUV,vBinormal,cameraPosition,_Iridescence_Tint_,_Iridescent_Map_,_Reflected_,_Frequency_,_Vertical_Offset_,Color_Q343);\n#else\nColor_Q343=vec4(0,0,0,0);\n#endif\nvec4 Result_Q344;Scale_RGB_B344(_Iridescence_Intensity_,Color_Q343,Result_Q344);vec4 Line_Color_Q362;Line_Fragment_B362(_Line_Color_,_Highlight_Color_,_Highlight_Width_,vTangent,_Highlight_,Line_Color_Q362);float Result_Q356;\n#if EDGE_ONLY\nEdge_B356(vExtra1,Z_Q338,W_Q338,vUV,_Edge_Width_,_Edge_Power_,Result_Q356);\n#else\nResult_Q356=1.0;\n#endif\nvec2 Vec2_Q339=vec2(X_Q338,Y_Q338);vec4 Result_Q355;Gradient_B355(_Gradient_Color_,_Top_Left_,_Top_Right_,_Bottom_Left_,_Bottom_Right_,Vec2_Q339,Result_Q355);vec4 Linear_Q348;Linear_Q348.rgb=clamp(Result_Q355.rgb*Result_Q355.rgb,0.0,1.0);Linear_Q348.a=Result_Q355.a;vec4 Result_Q346;Scale_RGB_B346(Linear_Q348,Result_Q356,Result_Q346);vec4 Sum_Q345=Result_Q346+Result_Q344;vec4 Color_At_T_Q347=mix(Line_Color_Q362,Result_Q346,_Line_Gradient_Blend_);vec4 Base_And_Iridescent_Q350;Base_And_Iridescent_Q350=_Base_Color_+vec4(Sum_Q345.rgb,0.0);vec4 Sum_Q349=Color_At_T_Q347+_Iridescence_Edge_Intensity_*Color_Q343;vec4 Result_Q351=Sum_Q349; Result_Q351.a=1.0;vec4 Color_Q332;Round_Rect_Fragment_B332(Z_Q338,W_Q338,Result_Q351,_Filter_Width_,vUV,1.0,vExtra1,Base_And_Iridescent_Q350,Color_Q332);vec4 Result_Q354=_Fade_Out_*Color_Q332;vec4 sRGB_Q353;FastLinearTosRGB_B353(Result_Q354,sRGB_Q353);vec4 Out_Color=sRGB_Q353;float Clip_Threshold=0.001;bool To_sRGB=false;gl_FragColor=Out_Color;}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const mrdlBackplatePixelShader = { name, shader };\n//# sourceMappingURL=mrdlBackplate.fragment.js.map","// Do not edit.\nimport { ShaderStore } from \"@babylonjs/core/Engines/shaderStore.js\";\nconst name = \"mrdlBackplateVertexShader\";\nconst shader = `uniform mat4 world;uniform mat4 viewProjection;uniform vec3 cameraPosition;attribute vec3 position;attribute vec3 normal;attribute vec3 tangent;uniform float _Radius_;uniform float _Line_Width_;uniform bool _Absolute_Sizes_;uniform float _Filter_Width_;uniform vec4 _Base_Color_;uniform vec4 _Line_Color_;uniform float _Radius_Top_Left_;uniform float _Radius_Top_Right_;uniform float _Radius_Bottom_Left_;uniform float _Radius_Bottom_Right_;uniform float _Rate_;uniform vec4 _Highlight_Color_;uniform float _Highlight_Width_;uniform vec4 _Highlight_Transform_;uniform float _Highlight_;uniform float _Iridescence_Intensity_;uniform float _Iridescence_Edge_Intensity_;uniform vec4 _Iridescence_Tint_;uniform sampler2D _Iridescent_Map_;uniform float _Angle_;uniform bool _Reflected_;uniform float _Frequency_;uniform float _Vertical_Offset_;uniform vec4 _Gradient_Color_;uniform vec4 _Top_Left_;uniform vec4 _Top_Right_;uniform vec4 _Bottom_Left_;uniform vec4 _Bottom_Right_;uniform float _Edge_Width_;uniform float _Edge_Power_;uniform float _Line_Gradient_Blend_;uniform float _Fade_Out_;varying vec3 vPosition;varying vec3 vNormal;varying vec2 vUV;varying vec3 vTangent;varying vec3 vBinormal;varying vec4 vExtra1;varying vec4 vExtra2;void Object_To_World_Pos_B314(\nvec3 Pos_Object,\nout vec3 Pos_World)\n{Pos_World=(world*vec4(Pos_Object,1.0)).xyz;}\nvoid Round_Rect_Vertex_B357(\nvec2 UV,\nfloat Radius,\nfloat Margin,\nfloat Anisotropy,\nfloat Gradient1,\nfloat Gradient2,\nvec3 Normal,\nvec4 Color_Scale_Translate,\nout vec2 Rect_UV,\nout vec4 Rect_Parms,\nout vec2 Scale_XY,\nout vec2 Line_UV,\nout vec2 Color_UV_Info)\n{Scale_XY=vec2(Anisotropy,1.0);Line_UV=(UV-vec2(0.5,0.5));Rect_UV=Line_UV*Scale_XY;Rect_Parms.xy=Scale_XY*0.5-vec2(Radius,Radius)-vec2(Margin,Margin);Rect_Parms.z=Gradient1; \nRect_Parms.w=Gradient2;Color_UV_Info=(Line_UV+vec2(0.5,0.5))*Color_Scale_Translate.xy+Color_Scale_Translate.zw;}\nvoid Line_Vertex_B333(\nvec2 Scale_XY,\nvec2 UV,\nfloat Time,\nfloat Rate,\nvec4 Highlight_Transform,\nout vec3 Line_Vertex)\n{float angle2=(Rate*Time)*2.0*3.1416;float sinAngle2=sin(angle2);float cosAngle2=cos(angle2);vec2 xformUV=UV*Highlight_Transform.xy+Highlight_Transform.zw;Line_Vertex.x=0.0;Line_Vertex.y=cosAngle2*xformUV.x-sinAngle2*xformUV.y;Line_Vertex.z=0.0; }\nvoid PickDir_B334(\nfloat Degrees,\nvec3 DirX,\nvec3 DirY,\nout vec3 Dir)\n{float a=Degrees*3.14159/180.0;Dir=cos(a)*DirX+sin(a)*DirY;}\nvoid Move_Verts_B327(\nfloat Anisotropy,\nvec3 P,\nfloat Radius,\nout vec3 New_P,\nout vec2 New_UV,\nout float Radial_Gradient,\nout vec3 Radial_Dir)\n{vec2 UV=P.xy*2.0+0.5;vec2 center=clamp(UV,0.0,1.0);vec2 delta=UV-center;vec2 r2=2.0*vec2(Radius/Anisotropy,Radius);New_UV=center+r2*(UV-2.0*center+0.5);New_P=vec3(New_UV-0.5,P.z);Radial_Gradient=1.0-length(delta)*2.0;Radial_Dir=vec3(delta*r2,0.0);}\nvoid Pick_Radius_B336(\nfloat Radius,\nfloat Radius_Top_Left,\nfloat Radius_Top_Right,\nfloat Radius_Bottom_Left,\nfloat Radius_Bottom_Right,\nvec3 Position,\nout float Result)\n{bool whichY=Position.y>0.0;Result=Position.x<0.0 ? (whichY ? Radius_Top_Left : Radius_Bottom_Left) : (whichY ? Radius_Top_Right : Radius_Bottom_Right);Result*=Radius;}\nvoid Edge_AA_Vertex_B328(\nvec3 Position_World,\nvec3 Position_Object,\nvec3 Normal_Object,\nvec3 Eye,\nfloat Radial_Gradient,\nvec3 Radial_Dir,\nvec3 Tangent,\nout float Gradient1,\nout float Gradient2)\n{vec3 I=(Eye-Position_World);vec3 T=(vec4(Tangent,0.0)).xyz;float g=(dot(T,I)<0.0) ? 0.0 : 1.0;if (Normal_Object.z==0.0) { \nGradient1=Position_Object.z>0.0 ? g : 1.0;Gradient2=Position_Object.z>0.0 ? 1.0 : g;} else {Gradient1=g+(1.0-g)*(Radial_Gradient);Gradient2=1.0;}}\nvoid Object_To_World_Dir_B330(\nvec3 Dir_Object,\nout vec3 Binormal_World,\nout vec3 Binormal_World_N,\nout float Binormal_Length)\n{Binormal_World=(world*vec4(Dir_Object,0.0)).xyz;Binormal_Length=length(Binormal_World);Binormal_World_N=Binormal_World/Binormal_Length;}\nvoid RelativeOrAbsoluteDetail_B341(\nfloat Nominal_Radius,\nfloat Nominal_LineWidth,\nbool Absolute_Measurements,\nfloat Height,\nout float Radius,\nout float Line_Width)\n{float scale=Absolute_Measurements ? 1.0/Height : 1.0;Radius=Nominal_Radius*scale;Line_Width=Nominal_LineWidth*scale;}\nvoid main()\n{vec3 Nrm_World_Q326;Nrm_World_Q326=normalize((world*vec4(normal,0.0)).xyz);vec3 Tangent_World_Q329;vec3 Tangent_World_N_Q329;float Tangent_Length_Q329;Tangent_World_Q329=(world*vec4(vec3(1,0,0),0.0)).xyz;Tangent_Length_Q329=length(Tangent_World_Q329);Tangent_World_N_Q329=Tangent_World_Q329/Tangent_Length_Q329;vec3 Binormal_World_Q330;vec3 Binormal_World_N_Q330;float Binormal_Length_Q330;Object_To_World_Dir_B330(vec3(0,1,0),Binormal_World_Q330,Binormal_World_N_Q330,Binormal_Length_Q330);float Radius_Q341;float Line_Width_Q341;RelativeOrAbsoluteDetail_B341(_Radius_,_Line_Width_,_Absolute_Sizes_,Binormal_Length_Q330,Radius_Q341,Line_Width_Q341);vec3 Dir_Q334;PickDir_B334(_Angle_,Tangent_World_N_Q329,Binormal_World_N_Q330,Dir_Q334);float Result_Q336;Pick_Radius_B336(Radius_Q341,_Radius_Top_Left_,_Radius_Top_Right_,_Radius_Bottom_Left_,_Radius_Bottom_Right_,position,Result_Q336);float Anisotropy_Q331=Tangent_Length_Q329/Binormal_Length_Q330;vec4 Out_Color_Q337=vec4(Result_Q336,Line_Width_Q341,0,1);vec3 New_P_Q327;vec2 New_UV_Q327;float Radial_Gradient_Q327;vec3 Radial_Dir_Q327;Move_Verts_B327(Anisotropy_Q331,position,Result_Q336,New_P_Q327,New_UV_Q327,Radial_Gradient_Q327,Radial_Dir_Q327);vec3 Pos_World_Q314;Object_To_World_Pos_B314(New_P_Q327,Pos_World_Q314);float Gradient1_Q328;float Gradient2_Q328;\n#if SMOOTH_EDGES\nEdge_AA_Vertex_B328(Pos_World_Q314,position,normal,cameraPosition,Radial_Gradient_Q327,Radial_Dir_Q327,tangent,Gradient1_Q328,Gradient2_Q328);\n#else\nGradient1_Q328=1.0;Gradient2_Q328=1.0;\n#endif\nvec2 Rect_UV_Q357;vec4 Rect_Parms_Q357;vec2 Scale_XY_Q357;vec2 Line_UV_Q357;vec2 Color_UV_Info_Q357;Round_Rect_Vertex_B357(New_UV_Q327,Result_Q336,0.0,Anisotropy_Q331,Gradient1_Q328,Gradient2_Q328,normal,vec4(1,1,0,0),Rect_UV_Q357,Rect_Parms_Q357,Scale_XY_Q357,Line_UV_Q357,Color_UV_Info_Q357);vec3 Line_Vertex_Q333;Line_Vertex_B333(Scale_XY_Q357,Line_UV_Q357,(20.0),_Rate_,_Highlight_Transform_,Line_Vertex_Q333);float X_Q359;float Y_Q359;X_Q359=Color_UV_Info_Q357.x;Y_Q359=Color_UV_Info_Q357.y;vec4 Vec4_Q358=vec4(X_Q359,Y_Q359,Result_Q336,Line_Width_Q341);vec3 Position=Pos_World_Q314;vec3 Normal=Nrm_World_Q326;vec2 UV=Rect_UV_Q357;vec3 Tangent=Line_Vertex_Q333;vec3 Binormal=Dir_Q334;vec4 Color=Out_Color_Q337;vec4 Extra1=Rect_Parms_Q357;vec4 Extra2=Vec4_Q358;vec4 Extra3=vec4(0,0,0,0);gl_Position=viewProjection*vec4(Position,1);vPosition=Position;vNormal=Normal;vUV=UV;vTangent=Tangent;vBinormal=Binormal;vExtra1=Extra1;vExtra2=Extra2;}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const mrdlBackplateVertexShader = { name, shader };\n//# sourceMappingURL=mrdlBackplate.vertex.js.map","import { __decorate } from \"@babylonjs/core/tslib.es6.js\";\nimport { SerializationHelper, serialize } from \"@babylonjs/core/Misc/decorators.js\";\nimport { Vector4 } from \"@babylonjs/core/Maths/math.vector.js\";\nimport { Texture } from \"@babylonjs/core/Materials/Textures/texture.js\";\nimport { MaterialDefines } from \"@babylonjs/core/Materials/materialDefines.js\";\nimport { MaterialHelper } from \"@babylonjs/core/Materials/materialHelper.js\";\nimport { PushMaterial } from \"@babylonjs/core/Materials/pushMaterial.js\";\nimport { VertexBuffer } from \"@babylonjs/core/Buffers/buffer.js\";\nimport { RegisterClass } from \"@babylonjs/core/Misc/typeStore.js\";\nimport { Color4 } from \"@babylonjs/core/Maths/math.color.js\";\nimport { EffectFallbacks } from \"@babylonjs/core/Materials/effectFallbacks.js\";\nimport { Constants } from \"@babylonjs/core/Engines/constants.js\";\nimport \"./shaders/mrdlBackplate.fragment.js\";\nimport \"./shaders/mrdlBackplate.vertex.js\";\n/** @internal */\nclass MRDLBackplateMaterialDefines extends MaterialDefines {\n constructor() {\n super();\n /*\n \"IRIDESCENCE_ENABLE\", \"SMOOTH_EDGES\"\n */\n this.IRIDESCENCE_ENABLE = true;\n this.SMOOTH_EDGES = true;\n this._needNormals = true;\n this.rebuild();\n }\n}\n/**\n * Class used to render backplate material with MRDL\n */\nexport class MRDLBackplateMaterial extends PushMaterial {\n constructor(name, scene) {\n super(name, scene);\n /**\n * Gets or sets the corner radius on the backplate. If this value is changed, update the lineWidth to match.\n */\n this.radius = 0.3;\n /**\n * Gets or sets the line width of the backplate.\n */\n this.lineWidth = 0.003;\n /**\n * Gets or sets whether to use absolute sizes when calculating effects on the backplate.\n * Since desktop and VR/AR have different relative sizes, it's usually best to keep this false.\n */\n this.absoluteSizes = false;\n /** @internal */\n this._filterWidth = 1;\n /**\n * Gets or sets the base color of the backplate.\n */\n this.baseColor = new Color4(0, 0, 0, 1);\n /**\n * Gets or sets the line color of the backplate.\n */\n this.lineColor = new Color4(0.2, 0.262745, 0.4, 1);\n /**\n * Gets or sets the top left Radii Multiplier.\n */\n this.radiusTopLeft = 1.0;\n /**\n * Gets or sets the top left Radii Multiplier.\n */\n this.radiusTopRight = 1.0;\n /**\n * Gets or sets the top left Radii Multiplier.\n */\n this.radiusBottomLeft = 1.0;\n /**\n * Gets or sets the top left Radii Multiplier.\n */\n this.radiusBottomRight = 1.0;\n /** @internal */\n this._rate = 0;\n /**\n * Gets or sets the color of the highlights on the backplate line.\n */\n this.highlightColor = new Color4(0.239216, 0.435294, 0.827451, 1);\n /**\n * Gets or sets the width of the highlights on the backplate line.\n */\n this.highlightWidth = 0;\n /** @internal */\n this._highlightTransform = new Vector4(1, 1, 0, 0);\n /** @internal */\n this._highlight = 1;\n /**\n * Gets or sets the intensity of the iridescence effect.\n */\n this.iridescenceIntensity = 0.45;\n /**\n * Gets or sets the intensity of the iridescence effect on the backplate edges.\n */\n this.iridescenceEdgeIntensity = 1;\n /**\n * Gets or sets the Tint of the iridescence effect on the backplate.\n */\n this.iridescenceTint = new Color4(1, 1, 1, 1);\n /** @internal */\n this._angle = -45;\n /**\n * Gets or sets the opacity of the backplate (0.0 - 1.0).\n */\n this.fadeOut = 1;\n /** @internal */\n this._reflected = true;\n /** @internal */\n this._frequency = 1;\n /** @internal */\n this._verticalOffset = 0;\n /**\n * Gets or sets the gradient color effect on the backplate.\n */\n this.gradientColor = new Color4(0.74902, 0.74902, 0.74902, 1);\n /**\n * Gets or sets the top left gradient color effect on the backplate.\n */\n this.topLeftGradientColor = new Color4(0.00784314, 0.294118, 0.580392, 1);\n /**\n * Gets or sets the top right gradient color effect on the backplate.\n */\n this.topRightGradientColor = new Color4(0.305882, 0, 1, 1);\n /**\n * Gets or sets the bottom left gradient color effect on the backplate.\n */\n this.bottomLeftGradientColor = new Color4(0.133333, 0.258824, 0.992157, 1);\n /**\n * Gets or sets the bottom right gradient color effect on the backplate.\n */\n this.bottomRightGradientColor = new Color4(0.176471, 0.176471, 0.619608, 1);\n /**\n * Gets or sets the edge width of the backplate.\n */\n this.edgeWidth = 0.5;\n /**\n * Gets or sets the edge width of the backplate.\n */\n this.edgePower = 1;\n /**\n * Gets or sets the edge width of the backplate.\n */\n this.edgeLineGradientBlend = 0.5;\n this.alphaMode = Constants.ALPHA_DISABLE;\n this.backFaceCulling = false;\n this._iridescentMapTexture = new Texture(MRDLBackplateMaterial.IRIDESCENT_MAP_TEXTURE_URL, this.getScene(), true, false, Texture.NEAREST_SAMPLINGMODE);\n }\n needAlphaBlending() {\n return false;\n }\n needAlphaTesting() {\n return false;\n }\n getAlphaTestTexture() {\n return null;\n }\n // Methods\n isReadyForSubMesh(mesh, subMesh) {\n if (this.isFrozen) {\n if (subMesh.effect && subMesh.effect._wasPreviouslyReady) {\n return true;\n }\n }\n if (!subMesh.materialDefines) {\n subMesh.materialDefines = new MRDLBackplateMaterialDefines();\n }\n const defines = subMesh.materialDefines;\n const scene = this.getScene();\n if (this._isReadyForSubMesh(subMesh)) {\n return true;\n }\n const engine = scene.getEngine();\n // Attribs\n MaterialHelper.PrepareDefinesForAttributes(mesh, defines, false, false);\n // Get correct effect\n if (defines.isDirty) {\n defines.markAsProcessed();\n scene.resetCachedMaterial();\n // Fallbacks\n const fallbacks = new EffectFallbacks();\n if (defines.FOG) {\n fallbacks.addFallback(1, \"FOG\");\n }\n MaterialHelper.HandleFallbacksForShadows(defines, fallbacks);\n defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess;\n //Attributes\n const attribs = [VertexBuffer.PositionKind];\n if (defines.NORMAL) {\n attribs.push(VertexBuffer.NormalKind);\n }\n if (defines.UV1) {\n attribs.push(VertexBuffer.UVKind);\n }\n if (defines.UV2) {\n attribs.push(VertexBuffer.UV2Kind);\n }\n if (defines.VERTEXCOLOR) {\n attribs.push(VertexBuffer.ColorKind);\n }\n if (defines.TANGENT) {\n attribs.push(VertexBuffer.TangentKind);\n }\n MaterialHelper.PrepareAttributesForInstances(attribs, defines);\n // Legacy browser patch\n const shaderName = \"mrdlBackplate\";\n const join = defines.toString();\n const uniforms = [\n \"world\",\n \"viewProjection\",\n \"cameraPosition\",\n \"_Radius_\",\n \"_Line_Width_\",\n \"_Absolute_Sizes_\",\n \"_Filter_Width_\",\n \"_Base_Color_\",\n \"_Line_Color_\",\n \"_Radius_Top_Left_\",\n \"_Radius_Top_Right_\",\n \"_Radius_Bottom_Left_\",\n \"_Radius_Bottom_Right_\",\n \"_Rate_\",\n \"_Highlight_Color_\",\n \"_Highlight_Width_\",\n \"_Highlight_Transform_\",\n \"_Highlight_\",\n \"_Iridescence_Intensity_\",\n \"_Iridescence_Edge_Intensity_\",\n \"_Iridescence_Tint_\",\n \"_Iridescent_Map_\",\n \"_Angle_\",\n \"_Reflected_\",\n \"_Frequency_\",\n \"_Vertical_Offset_\",\n \"_Gradient_Color_\",\n \"_Top_Left_\",\n \"_Top_Right_\",\n \"_Bottom_Left_\",\n \"_Bottom_Right_\",\n \"_Edge_Width_\",\n \"_Edge_Power_\",\n \"_Line_Gradient_Blend_\",\n \"_Fade_Out_\",\n ];\n const samplers = [\"_Iridescent_Map_\"];\n const uniformBuffers = [];\n MaterialHelper.PrepareUniformsAndSamplersList({\n uniformsNames: uniforms,\n uniformBuffersNames: uniformBuffers,\n samplers: samplers,\n defines: defines,\n maxSimultaneousLights: 4,\n });\n subMesh.setEffect(scene.getEngine().createEffect(shaderName, {\n attributes: attribs,\n uniformsNames: uniforms,\n uniformBuffersNames: uniformBuffers,\n samplers: samplers,\n defines: join,\n fallbacks: fallbacks,\n onCompiled: this.onCompiled,\n onError: this.onError,\n indexParameters: { maxSimultaneousLights: 4 },\n }, engine), defines);\n }\n if (!subMesh.effect || !subMesh.effect.isReady()) {\n return false;\n }\n defines._renderId = scene.getRenderId();\n subMesh.effect._wasPreviouslyReady = true;\n return true;\n }\n bindForSubMesh(world, mesh, subMesh) {\n const defines = subMesh.materialDefines;\n if (!defines) {\n return;\n }\n const effect = subMesh.effect;\n if (!effect) {\n return;\n }\n this._activeEffect = effect;\n // Matrices\n this.bindOnlyWorldMatrix(world);\n this._activeEffect.setMatrix(\"viewProjection\", this.getScene().getTransformMatrix());\n this._activeEffect.setVector3(\"cameraPosition\", this.getScene().activeCamera.position);\n // \"Round Rect\"\n this._activeEffect.setFloat(\"_Radius_\", this.radius);\n this._activeEffect.setFloat(\"_Line_Width_\", this.lineWidth);\n this._activeEffect.setFloat(\"_Absolute_Sizes_\", this.absoluteSizes ? 1.0 : 0.0);\n this._activeEffect.setFloat(\"_Filter_Width_\", this._filterWidth);\n this._activeEffect.setDirectColor4(\"_Base_Color_\", this.baseColor);\n this._activeEffect.setDirectColor4(\"_Line_Color_\", this.lineColor);\n // \"Radii Multipliers\"\n this._activeEffect.setFloat(\"_Radius_Top_Left_\", this.radiusTopLeft);\n this._activeEffect.setFloat(\"_Radius_Top_Right_\", this.radiusTopRight);\n this._activeEffect.setFloat(\"_Radius_Bottom_Left_\", this.radiusBottomLeft);\n this._activeEffect.setFloat(\"_Radius_Bottom_Right_\", this.radiusBottomRight);\n // \"Line Highlight\"\n this._activeEffect.setFloat(\"_Rate_\", this._rate);\n this._activeEffect.setDirectColor4(\"_Highlight_Color_\", this.highlightColor);\n this._activeEffect.setFloat(\"_Highlight_Width_\", this.highlightWidth);\n this._activeEffect.setVector4(\"_Highlight_Transform_\", this._highlightTransform);\n this._activeEffect.setFloat(\"_Highlight_\", this._highlight);\n // \"Iridescence\"\n //define IRIDESCENCE_ENABLE true;\n this._activeEffect.setFloat(\"_Iridescence_Intensity_\", this.iridescenceIntensity);\n this._activeEffect.setFloat(\"_Iridescence_Edge_Intensity_\", this.iridescenceEdgeIntensity);\n this._activeEffect.setDirectColor4(\"_Iridescence_Tint_\", this.iridescenceTint);\n this._activeEffect.setTexture(\"_Iridescent_Map_\", this._iridescentMapTexture);\n this._activeEffect.setFloat(\"_Angle_\", this._angle);\n this._activeEffect.setFloat(\"_Reflected_\", this._reflected ? 1.0 : 0.0);\n this._activeEffect.setFloat(\"_Frequency_\", this._frequency);\n this._activeEffect.setFloat(\"_Vertical_Offset_\", this._verticalOffset);\n // \"Gradient\"\n this._activeEffect.setDirectColor4(\"_Gradient_Color_\", this.gradientColor);\n this._activeEffect.setDirectColor4(\"_Top_Left_\", this.topLeftGradientColor);\n this._activeEffect.setDirectColor4(\"_Top_Right_\", this.topRightGradientColor);\n this._activeEffect.setDirectColor4(\"_Bottom_Left_\", this.bottomLeftGradientColor);\n this._activeEffect.setDirectColor4(\"_Bottom_Right_\", this.bottomRightGradientColor);\n //define EDGE_ONLY false;\n this._activeEffect.setFloat(\"_Edge_Width_\", this.edgeWidth);\n this._activeEffect.setFloat(\"_Edge_Power_\", this.edgePower);\n this._activeEffect.setFloat(\"_Line_Gradient_Blend_\", this.edgeLineGradientBlend);\n // \"Fade\"\n this._activeEffect.setFloat(\"_Fade_Out_\", this.fadeOut);\n // \"Antialiasing\"\n //define SMOOTH_EDGES true;\n this._afterBind(mesh, this._activeEffect);\n }\n /**\n * Get the list of animatables in the material.\n * @returns the list of animatables object used in the material\n */\n getAnimatables() {\n return [];\n }\n dispose(forceDisposeEffect) {\n super.dispose(forceDisposeEffect);\n }\n clone(name) {\n return SerializationHelper.Clone(() => new MRDLBackplateMaterial(name, this.getScene()), this);\n }\n serialize() {\n const serializationObject = super.serialize();\n serializationObject.customType = \"BABYLON.MRDLBackplateMaterial\";\n return serializationObject;\n }\n getClassName() {\n return \"MRDLBackplateMaterial\";\n }\n // Statics\n static Parse(source, scene, rootUrl) {\n return SerializationHelper.Parse(() => new MRDLBackplateMaterial(source.name, scene), source, scene, rootUrl);\n }\n}\n/**\n * URL pointing to the texture used to define the coloring for the Iridescent Map effect.\n */\nMRDLBackplateMaterial.IRIDESCENT_MAP_TEXTURE_URL = \"https://assets.babylonjs.com/meshes/MRTK/MRDL/mrtk-mrdl-backplate-iridescence.png\";\n__decorate([\n serialize()\n], MRDLBackplateMaterial.prototype, \"radius\", void 0);\n__decorate([\n serialize()\n], MRDLBackplateMaterial.prototype, \"lineWidth\", void 0);\n__decorate([\n serialize()\n], MRDLBackplateMaterial.prototype, \"absoluteSizes\", void 0);\n__decorate([\n serialize()\n], MRDLBackplateMaterial.prototype, \"baseColor\", void 0);\n__decorate([\n serialize()\n], MRDLBackplateMaterial.prototype, \"lineColor\", void 0);\n__decorate([\n serialize()\n], MRDLBackplateMaterial.prototype, \"radiusTopLeft\", void 0);\n__decorate([\n serialize()\n], MRDLBackplateMaterial.prototype, \"radiusTopRight\", void 0);\n__decorate([\n serialize()\n], MRDLBackplateMaterial.prototype, \"radiusBottomLeft\", void 0);\n__decorate([\n serialize()\n], MRDLBackplateMaterial.prototype, \"radiusBottomRight\", void 0);\n__decorate([\n serialize()\n], MRDLBackplateMaterial.prototype, \"highlightColor\", void 0);\n__decorate([\n serialize()\n], MRDLBackplateMaterial.prototype, \"highlightWidth\", void 0);\n__decorate([\n serialize()\n], MRDLBackplateMaterial.prototype, \"iridescenceIntensity\", void 0);\n__decorate([\n serialize()\n], MRDLBackplateMaterial.prototype, \"iridescenceEdgeIntensity\", void 0);\n__decorate([\n serialize()\n], MRDLBackplateMaterial.prototype, \"iridescenceTint\", void 0);\n__decorate([\n serialize()\n], MRDLBackplateMaterial.prototype, \"fadeOut\", void 0);\n__decorate([\n serialize()\n], MRDLBackplateMaterial.prototype, \"gradientColor\", void 0);\n__decorate([\n serialize()\n], MRDLBackplateMaterial.prototype, \"topLeftGradientColor\", void 0);\n__decorate([\n serialize()\n], MRDLBackplateMaterial.prototype, \"topRightGradientColor\", void 0);\n__decorate([\n serialize()\n], MRDLBackplateMaterial.prototype, \"bottomLeftGradientColor\", void 0);\n__decorate([\n serialize()\n], MRDLBackplateMaterial.prototype, \"bottomRightGradientColor\", void 0);\n__decorate([\n serialize()\n], MRDLBackplateMaterial.prototype, \"edgeWidth\", void 0);\n__decorate([\n serialize()\n], MRDLBackplateMaterial.prototype, \"edgePower\", void 0);\n__decorate([\n serialize()\n], MRDLBackplateMaterial.prototype, \"edgeLineGradientBlend\", void 0);\nRegisterClass(\"BABYLON.GUI.MRDLBackplateMaterial\", MRDLBackplateMaterial);\n//# sourceMappingURL=mrdlBackplateMaterial.js.map","import { Observable } from \"@babylonjs/core/Misc/observable.js\";\nimport { Vector3 } from \"@babylonjs/core/Maths/math.vector.js\";\nimport { Control3D } from \"./control3D.js\";\nimport { CreateBox } from \"@babylonjs/core/Meshes/Builders/boxBuilder.js\";\nimport { PointerDragBehavior } from \"@babylonjs/core/Behaviors/Meshes/pointerDragBehavior.js\";\nimport { SceneLoader } from \"@babylonjs/core/Loading/sceneLoader.js\";\nimport { MRDLSliderBarMaterial } from \"../materials/mrdl/mrdlSliderBarMaterial.js\";\nimport { MRDLSliderThumbMaterial } from \"../materials/mrdl/mrdlSliderThumbMaterial.js\";\nimport { MRDLBackplateMaterial } from \"../materials/mrdl/mrdlBackplateMaterial.js\";\nconst SLIDER_MIN = 0;\nconst SLIDER_MAX = 100;\nconst SLIDER_VAL = 50;\nconst SLIDER_STEP = 0;\nconst SLIDER_SCALING = 1.0;\nconst SLIDER_MARGIN = 0.2;\n/**\n * Class used to create a slider in 3D\n */\nexport class Slider3D extends Control3D {\n /**\n * Creates a new slider\n * @param name defines the control name\n * @param sliderBackplateVisible defines if the control has a backplate, default is false\n */\n constructor(name, sliderBackplateVisible) {\n super(name);\n /** Observable raised when the sldier value changes */\n this.onValueChangedObservable = new Observable();\n this._sliderBackplateVisible = sliderBackplateVisible || false;\n this._minimum = SLIDER_MIN;\n this._maximum = SLIDER_MAX;\n this._step = SLIDER_STEP;\n this._value = SLIDER_VAL;\n }\n /**\n * Gets the mesh used to render this control\n */\n get mesh() {\n if (this.node) {\n return this._sliderThumb;\n }\n return null;\n }\n /** Gets or sets minimum value */\n get minimum() {\n return this._minimum;\n }\n set minimum(value) {\n if (this._minimum === value) {\n return;\n }\n this._minimum = Math.max(value, SLIDER_MIN);\n this._value = Math.max(Math.min(this._value, this._maximum), this._minimum);\n }\n /** Gets or sets maximum value */\n get maximum() {\n return this._maximum;\n }\n set maximum(value) {\n if (this._maximum === value) {\n return;\n }\n this._maximum = Math.max(value, this._minimum);\n this._value = Math.max(Math.min(this._value, this._maximum), this._minimum);\n }\n /** Gets or sets step value */\n get step() {\n return this._step;\n }\n set step(value) {\n if (this._step === value) {\n return;\n }\n this._step = Math.max(Math.min(value, this._maximum - this._minimum), SLIDER_STEP);\n }\n /** Gets or sets current value */\n get value() {\n return this._value;\n }\n set value(value) {\n if (this._value === value) {\n return;\n }\n this._value = Math.max(Math.min(value, this._maximum), this._minimum);\n if (this._sliderThumb) {\n this._sliderThumb.position.x = this._convertToPosition(this.value);\n }\n this.onValueChangedObservable.notifyObservers(this._value);\n }\n get start() {\n if (!this.node) {\n return -SLIDER_SCALING / 2;\n }\n return this._sliderBar.position.x - this._sliderBar.scaling.x / 2;\n }\n get end() {\n if (!this.node) {\n return SLIDER_SCALING / 2;\n }\n return this._sliderBar.position.x + this._sliderBar.scaling.x / 2;\n }\n /**\n * Gets the slider bar material used by this control\n */\n get sliderBarMaterial() {\n return this._sliderBarMaterial;\n }\n /**\n * Gets the slider thumb material used by this control\n */\n get sliderThumbMaterial() {\n return this._sliderThumbMaterial;\n }\n /**\n * Gets the slider backplate material used by this control\n */\n get sliderBackplateMaterial() {\n return this._sliderBackplateMaterial;\n }\n /** Sets a boolean indicating if the control is visible */\n set isVisible(value) {\n var _a;\n if (this._isVisible === value) {\n return;\n }\n this._isVisible = value;\n (_a = this.node) === null || _a === void 0 ? void 0 : _a.setEnabled(value);\n }\n // Mesh association\n _createNode(scene) {\n const sliderBackplate = CreateBox(`${this.name}_sliderbackplate`, {\n width: 1.0,\n height: 1.0,\n depth: 1.0,\n }, scene);\n sliderBackplate.isPickable = false;\n sliderBackplate.visibility = 0;\n sliderBackplate.scaling = new Vector3(1, 0.5, 0.8);\n SceneLoader.ImportMeshAsync(undefined, Slider3D.MODEL_BASE_URL, Slider3D.MODEL_FILENAME, scene).then((result) => {\n // make all meshes not pickable. Required meshes' pickable state will be set later.\n result.meshes.forEach((m) => {\n m.isPickable = false;\n });\n const sliderBackplateModel = result.meshes[1];\n const sliderBarModel = result.meshes[1].clone(`${this.name}_sliderbar`, sliderBackplate);\n const sliderThumbModel = result.meshes[1].clone(`${this.name}_sliderthumb`, sliderBackplate);\n sliderBackplateModel.visibility = 0;\n if (this._sliderBackplateVisible) {\n sliderBackplateModel.visibility = 1;\n sliderBackplateModel.name = `${this.name}_sliderbackplate`;\n sliderBackplateModel.scaling.x = 1;\n sliderBackplateModel.scaling.z = 0.2;\n sliderBackplateModel.parent = sliderBackplate;\n if (this._sliderBackplateMaterial) {\n sliderBackplateModel.material = this._sliderBackplateMaterial;\n }\n this._sliderBackplate = sliderBackplateModel;\n }\n if (sliderBarModel) {\n sliderBarModel.parent = sliderBackplate;\n sliderBarModel.position.z = -0.1;\n sliderBarModel.scaling = new Vector3(SLIDER_SCALING - SLIDER_MARGIN, 0.04, 0.3);\n if (this._sliderBarMaterial) {\n sliderBarModel.material = this._sliderBarMaterial;\n }\n this._sliderBar = sliderBarModel;\n }\n if (sliderThumbModel) {\n sliderThumbModel.parent = sliderBackplate;\n sliderThumbModel.isPickable = true;\n sliderThumbModel.position.z = -0.115;\n sliderThumbModel.scaling = new Vector3(0.025, 0.3, 0.6);\n sliderThumbModel.position.x = this._convertToPosition(this.value);\n sliderThumbModel.addBehavior(this._createBehavior());\n if (this._sliderThumbMaterial) {\n sliderThumbModel.material = this._sliderThumbMaterial;\n }\n this._sliderThumb = sliderThumbModel;\n }\n this._injectGUI3DReservedDataStore(sliderBackplate).control = this;\n sliderBackplate.getChildMeshes().forEach((mesh) => {\n this._injectGUI3DReservedDataStore(mesh).control = this;\n });\n });\n this._affectMaterial(sliderBackplate);\n return sliderBackplate;\n }\n _affectMaterial(mesh) {\n var _a, _b, _c;\n this._sliderBackplateMaterial = (_a = this._sliderBackplateMaterial) !== null && _a !== void 0 ? _a : new MRDLBackplateMaterial(`${this.name}_sliderbackplate_material`, mesh.getScene());\n this._sliderBarMaterial = (_b = this._sliderBarMaterial) !== null && _b !== void 0 ? _b : new MRDLSliderBarMaterial(`${this.name}_sliderbar_material`, mesh.getScene());\n this._sliderThumbMaterial = (_c = this._sliderThumbMaterial) !== null && _c !== void 0 ? _c : new MRDLSliderThumbMaterial(`${this.name}_sliderthumb_material`, mesh.getScene());\n }\n _createBehavior() {\n const pointerDragBehavior = new PointerDragBehavior({ dragAxis: Vector3.Right() });\n pointerDragBehavior.moveAttached = false;\n pointerDragBehavior.onDragStartObservable.add(() => {\n this._draggedPosition = this._sliderThumb.position.x;\n });\n pointerDragBehavior.onDragObservable.add((event) => {\n this._draggedPosition += event.dragDistance / this.scaling.x;\n this.value = this._convertToValue(this._draggedPosition);\n });\n return pointerDragBehavior;\n }\n _convertToPosition(value) {\n const position = ((value - this.minimum) / (this.maximum - this.minimum)) * (this.end - this.start) + this.start;\n return Math.min(Math.max(position, this.start), this.end);\n }\n _convertToValue(position) {\n let value = ((position - this.start) / (this.end - this.start)) * (this.maximum - this.minimum);\n value = this.step ? Math.round(value / this.step) * this.step : value;\n return Math.max(Math.min(this.minimum + value, this._maximum), this._minimum);\n }\n /**\n * Releases all associated resources\n */\n dispose() {\n var _a, _b, _c, _d, _e, _f;\n super.dispose();\n (_a = this._sliderBar) === null || _a === void 0 ? void 0 : _a.dispose();\n (_b = this._sliderThumb) === null || _b === void 0 ? void 0 : _b.dispose();\n (_c = this._sliderBarMaterial) === null || _c === void 0 ? void 0 : _c.dispose();\n (_d = this._sliderThumbMaterial) === null || _d === void 0 ? void 0 : _d.dispose();\n (_e = this._sliderBackplate) === null || _e === void 0 ? void 0 : _e.dispose();\n (_f = this._sliderBackplateMaterial) === null || _f === void 0 ? void 0 : _f.dispose();\n }\n}\n/**\n * Base Url for the models.\n */\nSlider3D.MODEL_BASE_URL = \"https://assets.babylonjs.com/meshes/MRTK/\";\n/**\n * File name for the 8x4 model.\n */\nSlider3D.MODEL_FILENAME = \"mrtk-fluent-backplate.glb\";\n//# sourceMappingURL=slider3D.js.map","// Do not edit.\nimport { ShaderStore } from \"@babylonjs/core/Engines/shaderStore.js\";\nconst name = \"mrdlBackglowPixelShader\";\nconst shader = `uniform vec3 cameraPosition;varying vec3 vNormal;varying vec2 vUV;uniform float _Bevel_Radius_;uniform float _Line_Width_;uniform bool _Absolute_Sizes_;uniform float _Tuning_Motion_;uniform float _Motion_;uniform float _Max_Intensity_;uniform float _Intensity_Fade_In_Exponent_;uniform float _Outer_Fuzz_Start_;uniform float _Outer_Fuzz_End_;uniform vec4 _Color_;uniform vec4 _Inner_Color_;uniform float _Blend_Exponent_;uniform float _Falloff_;uniform float _Bias_;float BiasFunc(float b,float v) {return pow(v,log(clamp(b,0.001,0.999))/log(0.5));}\nvoid Fuzzy_Round_Rect_B33(\nfloat Size_X,\nfloat Size_Y,\nfloat Radius_X,\nfloat Radius_Y,\nfloat Line_Width,\nvec2 UV,\nfloat Outer_Fuzz,\nfloat Max_Outer_Fuzz,\nout float Rect_Distance,\nout float Inner_Distance)\n{vec2 halfSize=vec2(Size_X,Size_Y)*0.5;vec2 r=max(min(vec2(Radius_X,Radius_Y),halfSize),vec2(0.001,0.001));float radius=min(r.x,r.y)-Max_Outer_Fuzz;vec2 v=abs(UV);vec2 nearestp=min(v,halfSize-r);float d=distance(nearestp,v);Inner_Distance=clamp(1.0-(radius-d)/Line_Width,0.0,1.0);Rect_Distance=clamp(1.0-(d-radius)/Outer_Fuzz,0.0,1.0)*Inner_Distance;}\nvoid main()\n{float X_Q42;float Y_Q42;X_Q42=vNormal.x;Y_Q42=vNormal.y;float MaxAB_Q24=max(_Tuning_Motion_,_Motion_);float Sqrt_F_Q27=sqrt(MaxAB_Q24);float Power_Q43=pow(MaxAB_Q24,_Intensity_Fade_In_Exponent_);float Value_At_T_Q26=mix(_Outer_Fuzz_Start_,_Outer_Fuzz_End_,Sqrt_F_Q27);float Product_Q23=_Max_Intensity_*Power_Q43;float Rect_Distance_Q33;float Inner_Distance_Q33;Fuzzy_Round_Rect_B33(X_Q42,Y_Q42,_Bevel_Radius_,_Bevel_Radius_,_Line_Width_,vUV,Value_At_T_Q26,_Outer_Fuzz_Start_,Rect_Distance_Q33,Inner_Distance_Q33);float Power_Q44=pow(Inner_Distance_Q33,_Blend_Exponent_);float Result_Q45=pow(BiasFunc(_Bias_,Rect_Distance_Q33),_Falloff_);vec4 Color_At_T_Q25=mix(_Inner_Color_,_Color_,Power_Q44);float Product_Q22=Result_Q45*Product_Q23;vec4 Result_Q28=Product_Q22*Color_At_T_Q25;vec4 Out_Color=Result_Q28;float Clip_Threshold=0.0;gl_FragColor=Out_Color;}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const mrdlBackglowPixelShader = { name, shader };\n//# sourceMappingURL=mrdlBackglow.fragment.js.map","// Do not edit.\nimport { ShaderStore } from \"@babylonjs/core/Engines/shaderStore.js\";\nconst name = \"mrdlBackglowVertexShader\";\nconst shader = `uniform mat4 world;uniform mat4 viewProjection;uniform vec3 cameraPosition;attribute vec3 position;attribute vec3 normal;attribute vec2 uv;attribute vec3 tangent;uniform float _Bevel_Radius_;uniform float _Line_Width_;uniform bool _Absolute_Sizes_;uniform float _Tuning_Motion_;uniform float _Motion_;uniform float _Max_Intensity_;uniform float _Intensity_Fade_In_Exponent_;uniform float _Outer_Fuzz_Start_;uniform float _Outer_Fuzz_End_;uniform vec4 _Color_;uniform vec4 _Inner_Color_;uniform float _Blend_Exponent_;uniform float _Falloff_;uniform float _Bias_;varying vec3 vNormal;varying vec2 vUV;void main()\n{vec3 Dir_World_Q41=(world*vec4(tangent,0.0)).xyz;vec3 Dir_World_Q40=(world*vec4((cross(normal,tangent)),0.0)).xyz;float MaxAB_Q24=max(_Tuning_Motion_,_Motion_);float Length_Q16=length(Dir_World_Q41);float Length_Q17=length(Dir_World_Q40);bool Greater_Than_Q37=MaxAB_Q24>0.0;vec3 Sizes_Q35;vec2 XY_Q35;Sizes_Q35=(_Absolute_Sizes_ ? vec3(Length_Q16,Length_Q17,0) : vec3(Length_Q16/Length_Q17,1,0));XY_Q35=(uv-vec2(0.5,0.5))*Sizes_Q35.xy;vec3 Result_Q38=Greater_Than_Q37 ? position : vec3(0,0,0);vec3 Pos_World_Q39=(world*vec4(Result_Q38,1.0)).xyz;vec3 Position=Pos_World_Q39;vec3 Normal=Sizes_Q35;vec2 UV=XY_Q35;vec3 Tangent=vec3(0,0,0);vec3 Binormal=vec3(0,0,0);vec4 Color=vec4(1,1,1,1);gl_Position=viewProjection*vec4(Position,1);vNormal=Normal;vUV=UV;}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const mrdlBackglowVertexShader = { name, shader };\n//# sourceMappingURL=mrdlBackglow.vertex.js.map","import { __decorate } from \"@babylonjs/core/tslib.es6.js\";\nimport { Color4 } from \"@babylonjs/core/Maths/math.color.js\";\nimport { Constants } from \"@babylonjs/core/Engines/constants.js\";\nimport { EffectFallbacks } from \"@babylonjs/core/Materials/effectFallbacks.js\";\nimport { MaterialDefines } from \"@babylonjs/core/Materials/materialDefines.js\";\nimport { MaterialHelper } from \"@babylonjs/core/Materials/materialHelper.js\";\nimport { PushMaterial } from \"@babylonjs/core/Materials/pushMaterial.js\";\nimport { RegisterClass } from \"@babylonjs/core/Misc/typeStore.js\";\nimport { SerializationHelper, serialize } from \"@babylonjs/core/Misc/decorators.js\";\nimport { VertexBuffer } from \"@babylonjs/core/Buffers/buffer.js\";\nimport \"./shaders/mrdlBackglow.fragment.js\";\nimport \"./shaders/mrdlBackglow.vertex.js\";\n/** @hidden */\nclass MRDLBackglowMaterialDefines extends MaterialDefines {\n constructor() {\n super();\n this._needNormals = true;\n this._needUVs = true;\n this.rebuild();\n }\n}\nexport class MRDLBackglowMaterial extends PushMaterial {\n constructor(name, scene) {\n super(name, scene);\n /**\n * Gets or sets the bevel radius on the backglow. If this value is changed, update the lineWidth to match.\n */\n this.bevelRadius = 0.16;\n /**\n * Gets or sets the line width of the backglow.\n */\n this.lineWidth = 0.16;\n /**\n * Gets or sets whether to use absolute sizes when calculating effects on the backglow.\n * Since desktop and VR/AR have different relative sizes, it's usually best to keep this false.\n */\n this.absoluteSizes = false;\n /**\n * Gets or sets the tuning motion of the backglow.\n */\n this.tuningMotion = 0.0;\n /**\n * Gets or sets the motion of the backglow.\n */\n this.motion = 1.0;\n /**\n * Gets or sets the maximum intensity of the backglow.\n */\n this.maxIntensity = 0.7;\n /**\n * Gets or sets the fade-in exponent of the intensity of the backglow.\n */\n this.intensityFadeInExponent = 2.0;\n /**\n * Gets or sets the start of the outer fuzz effect on the backglow.\n */\n this.outerFuzzStart = 0.04;\n /**\n * Gets or sets the end of the outer fuzz effect on the backglow.\n */\n this.outerFuzzEnd = 0.04;\n /**\n * Gets or sets the color of the backglow.\n */\n this.color = new Color4(0.682353, 0.698039, 1, 1);\n /**\n * Gets or sets the inner color of the backglow.\n */\n this.innerColor = new Color4(0.356863, 0.392157, 0.796078, 1);\n /**\n * Gets or sets the blend exponent of the backglow.\n */\n this.blendExponent = 1.5;\n /**\n * Gets or sets the falloff of the backglow.\n */\n this.falloff = 2.0;\n /**\n * Gets or sets the bias of the backglow.\n */\n this.bias = 0.5;\n this.alphaMode = Constants.ALPHA_ADD;\n this.disableDepthWrite = true;\n this.backFaceCulling = false;\n }\n needAlphaBlending() {\n return true;\n }\n needAlphaTesting() {\n return false;\n }\n getAlphaTestTexture() {\n return null;\n }\n // Methods\n isReadyForSubMesh(mesh, subMesh) {\n if (this.isFrozen) {\n if (subMesh.effect && subMesh.effect._wasPreviouslyReady) {\n return true;\n }\n }\n if (!subMesh.materialDefines) {\n subMesh.materialDefines = new MRDLBackglowMaterialDefines();\n }\n const defines = subMesh.materialDefines;\n const scene = this.getScene();\n if (this._isReadyForSubMesh(subMesh)) {\n return true;\n }\n const engine = scene.getEngine();\n // Attribs\n MaterialHelper.PrepareDefinesForAttributes(mesh, defines, false, false);\n // Get correct effect\n if (defines.isDirty) {\n defines.markAsProcessed();\n scene.resetCachedMaterial();\n // Fallbacks\n const fallbacks = new EffectFallbacks();\n if (defines.FOG) {\n fallbacks.addFallback(1, \"FOG\");\n }\n MaterialHelper.HandleFallbacksForShadows(defines, fallbacks);\n defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess;\n //Attributes\n const attribs = [VertexBuffer.PositionKind];\n if (defines.NORMAL) {\n attribs.push(VertexBuffer.NormalKind);\n }\n if (defines.UV1) {\n attribs.push(VertexBuffer.UVKind);\n }\n if (defines.UV2) {\n attribs.push(VertexBuffer.UV2Kind);\n }\n if (defines.VERTEXCOLOR) {\n attribs.push(VertexBuffer.ColorKind);\n }\n if (defines.TANGENT) {\n attribs.push(VertexBuffer.TangentKind);\n }\n MaterialHelper.PrepareAttributesForInstances(attribs, defines);\n // Legacy browser patch\n const shaderName = \"mrdlBackglow\";\n const join = defines.toString();\n const uniforms = [\n \"world\",\n \"worldView\",\n \"worldViewProjection\",\n \"view\",\n \"projection\",\n \"viewProjection\",\n \"cameraPosition\",\n \"_Bevel_Radius_\",\n \"_Line_Width_\",\n \"_Absolute_Sizes_\",\n \"_Tuning_Motion_\",\n \"_Motion_\",\n \"_Max_Intensity_\",\n \"_Intensity_Fade_In_Exponent_\",\n \"_Outer_Fuzz_Start_\",\n \"_Outer_Fuzz_End_\",\n \"_Color_\",\n \"_Inner_Color_\",\n \"_Blend_Exponent_\",\n \"_Falloff_\",\n \"_Bias_\",\n ];\n const samplers = [];\n const uniformBuffers = [];\n MaterialHelper.PrepareUniformsAndSamplersList({\n uniformsNames: uniforms,\n uniformBuffersNames: uniformBuffers,\n samplers: samplers,\n defines: defines,\n maxSimultaneousLights: 4,\n });\n subMesh.setEffect(scene.getEngine().createEffect(shaderName, {\n attributes: attribs,\n uniformsNames: uniforms,\n uniformBuffersNames: uniformBuffers,\n samplers: samplers,\n defines: join,\n fallbacks: fallbacks,\n onCompiled: this.onCompiled,\n onError: this.onError,\n indexParameters: { maxSimultaneousLights: 4 },\n }, engine), defines);\n }\n if (!subMesh.effect || !subMesh.effect.isReady()) {\n return false;\n }\n defines._renderId = scene.getRenderId();\n subMesh.effect._wasPreviouslyReady = true;\n return true;\n }\n bindForSubMesh(world, mesh, subMesh) {\n const scene = this.getScene();\n const defines = subMesh.materialDefines;\n if (!defines) {\n return;\n }\n const effect = subMesh.effect;\n if (!effect) {\n return;\n }\n this._activeEffect = effect;\n // Matrices\n this.bindOnlyWorldMatrix(world);\n this._activeEffect.setMatrix(\"viewProjection\", scene.getTransformMatrix());\n this._activeEffect.setVector3(\"cameraPosition\", scene.activeCamera.position);\n // \"Rounded Rectangle\"\n this._activeEffect.setFloat(\"_Bevel_Radius_\", this.bevelRadius);\n this._activeEffect.setFloat(\"_Line_Width_\", this.lineWidth);\n this._activeEffect.setFloat(\"_Absolute_Sizes_\", this.absoluteSizes ? 1.0 : 0.0);\n // \"Animation\"\n this._activeEffect.setFloat(\"_Tuning_Motion_\", this.tuningMotion);\n this._activeEffect.setFloat(\"_Motion_\", this.motion);\n this._activeEffect.setFloat(\"_Max_Intensity_\", this.maxIntensity);\n this._activeEffect.setFloat(\"_Intensity_Fade_In_Exponent_\", this.intensityFadeInExponent);\n this._activeEffect.setFloat(\"_Outer_Fuzz_Start_\", this.outerFuzzStart);\n this._activeEffect.setFloat(\"_Outer_Fuzz_End_\", this.outerFuzzEnd);\n // \"Color\"\n this._activeEffect.setDirectColor4(\"_Color_\", this.color);\n this._activeEffect.setDirectColor4(\"_Inner_Color_\", this.innerColor);\n this._activeEffect.setFloat(\"_Blend_Exponent_\", this.blendExponent);\n // \"Inner Transition\"\n this._activeEffect.setFloat(\"_Falloff_\", this.falloff);\n this._activeEffect.setFloat(\"_Bias_\", this.bias);\n this._afterBind(mesh, this._activeEffect);\n }\n /**\n * Get the list of animatables in the material.\n * @returns the list of animatables object used in the material\n */\n getAnimatables() {\n return [];\n }\n dispose(forceDisposeEffect) {\n super.dispose(forceDisposeEffect);\n }\n clone(name) {\n return SerializationHelper.Clone(() => new MRDLBackglowMaterial(name, this.getScene()), this);\n }\n serialize() {\n const serializationObject = SerializationHelper.Serialize(this);\n serializationObject.customType = \"BABYLON.MRDLBackglowMaterial\";\n return serializationObject;\n }\n getClassName() {\n return \"MRDLBackglowMaterial\";\n }\n // Statics\n static Parse(source, scene, rootUrl) {\n return SerializationHelper.Parse(() => new MRDLBackglowMaterial(source.name, scene), source, scene, rootUrl);\n }\n}\n__decorate([\n serialize()\n], MRDLBackglowMaterial.prototype, \"bevelRadius\", void 0);\n__decorate([\n serialize()\n], MRDLBackglowMaterial.prototype, \"lineWidth\", void 0);\n__decorate([\n serialize()\n], MRDLBackglowMaterial.prototype, \"absoluteSizes\", void 0);\n__decorate([\n serialize()\n], MRDLBackglowMaterial.prototype, \"tuningMotion\", void 0);\n__decorate([\n serialize()\n], MRDLBackglowMaterial.prototype, \"motion\", void 0);\n__decorate([\n serialize()\n], MRDLBackglowMaterial.prototype, \"maxIntensity\", void 0);\n__decorate([\n serialize()\n], MRDLBackglowMaterial.prototype, \"intensityFadeInExponent\", void 0);\n__decorate([\n serialize()\n], MRDLBackglowMaterial.prototype, \"outerFuzzStart\", void 0);\n__decorate([\n serialize()\n], MRDLBackglowMaterial.prototype, \"outerFuzzEnd\", void 0);\n__decorate([\n serialize()\n], MRDLBackglowMaterial.prototype, \"color\", void 0);\n__decorate([\n serialize()\n], MRDLBackglowMaterial.prototype, \"innerColor\", void 0);\n__decorate([\n serialize()\n], MRDLBackglowMaterial.prototype, \"blendExponent\", void 0);\n__decorate([\n serialize()\n], MRDLBackglowMaterial.prototype, \"falloff\", void 0);\n__decorate([\n serialize()\n], MRDLBackglowMaterial.prototype, \"bias\", void 0);\nRegisterClass(\"BABYLON.GUI.MRDLBackglowMaterial\", MRDLBackglowMaterial);\n//# sourceMappingURL=mrdlBackglowMaterial.js.map","// Do not edit.\nimport { ShaderStore } from \"@babylonjs/core/Engines/shaderStore.js\";\nconst name = \"mrdlFrontplatePixelShader\";\nconst shader = `uniform vec3 cameraPosition;varying vec3 vNormal;varying vec2 vUV;varying vec3 vTangent;varying vec4 vExtra1;varying vec4 vExtra2;varying vec4 vExtra3;uniform float _Radius_;uniform float _Line_Width_;uniform bool _Relative_To_Height_;uniform float _Filter_Width_;uniform vec4 _Edge_Color_;uniform float _Fade_Out_;uniform bool _Smooth_Edges_;uniform bool _Blob_Enable_;uniform vec3 _Blob_Position_;uniform float _Blob_Intensity_;uniform float _Blob_Near_Size_;uniform float _Blob_Far_Size_;uniform float _Blob_Near_Distance_;uniform float _Blob_Far_Distance_;uniform float _Blob_Fade_Length_;uniform float _Blob_Inner_Fade_;uniform float _Blob_Pulse_;uniform float _Blob_Fade_;uniform float _Blob_Pulse_Max_Size_;uniform bool _Blob_Enable_2_;uniform vec3 _Blob_Position_2_;uniform float _Blob_Near_Size_2_;uniform float _Blob_Inner_Fade_2_;uniform float _Blob_Pulse_2_;uniform float _Blob_Fade_2_;uniform float _Gaze_Intensity_;uniform float _Gaze_Focus_;uniform sampler2D _Blob_Texture_;uniform float _Selection_Fuzz_;uniform float _Selected_;uniform float _Selection_Fade_;uniform float _Selection_Fade_Size_;uniform float _Selected_Distance_;uniform float _Selected_Fade_Length_;uniform float _Proximity_Max_Intensity_;uniform float _Proximity_Far_Distance_;uniform float _Proximity_Near_Radius_;uniform float _Proximity_Anisotropy_;uniform bool _Use_Global_Left_Index_;uniform bool _Use_Global_Right_Index_;uniform vec4 Global_Left_Index_Tip_Position;uniform vec4 Global_Right_Index_Tip_Position;void Scale_Color_B54(\nvec4 Color,\nfloat Scalar,\nout vec4 Result)\n{Result=Scalar*Color;}\nvoid Scale_RGB_B50(\nvec4 Color,\nfloat Scalar,\nout vec4 Result)\n{Result=vec4(Scalar,Scalar,Scalar,1)*Color;}\nvoid Proximity_Fragment_B51(\nfloat Proximity_Max_Intensity,\nfloat Proximity_Near_Radius,\nvec4 Deltas,\nfloat Show_Selection,\nfloat Distance_Fade1,\nfloat Distance_Fade2,\nfloat Strength,\nout float Proximity)\n{float proximity1=(1.0-clamp(length(Deltas.xy)/Proximity_Near_Radius,0.0,1.0))*Distance_Fade1;float proximity2=(1.0-clamp(length(Deltas.zw)/Proximity_Near_Radius,0.0,1.0))*Distance_Fade2;Proximity=Strength*(Proximity_Max_Intensity*max(proximity1,proximity2) *(1.0-Show_Selection)+Show_Selection);}\nvoid Blob_Fragment_B56(\nvec2 UV,\nvec3 Blob_Info,\nsampler2D Blob_Texture,\nout vec4 Blob_Color)\n{float k=dot(UV,UV);Blob_Color=Blob_Info.y*texture(Blob_Texture,vec2(vec2(sqrt(k),Blob_Info.x).x,1.0-vec2(sqrt(k),Blob_Info.x).y))*(1.0-clamp(k,0.0,1.0));}\nvoid Round_Rect_Fragment_B61(\nfloat Radius,\nvec4 Line_Color,\nfloat Filter_Width,\nfloat Line_Visibility,\nvec4 Fill_Color,\nbool Smooth_Edges,\nvec4 Rect_Parms,\nout float Inside_Rect)\n{float d=length(max(abs(Rect_Parms.zw)-Rect_Parms.xy,0.0));float dx=max(fwidth(d)*Filter_Width,0.00001);Inside_Rect=Smooth_Edges ? clamp((Radius-d)/dx,0.0,1.0) : 1.0-step(Radius,d);}\nvoid main()\n{float Is_Quad_Q53;Is_Quad_Q53=vNormal.z;vec4 Blob_Color_Q56;Blob_Fragment_B56(vUV,vTangent,_Blob_Texture_,Blob_Color_Q56);float X_Q52;float Y_Q52;float Z_Q52;float W_Q52;X_Q52=vExtra3.x;Y_Q52=vExtra3.y;Z_Q52=vExtra3.z;W_Q52=vExtra3.w;float Proximity_Q51;Proximity_Fragment_B51(_Proximity_Max_Intensity_,_Proximity_Near_Radius_,vExtra2,X_Q52,Y_Q52,Z_Q52,1.0,Proximity_Q51);float Inside_Rect_Q61;Round_Rect_Fragment_B61(W_Q52,vec4(1,1,1,1),_Filter_Width_,1.0,vec4(0,0,0,0),_Smooth_Edges_,vExtra1,Inside_Rect_Q61);vec4 Result_Q50;Scale_RGB_B50(_Edge_Color_,Proximity_Q51,Result_Q50);vec4 Result_Q47=Inside_Rect_Q61*Blob_Color_Q56;vec4 Color_At_T_Q48=mix(Result_Q50,Result_Q47,Is_Quad_Q53);vec4 Result_Q54;Scale_Color_B54(Color_At_T_Q48,_Fade_Out_,Result_Q54);vec4 Out_Color=Result_Q54;float Clip_Threshold=0.001;bool To_sRGB=false;gl_FragColor=Out_Color;}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const mrdlFrontplatePixelShader = { name, shader };\n//# sourceMappingURL=mrdlFrontplate.fragment.js.map","// Do not edit.\nimport { ShaderStore } from \"@babylonjs/core/Engines/shaderStore.js\";\nconst name = \"mrdlFrontplateVertexShader\";\nconst shader = `uniform mat4 world;uniform mat4 viewProjection;uniform vec3 cameraPosition;attribute vec3 position;attribute vec3 normal;attribute vec2 uv;attribute vec3 tangent;attribute vec4 color;uniform float _Radius_;uniform float _Line_Width_;uniform bool _Relative_To_Height_;uniform float _Filter_Width_;uniform vec4 _Edge_Color_;uniform float _Fade_Out_;uniform bool _Smooth_Edges_;uniform bool _Blob_Enable_;uniform vec3 _Blob_Position_;uniform float _Blob_Intensity_;uniform float _Blob_Near_Size_;uniform float _Blob_Far_Size_;uniform float _Blob_Near_Distance_;uniform float _Blob_Far_Distance_;uniform float _Blob_Fade_Length_;uniform float _Blob_Inner_Fade_;uniform float _Blob_Pulse_;uniform float _Blob_Fade_;uniform float _Blob_Pulse_Max_Size_;uniform bool _Blob_Enable_2_;uniform vec3 _Blob_Position_2_;uniform float _Blob_Near_Size_2_;uniform float _Blob_Inner_Fade_2_;uniform float _Blob_Pulse_2_;uniform float _Blob_Fade_2_;uniform float _Gaze_Intensity_;uniform float _Gaze_Focus_;uniform sampler2D _Blob_Texture_;uniform float _Selection_Fuzz_;uniform float _Selected_;uniform float _Selection_Fade_;uniform float _Selection_Fade_Size_;uniform float _Selected_Distance_;uniform float _Selected_Fade_Length_;uniform float _Proximity_Max_Intensity_;uniform float _Proximity_Far_Distance_;uniform float _Proximity_Near_Radius_;uniform float _Proximity_Anisotropy_;uniform bool _Use_Global_Left_Index_;uniform bool _Use_Global_Right_Index_;uniform vec4 Global_Left_Index_Tip_Position;uniform vec4 Global_Right_Index_Tip_Position;varying vec3 vNormal;varying vec2 vUV;varying vec3 vTangent;varying vec4 vExtra1;varying vec4 vExtra2;varying vec4 vExtra3;void Blob_Vertex_B40(\nvec3 Position,\nvec3 Normal,\nvec3 Tangent,\nvec3 Bitangent,\nvec3 Blob_Position,\nfloat Intensity,\nfloat Blob_Near_Size,\nfloat Blob_Far_Size,\nfloat Blob_Near_Distance,\nfloat Blob_Far_Distance,\nvec4 Vx_Color,\nvec2 UV,\nvec3 Face_Center,\nvec2 Face_Size,\nvec2 In_UV,\nfloat Blob_Fade_Length,\nfloat Selection_Fade,\nfloat Selection_Fade_Size,\nfloat Inner_Fade,\nfloat Blob_Pulse,\nfloat Blob_Fade,\nfloat Blob_Enabled,\nfloat DistanceOffset,\nout vec3 Out_Position,\nout vec2 Out_UV,\nout vec3 Blob_Info,\nout vec2 Blob_Relative_UV)\n{float blobSize,fadeIn;vec3 Hit_Position;Blob_Info=vec3(0.0,0.0,0.0);float Hit_Distance=dot(Blob_Position-Face_Center,Normal)+DistanceOffset*Blob_Far_Distance;Hit_Position=Blob_Position-Hit_Distance*Normal;float absD=abs(Hit_Distance);float lerpVal=clamp((absD-Blob_Near_Distance)/(Blob_Far_Distance-Blob_Near_Distance),0.0,1.0);fadeIn=1.0-clamp((absD-Blob_Far_Distance)/Blob_Fade_Length,0.0,1.0);float innerFade=1.0-clamp(-Hit_Distance/Inner_Fade,0.0,1.0);float farClip=clamp(1.0-step(Blob_Far_Distance+Blob_Fade_Length,absD),0.0,1.0);float size=mix(Blob_Near_Size,Blob_Far_Size,lerpVal)*farClip;blobSize=mix(size,Selection_Fade_Size,Selection_Fade)*innerFade*Blob_Enabled;Blob_Info.x=lerpVal*0.5+0.5;Blob_Info.y=fadeIn*Intensity*(1.0-Selection_Fade)*Blob_Fade;Blob_Info.x*=(1.0-Blob_Pulse);vec3 delta=Hit_Position-Face_Center;vec2 blobCenterXY=vec2(dot(delta,Tangent),dot(delta,Bitangent));vec2 quadUVin=2.0*UV-1.0; \nvec2 blobXY=blobCenterXY+quadUVin*blobSize;vec2 blobClipped=clamp(blobXY,-Face_Size*0.5,Face_Size*0.5);vec2 blobUV=(blobClipped-blobCenterXY)/max(blobSize,0.0001)*2.0;vec3 blobCorner=Face_Center+blobClipped.x*Tangent+blobClipped.y*Bitangent;Out_Position=mix(Position,blobCorner,Vx_Color.rrr);Out_UV=mix(In_UV,blobUV,Vx_Color.rr);Blob_Relative_UV=blobClipped/Face_Size.y;}\nvoid Round_Rect_Vertex_B36(\nvec2 UV,\nvec3 Tangent,\nvec3 Binormal,\nfloat Radius,\nfloat Anisotropy,\nvec2 Blob_Center_UV,\nout vec2 Rect_UV,\nout vec2 Scale_XY,\nout vec4 Rect_Parms)\n{Scale_XY=vec2(Anisotropy,1.0);Rect_UV=(UV-vec2(0.5,0.5))*Scale_XY;Rect_Parms.xy=Scale_XY*0.5-vec2(Radius,Radius);Rect_Parms.zw=Blob_Center_UV;}\nvec2 ProjectProximity(\nvec3 blobPosition,\nvec3 position,\nvec3 center,\nvec3 dir,\nvec3 xdir,\nvec3 ydir,\nout float vdistance\n)\n{vec3 delta=blobPosition-position;vec2 xy=vec2(dot(delta,xdir),dot(delta,ydir));vdistance=abs(dot(delta,dir));return xy;}\nvoid Proximity_Vertex_B33(\nvec3 Blob_Position,\nvec3 Blob_Position_2,\nvec3 Face_Center,\nvec3 Position,\nfloat Proximity_Far_Distance,\nfloat Relative_Scale,\nfloat Proximity_Anisotropy,\nvec3 Normal,\nvec3 Tangent,\nvec3 Binormal,\nout vec4 Extra,\nout float Distance_To_Face,\nout float Distance_Fade1,\nout float Distance_Fade2)\n{float distz1,distz2;Extra.xy=ProjectProximity(Blob_Position,Position,Face_Center,Normal,Tangent*Proximity_Anisotropy,Binormal,distz1)/Relative_Scale;Extra.zw=ProjectProximity(Blob_Position_2,Position,Face_Center,Normal,Tangent*Proximity_Anisotropy,Binormal,distz2)/Relative_Scale;Distance_To_Face=dot(Normal,Position-Face_Center);Distance_Fade1=1.0-clamp(distz1/Proximity_Far_Distance,0.0,1.0);Distance_Fade2=1.0-clamp(distz2/Proximity_Far_Distance,0.0,1.0);}\nvoid Object_To_World_Pos_B12(\nvec3 Pos_Object,\nout vec3 Pos_World)\n{Pos_World=(world*vec4(Pos_Object,1.0)).xyz;}\nvoid Choose_Blob_B27(\nvec4 Vx_Color,\nvec3 Position1,\nvec3 Position2,\nbool Blob_Enable_1,\nbool Blob_Enable_2,\nfloat Near_Size_1,\nfloat Near_Size_2,\nfloat Blob_Inner_Fade_1,\nfloat Blob_Inner_Fade_2,\nfloat Blob_Pulse_1,\nfloat Blob_Pulse_2,\nfloat Blob_Fade_1,\nfloat Blob_Fade_2,\nout vec3 Position,\nout float Near_Size,\nout float Inner_Fade,\nout float Blob_Enable,\nout float Fade,\nout float Pulse)\n{Position=Position1*(1.0-Vx_Color.g)+Vx_Color.g*Position2;float b1=Blob_Enable_1 ? 1.0 : 0.0;float b2=Blob_Enable_2 ? 1.0 : 0.0;Blob_Enable=b1+(b2-b1)*Vx_Color.g;Pulse=Blob_Pulse_1*(1.0-Vx_Color.g)+Vx_Color.g*Blob_Pulse_2;Fade=Blob_Fade_1*(1.0-Vx_Color.g)+Vx_Color.g*Blob_Fade_2;Near_Size=Near_Size_1*(1.0-Vx_Color.g)+Vx_Color.g*Near_Size_2;Inner_Fade=Blob_Inner_Fade_1*(1.0-Vx_Color.g)+Vx_Color.g*Blob_Inner_Fade_2;}\nvoid Move_Verts_B32(\nvec2 UV,\nfloat Radius,\nfloat Anisotropy,\nfloat Line_Width,\nfloat Visible,\nout vec3 New_P,\nout vec2 New_UV)\n{vec2 xy=2.0*UV-vec2(0.5,0.5);vec2 center=clamp(xy,0.0,1.0);vec2 delta=2.0*(xy-center);float deltaLength=length(delta);vec2 aniso=vec2(1.0/Anisotropy,1.0);center=(center-vec2(0.5,0.5))*(1.0-2.0*Radius*aniso);New_UV=vec2((2.0-2.0*deltaLength)*Visible,0.0);float deltaRadius= (Radius-Line_Width*New_UV.x);New_P.xy=(center+deltaRadius/deltaLength *aniso*delta);New_P.z=0.0;}\nvoid Object_To_World_Dir_B14(\nvec3 Dir_Object,\nout vec3 Binormal_World)\n{Binormal_World=(world*vec4(Dir_Object,0.0)).xyz;}\nvoid Proximity_Visibility_B55(\nfloat Selection,\nvec3 Proximity_Center,\nvec3 Proximity_Center_2,\nfloat Proximity_Far_Distance,\nfloat Proximity_Radius,\nvec3 Face_Center,\nvec3 Normal,\nvec2 Face_Size,\nfloat Gaze,\nout float Width)\n{float boxMaxSize=length(Face_Size)*0.5;float d1=dot(Proximity_Center-Face_Center,Normal);vec3 blob1=Proximity_Center-d1*Normal;float d2=dot(Proximity_Center_2-Face_Center,Normal);vec3 blob2=Proximity_Center_2-d2*Normal;vec3 delta1=blob1-Face_Center;vec3 delta2=blob2-Face_Center;float dist1=dot(delta1,delta1);float dist2=dot(delta2,delta2);float nearestProxDist=sqrt(min(dist1,dist2));Width=(1.0-step(boxMaxSize+Proximity_Radius,nearestProxDist))*(1.0-step(Proximity_Far_Distance,min(d1,d2))*(1.0-step(0.0001,Selection)));Width=max(Gaze,Width);}\nvec2 ramp2(vec2 start,vec2 end,vec2 x)\n{return clamp((x-start)/(end-start),vec2(0.0,0.0),vec2(1.0,1.0));}\nfloat computeSelection(\nvec3 blobPosition,\nvec3 normal,\nvec3 tangent,\nvec3 bitangent,\nvec3 faceCenter,\nvec2 faceSize,\nfloat selectionFuzz,\nfloat farDistance,\nfloat fadeLength\n)\n{vec3 delta=blobPosition-faceCenter;float absD=abs(dot(delta,normal));float fadeIn=1.0-clamp((absD-farDistance)/fadeLength,0.0,1.0);vec2 blobCenterXY=vec2(dot(delta,tangent),dot(delta,bitangent));vec2 innerFace=faceSize*(1.0-selectionFuzz)*0.5;vec2 selectPulse=ramp2(-faceSize*0.5,-innerFace,blobCenterXY)-ramp2(innerFace,faceSize*0.5,blobCenterXY);return selectPulse.x*selectPulse.y*fadeIn;}\nvoid Selection_Vertex_B31(\nvec3 Blob_Position,\nvec3 Blob_Position_2,\nvec3 Face_Center,\nvec2 Face_Size,\nvec3 Normal,\nvec3 Tangent,\nvec3 Bitangent,\nfloat Selection_Fuzz,\nfloat Selected,\nfloat Far_Distance,\nfloat Fade_Length,\nvec3 Active_Face_Dir,\nout float Show_Selection)\n{float select1=computeSelection(Blob_Position,Normal,Tangent,Bitangent,Face_Center,Face_Size,Selection_Fuzz,Far_Distance,Fade_Length);float select2=computeSelection(Blob_Position_2,Normal,Tangent,Bitangent,Face_Center,Face_Size,Selection_Fuzz,Far_Distance,Fade_Length);Show_Selection=mix(max(select1,select2),1.0,Selected);}\nvoid main()\n{vec3 Vec3_Q29=vec3(vec2(0,0).x,vec2(0,0).y,color.r);vec3 Nrm_World_Q24;Nrm_World_Q24=normalize((world*vec4(normal,0.0)).xyz);vec3 Face_Center_Q30;Face_Center_Q30=(world*vec4(vec3(0,0,0),1.0)).xyz;vec3 Tangent_World_Q13;Tangent_World_Q13=(world*vec4(tangent,0.0)).xyz;vec3 Result_Q42;Result_Q42=_Use_Global_Left_Index_ ? Global_Left_Index_Tip_Position.xyz : _Blob_Position_;vec3 Result_Q43;Result_Q43=_Use_Global_Right_Index_ ? Global_Right_Index_Tip_Position.xyz : _Blob_Position_2_;float Value_At_T_Q58=mix(_Blob_Near_Size_,_Blob_Pulse_Max_Size_,_Blob_Pulse_);float Value_At_T_Q59=mix(_Blob_Near_Size_2_,_Blob_Pulse_Max_Size_,_Blob_Pulse_2_);vec3 Cross_Q70=cross(normal,tangent);float Product_Q45=_Gaze_Intensity_*_Gaze_Focus_;float Step_Q46=step(0.0001,Product_Q45);vec3 Tangent_World_N_Q15=normalize(Tangent_World_Q13);vec3 Position_Q27;float Near_Size_Q27;float Inner_Fade_Q27;float Blob_Enable_Q27;float Fade_Q27;float Pulse_Q27;Choose_Blob_B27(color,Result_Q42,Result_Q43,_Blob_Enable_,_Blob_Enable_2_,Value_At_T_Q58,Value_At_T_Q59,_Blob_Inner_Fade_,_Blob_Inner_Fade_2_,_Blob_Pulse_,_Blob_Pulse_2_,_Blob_Fade_,_Blob_Fade_2_,Position_Q27,Near_Size_Q27,Inner_Fade_Q27,Blob_Enable_Q27,Fade_Q27,Pulse_Q27);vec3 Binormal_World_Q14;Object_To_World_Dir_B14(Cross_Q70,Binormal_World_Q14);float Anisotropy_Q21=length(Tangent_World_Q13)/length(Binormal_World_Q14);vec3 Binormal_World_N_Q16=normalize(Binormal_World_Q14);vec2 Face_Size_Q35;float ScaleY_Q35;Face_Size_Q35=vec2(length(Tangent_World_Q13),length(Binormal_World_Q14));ScaleY_Q35=Face_Size_Q35.y;float Out_Radius_Q38;float Out_Line_Width_Q38;Out_Radius_Q38=_Relative_To_Height_ ? _Radius_ : _Radius_/ScaleY_Q35;Out_Line_Width_Q38=_Relative_To_Height_ ? _Line_Width_ : _Line_Width_/ScaleY_Q35;float Show_Selection_Q31;Selection_Vertex_B31(Result_Q42,Result_Q43,Face_Center_Q30,Face_Size_Q35,Nrm_World_Q24,Tangent_World_N_Q15,Binormal_World_N_Q16,_Selection_Fuzz_,_Selected_,_Selected_Distance_,_Selected_Fade_Length_,vec3(0,0,-1),Show_Selection_Q31);float MaxAB_Q41=max(Show_Selection_Q31,Product_Q45);float Width_Q55;Proximity_Visibility_B55(Show_Selection_Q31,Result_Q42,Result_Q43,_Proximity_Far_Distance_,_Proximity_Near_Radius_,Face_Center_Q30,Nrm_World_Q24,Face_Size_Q35,Step_Q46,Width_Q55);vec3 New_P_Q32;vec2 New_UV_Q32;Move_Verts_B32(uv,Out_Radius_Q38,Anisotropy_Q21,Out_Line_Width_Q38,Width_Q55,New_P_Q32,New_UV_Q32);vec3 Pos_World_Q12;Object_To_World_Pos_B12(New_P_Q32,Pos_World_Q12);vec3 Out_Position_Q40;vec2 Out_UV_Q40;vec3 Blob_Info_Q40;vec2 Blob_Relative_UV_Q40;Blob_Vertex_B40(Pos_World_Q12,Nrm_World_Q24,Tangent_World_N_Q15,Binormal_World_N_Q16,Position_Q27,_Blob_Intensity_,Near_Size_Q27,_Blob_Far_Size_,_Blob_Near_Distance_,_Blob_Far_Distance_,color,uv,Face_Center_Q30,Face_Size_Q35,New_UV_Q32,_Blob_Fade_Length_,_Selection_Fade_,_Selection_Fade_Size_,Inner_Fade_Q27,Pulse_Q27,Fade_Q27,Blob_Enable_Q27,0.0,Out_Position_Q40,Out_UV_Q40,Blob_Info_Q40,Blob_Relative_UV_Q40);vec2 Rect_UV_Q36;vec2 Scale_XY_Q36;vec4 Rect_Parms_Q36;Round_Rect_Vertex_B36(New_UV_Q32,Tangent_World_Q13,Binormal_World_Q14,Out_Radius_Q38,Anisotropy_Q21,Blob_Relative_UV_Q40,Rect_UV_Q36,Scale_XY_Q36,Rect_Parms_Q36);vec4 Extra_Q33;float Distance_To_Face_Q33;float Distance_Fade1_Q33;float Distance_Fade2_Q33;Proximity_Vertex_B33(Result_Q42,Result_Q43,Face_Center_Q30,Pos_World_Q12,_Proximity_Far_Distance_,1.0,_Proximity_Anisotropy_,Nrm_World_Q24,Tangent_World_N_Q15,Binormal_World_N_Q16,Extra_Q33,Distance_To_Face_Q33,Distance_Fade1_Q33,Distance_Fade2_Q33);vec4 Vec4_Q37=vec4(MaxAB_Q41,Distance_Fade1_Q33,Distance_Fade2_Q33,Out_Radius_Q38);vec3 Position=Out_Position_Q40;vec3 Normal=Vec3_Q29;vec2 UV=Out_UV_Q40;vec3 Tangent=Blob_Info_Q40;vec3 Binormal=vec3(0,0,0);vec4 Color=vec4(1,1,1,1);vec4 Extra1=Rect_Parms_Q36;vec4 Extra2=Extra_Q33;vec4 Extra3=Vec4_Q37;gl_Position=viewProjection*vec4(Position,1);vNormal=Normal;vUV=UV;vTangent=Tangent;vExtra1=Extra1;vExtra2=Extra2;vExtra3=Extra3;}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const mrdlFrontplateVertexShader = { name, shader };\n//# sourceMappingURL=mrdlFrontplate.vertex.js.map","import { __decorate } from \"@babylonjs/core/tslib.es6.js\";\nimport { Color4 } from \"@babylonjs/core/Maths/math.color.js\";\nimport { Constants } from \"@babylonjs/core/Engines/constants.js\";\nimport { EffectFallbacks } from \"@babylonjs/core/Materials/effectFallbacks.js\";\nimport { MaterialDefines } from \"@babylonjs/core/Materials/materialDefines.js\";\nimport { MaterialHelper } from \"@babylonjs/core/Materials/materialHelper.js\";\nimport { PushMaterial } from \"@babylonjs/core/Materials/pushMaterial.js\";\nimport { RegisterClass } from \"@babylonjs/core/Misc/typeStore.js\";\nimport { SerializationHelper, serialize } from \"@babylonjs/core/Misc/decorators.js\";\nimport { Vector3 } from \"@babylonjs/core/Maths/math.vector.js\";\nimport { VertexBuffer } from \"@babylonjs/core/Buffers/buffer.js\";\nimport { Texture } from \"@babylonjs/core/Materials/Textures/texture.js\";\nimport \"./shaders/mrdlFrontplate.fragment.js\";\nimport \"./shaders/mrdlFrontplate.vertex.js\";\n/** @hidden */\nclass MRDLFrontplateMaterialDefines extends MaterialDefines {\n constructor() {\n super();\n /**\n * Sets default value for \"SMOOTH_EDGES\"\n */\n this.SMOOTH_EDGES = true;\n this._needNormals = true;\n this._needUVs = true;\n this.rebuild();\n }\n}\nexport class MRDLFrontplateMaterial extends PushMaterial {\n constructor(name, scene) {\n super(name, scene);\n /**\n * Gets or sets the corner radius on the frontplate. If this value is changed, update the lineWidth to match.\n */\n this.radius = 0.12;\n /**\n * Gets or sets the line width of the frontplate.\n */\n this.lineWidth = 0.01;\n /**\n * Gets or sets whether the scale is relative to the frontplate height.\n */\n this.relativeToHeight = false;\n /** @hidden */\n this._filterWidth = 1.0;\n /**\n * Gets or sets the edge color of the frontplate.\n */\n this.edgeColor = new Color4(0.53, 0.53, 0.53, 1);\n /**\n * Gets or sets whether to enable blob effects on the frontplate.\n */\n this.blobEnable = true;\n /**\n * Gets or sets the blob position on the frontplate.\n */\n this.blobPosition = new Vector3(100, 100, 100);\n /**\n * Gets or sets the blob intensity of the frontplate.\n */\n this.blobIntensity = 0.5;\n /**\n * Gets or sets the blob near size of the frontplate.\n */\n this.blobNearSize = 0.032;\n /**\n * Gets or sets the blob far size of the frontplate.\n */\n this.blobFarSize = 0.048;\n /**\n * Gets or sets the blob near distance of the frontplate.\n */\n this.blobNearDistance = 0.008;\n /**\n * Gets or sets the blob far distance of the frontplate.\n */\n this.blobFarDistance = 0.064;\n /**\n * Gets or sets the blob fade length of the frontplate.\n */\n this.blobFadeLength = 0.04;\n /**\n * Gets or sets the blob inner fade of the frontplate.\n */\n this.blobInnerFade = 0.01;\n /**\n * Gets or sets the blob pulse of the frontplate.\n */\n this.blobPulse = 0.0;\n /**\n * Gets or sets the blob fade effect on the frontplate.\n */\n this.blobFade = 1.0;\n /**\n * Gets or sets the maximum size of the blob pulse on the frontplate.\n */\n this.blobPulseMaxSize = 0.05;\n /**\n * Gets or sets whether to enable extra blob effects of the frontplate.\n */\n this.blobEnable2 = true;\n /**\n * Gets or sets blob2 position of the frontplate.\n */\n this.blobPosition2 = new Vector3(10, 10.1, -0.6);\n /**\n * Gets or sets the blob2 near size of the frontplate.\n */\n this.blobNearSize2 = 0.008;\n /**\n * Gets or sets the blob2 inner fade of the frontplate.\n */\n this.blobInnerFade2 = 0.1;\n /**\n * Gets or sets the blob2 pulse of the frontplate.\n */\n this.blobPulse2 = 0.0;\n /**\n * Gets or sets the blob2 fade effect on the frontplate.\n */\n this.blobFade2 = 1.0;\n /**\n * Gets or sets the gaze intensity of the frontplate.\n */\n this.gazeIntensity = 0.8;\n /**\n * Gets or sets the gaze focus of the frontplate.\n */\n this.gazeFocus = 0.0;\n /**\n * Gets or sets the selection fuzz of the frontplate.\n */\n this.selectionFuzz = 0.5;\n /**\n * Gets or sets the fade intensity of the frontplate.\n */\n this.selected = 1.0;\n /**\n * Gets or sets the selection fade intensity of the frontplate.\n */\n this.selectionFade = 0.2;\n /**\n * Gets or sets the selection fade size of the frontplate.\n */\n this.selectionFadeSize = 0.0;\n /**\n * Gets or sets the selected distance of the frontplate.\n */\n this.selectedDistance = 0.08;\n /**\n * Gets or sets the selected fade length of the frontplate.\n */\n this.selectedFadeLength = 0.08;\n /**\n * Gets or sets the proximity maximum intensity of the frontplate.\n */\n this.proximityMaxIntensity = 0.45;\n /**\n * Gets or sets the proximity far distance of the frontplate.\n */\n this.proximityFarDistance = 0.16;\n /**\n * Gets or sets the proximity near radius of the frontplate.\n */\n this.proximityNearRadius = 0.016;\n /**\n * Gets or sets the proximity anisotropy of the frontplate.\n */\n this.proximityAnisotropy = 1.0;\n /**\n * Gets or sets whether to use global left index on the frontplate.\n */\n this.useGlobalLeftIndex = true;\n /**\n * Gets or sets whether to use global right index of the frontplate.\n */\n this.useGlobalRightIndex = true;\n /**\n * Gets or sets the opacity of the frontplate (0.0 - 1.0).\n */\n this.fadeOut = 1.0;\n this.alphaMode = Constants.ALPHA_ADD;\n this.disableDepthWrite = true;\n this.backFaceCulling = false;\n this._blobTexture = new Texture(MRDLFrontplateMaterial.BLOB_TEXTURE_URL, scene, true, false, Texture.NEAREST_SAMPLINGMODE);\n }\n needAlphaBlending() {\n return true;\n }\n needAlphaTesting() {\n return false;\n }\n getAlphaTestTexture() {\n return null;\n }\n // Methods\n isReadyForSubMesh(mesh, subMesh) {\n if (this.isFrozen) {\n if (subMesh.effect && subMesh.effect._wasPreviouslyReady) {\n return true;\n }\n }\n if (!subMesh.materialDefines) {\n subMesh.materialDefines = new MRDLFrontplateMaterialDefines();\n }\n const defines = subMesh.materialDefines;\n const scene = this.getScene();\n if (this._isReadyForSubMesh(subMesh)) {\n return true;\n }\n const engine = scene.getEngine();\n // Attribs\n MaterialHelper.PrepareDefinesForAttributes(mesh, defines, false, false);\n // Get correct effect\n if (defines.isDirty) {\n defines.markAsProcessed();\n scene.resetCachedMaterial();\n // Fallbacks\n const fallbacks = new EffectFallbacks();\n if (defines.FOG) {\n fallbacks.addFallback(1, \"FOG\");\n }\n MaterialHelper.HandleFallbacksForShadows(defines, fallbacks);\n defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess;\n //Attributes\n const attribs = [VertexBuffer.PositionKind];\n if (defines.NORMAL) {\n attribs.push(VertexBuffer.NormalKind);\n }\n if (defines.UV1) {\n attribs.push(VertexBuffer.UVKind);\n }\n if (defines.UV2) {\n attribs.push(VertexBuffer.UV2Kind);\n }\n if (defines.VERTEXCOLOR) {\n attribs.push(VertexBuffer.ColorKind);\n }\n if (defines.TANGENT) {\n attribs.push(VertexBuffer.TangentKind);\n }\n MaterialHelper.PrepareAttributesForInstances(attribs, defines);\n // Legacy browser patch\n const shaderName = \"mrdlFrontplate\";\n const join = defines.toString();\n const uniforms = [\n \"world\",\n \"worldView\",\n \"worldViewProjection\",\n \"view\",\n \"projection\",\n \"viewProjection\",\n \"cameraPosition\",\n \"_Radius_\",\n \"_Line_Width_\",\n \"_Relative_To_Height_\",\n \"_Filter_Width_\",\n \"_Edge_Color_\",\n \"_Fade_Out_\",\n \"_Smooth_Edges_\",\n \"_Blob_Enable_\",\n \"_Blob_Position_\",\n \"_Blob_Intensity_\",\n \"_Blob_Near_Size_\",\n \"_Blob_Far_Size_\",\n \"_Blob_Near_Distance_\",\n \"_Blob_Far_Distance_\",\n \"_Blob_Fade_Length_\",\n \"_Blob_Inner_Fade_\",\n \"_Blob_Pulse_\",\n \"_Blob_Fade_\",\n \"_Blob_Pulse_Max_Size_\",\n \"_Blob_Enable_2_\",\n \"_Blob_Position_2_\",\n \"_Blob_Near_Size_2_\",\n \"_Blob_Inner_Fade_2_\",\n \"_Blob_Pulse_2_\",\n \"_Blob_Fade_2_\",\n \"_Gaze_Intensity_\",\n \"_Gaze_Focus_\",\n \"_Blob_Texture_\",\n \"_Selection_Fuzz_\",\n \"_Selected_\",\n \"_Selection_Fade_\",\n \"_Selection_Fade_Size_\",\n \"_Selected_Distance_\",\n \"_Selected_Fade_Length_\",\n \"_Proximity_Max_Intensity_\",\n \"_Proximity_Far_Distance_\",\n \"_Proximity_Near_Radius_\",\n \"_Proximity_Anisotropy_\",\n \"Global_Left_Index_Tip_Position\",\n \"Global_Right_Index_Tip_Position\",\n \"_Use_Global_Left_Index_\",\n \"_Use_Global_Right_Index_\",\n ];\n const samplers = [];\n const uniformBuffers = [];\n MaterialHelper.PrepareUniformsAndSamplersList({\n uniformsNames: uniforms,\n uniformBuffersNames: uniformBuffers,\n samplers: samplers,\n defines: defines,\n maxSimultaneousLights: 4,\n });\n subMesh.setEffect(scene.getEngine().createEffect(shaderName, {\n attributes: attribs,\n uniformsNames: uniforms,\n uniformBuffersNames: uniformBuffers,\n samplers: samplers,\n defines: join,\n fallbacks: fallbacks,\n onCompiled: this.onCompiled,\n onError: this.onError,\n indexParameters: { maxSimultaneousLights: 4 },\n }, engine), defines);\n }\n if (!subMesh.effect || !subMesh.effect.isReady()) {\n return false;\n }\n defines._renderId = scene.getRenderId();\n subMesh.effect._wasPreviouslyReady = true;\n return true;\n }\n bindForSubMesh(world, mesh, subMesh) {\n const scene = this.getScene();\n const defines = subMesh.materialDefines;\n if (!defines) {\n return;\n }\n const effect = subMesh.effect;\n if (!effect) {\n return;\n }\n this._activeEffect = effect;\n // Matrices\n this.bindOnlyWorldMatrix(world);\n this._activeEffect.setMatrix(\"viewProjection\", scene.getTransformMatrix());\n this._activeEffect.setVector3(\"cameraPosition\", scene.activeCamera.position);\n // \"Round Rect\"\n this._activeEffect.setFloat(\"_Radius_\", this.radius);\n this._activeEffect.setFloat(\"_Line_Width_\", this.lineWidth);\n this._activeEffect.setFloat(\"_Relative_To_Height_\", this.relativeToHeight ? 1.0 : 0.0);\n this._activeEffect.setFloat(\"_Filter_Width_\", this._filterWidth);\n this._activeEffect.setDirectColor4(\"_Edge_Color_\", this.edgeColor);\n // \"Fade\"\n this._activeEffect.setFloat(\"_Fade_Out_\", this.fadeOut);\n // \"Blob\"\n this._activeEffect.setFloat(\"_Blob_Enable_\", this.blobEnable ? 1.0 : 0.0);\n this._activeEffect.setVector3(\"_Blob_Position_\", this.blobPosition);\n this._activeEffect.setFloat(\"_Blob_Intensity_\", this.blobIntensity);\n this._activeEffect.setFloat(\"_Blob_Near_Size_\", this.blobNearSize);\n this._activeEffect.setFloat(\"_Blob_Far_Size_\", this.blobFarSize);\n this._activeEffect.setFloat(\"_Blob_Near_Distance_\", this.blobNearDistance);\n this._activeEffect.setFloat(\"_Blob_Far_Distance_\", this.blobFarDistance);\n this._activeEffect.setFloat(\"_Blob_Fade_Length_\", this.blobFadeLength);\n this._activeEffect.setFloat(\"_Blob_Inner_Fade_\", this.blobInnerFade);\n this._activeEffect.setFloat(\"_Blob_Pulse_\", this.blobPulse);\n this._activeEffect.setFloat(\"_Blob_Fade_\", this.blobFade);\n this._activeEffect.setFloat(\"_Blob_Pulse_Max_Size_\", this.blobPulseMaxSize);\n // \"Blob 2\"\n this._activeEffect.setFloat(\"_Blob_Enable_2_\", this.blobEnable2 ? 1.0 : 0.0);\n this._activeEffect.setVector3(\"_Blob_Position_2_\", this.blobPosition2);\n this._activeEffect.setFloat(\"_Blob_Near_Size_2_\", this.blobNearSize2);\n this._activeEffect.setFloat(\"_Blob_Inner_Fade_2_\", this.blobInnerFade2);\n this._activeEffect.setFloat(\"_Blob_Pulse_2_\", this.blobPulse2);\n this._activeEffect.setFloat(\"_Blob_Fade_2_\", this.blobFade2);\n // \"Gaze\"\n this._activeEffect.setFloat(\"_Gaze_Intensity_\", this.gazeIntensity);\n this._activeEffect.setFloat(\"_Gaze_Focus_\", this.gazeFocus);\n // \"Blob Texture\"\n this._activeEffect.setTexture(\"_Blob_Texture_\", this._blobTexture);\n // \"Selection\"\n this._activeEffect.setFloat(\"_Selection_Fuzz_\", this.selectionFuzz);\n this._activeEffect.setFloat(\"_Selected_\", this.selected);\n this._activeEffect.setFloat(\"_Selection_Fade_\", this.selectionFade);\n this._activeEffect.setFloat(\"_Selection_Fade_Size_\", this.selectionFadeSize);\n this._activeEffect.setFloat(\"_Selected_Distance_\", this.selectedDistance);\n this._activeEffect.setFloat(\"_Selected_Fade_Length_\", this.selectedFadeLength);\n // \"Proximity\"\n this._activeEffect.setFloat(\"_Proximity_Max_Intensity_\", this.proximityMaxIntensity);\n this._activeEffect.setFloat(\"_Proximity_Far_Distance_\", this.proximityFarDistance);\n this._activeEffect.setFloat(\"_Proximity_Near_Radius_\", this.proximityNearRadius);\n this._activeEffect.setFloat(\"_Proximity_Anisotropy_\", this.proximityAnisotropy);\n // \"Global\"\n this._activeEffect.setFloat(\"_Use_Global_Left_Index_\", this.useGlobalLeftIndex ? 1.0 : 0.0);\n this._activeEffect.setFloat(\"_Use_Global_Right_Index_\", this.useGlobalRightIndex ? 1.0 : 0.0);\n // \"Antialiasing\"\n //define SMOOTH_EDGES true;\n this._afterBind(mesh, this._activeEffect);\n }\n /**\n * Get the list of animatables in the material.\n * @returns the list of animatables object used in the material\n */\n getAnimatables() {\n return [];\n }\n dispose(forceDisposeEffect) {\n super.dispose(forceDisposeEffect);\n }\n clone(name) {\n return SerializationHelper.Clone(() => new MRDLFrontplateMaterial(name, this.getScene()), this);\n }\n serialize() {\n const serializationObject = SerializationHelper.Serialize(this);\n serializationObject.customType = \"BABYLON.MRDLFrontplateMaterial\";\n return serializationObject;\n }\n getClassName() {\n return \"MRDLFrontplateMaterial\";\n }\n // Statics\n static Parse(source, scene, rootUrl) {\n return SerializationHelper.Parse(() => new MRDLFrontplateMaterial(source.name, scene), source, scene, rootUrl);\n }\n}\n/**\n * URL pointing to the texture used to define the coloring for the BLOB.\n */\nMRDLFrontplateMaterial.BLOB_TEXTURE_URL = \"\";\n__decorate([\n serialize()\n], MRDLFrontplateMaterial.prototype, \"radius\", void 0);\n__decorate([\n serialize()\n], MRDLFrontplateMaterial.prototype, \"lineWidth\", void 0);\n__decorate([\n serialize()\n], MRDLFrontplateMaterial.prototype, \"relativeToHeight\", void 0);\n__decorate([\n serialize()\n], MRDLFrontplateMaterial.prototype, \"edgeColor\", void 0);\n__decorate([\n serialize()\n], MRDLFrontplateMaterial.prototype, \"blobEnable\", void 0);\n__decorate([\n serialize()\n], MRDLFrontplateMaterial.prototype, \"blobPosition\", void 0);\n__decorate([\n serialize()\n], MRDLFrontplateMaterial.prototype, \"blobIntensity\", void 0);\n__decorate([\n serialize()\n], MRDLFrontplateMaterial.prototype, \"blobNearSize\", void 0);\n__decorate([\n serialize()\n], MRDLFrontplateMaterial.prototype, \"blobFarSize\", void 0);\n__decorate([\n serialize()\n], MRDLFrontplateMaterial.prototype, \"blobNearDistance\", void 0);\n__decorate([\n serialize()\n], MRDLFrontplateMaterial.prototype, \"blobFarDistance\", void 0);\n__decorate([\n serialize()\n], MRDLFrontplateMaterial.prototype, \"blobFadeLength\", void 0);\n__decorate([\n serialize()\n], MRDLFrontplateMaterial.prototype, \"blobInnerFade\", void 0);\n__decorate([\n serialize()\n], MRDLFrontplateMaterial.prototype, \"blobPulse\", void 0);\n__decorate([\n serialize()\n], MRDLFrontplateMaterial.prototype, \"blobFade\", void 0);\n__decorate([\n serialize()\n], MRDLFrontplateMaterial.prototype, \"blobPulseMaxSize\", void 0);\n__decorate([\n serialize()\n], MRDLFrontplateMaterial.prototype, \"blobEnable2\", void 0);\n__decorate([\n serialize()\n], MRDLFrontplateMaterial.prototype, \"blobPosition2\", void 0);\n__decorate([\n serialize()\n], MRDLFrontplateMaterial.prototype, \"blobNearSize2\", void 0);\n__decorate([\n serialize()\n], MRDLFrontplateMaterial.prototype, \"blobInnerFade2\", void 0);\n__decorate([\n serialize()\n], MRDLFrontplateMaterial.prototype, \"blobPulse2\", void 0);\n__decorate([\n serialize()\n], MRDLFrontplateMaterial.prototype, \"blobFade2\", void 0);\n__decorate([\n serialize()\n], MRDLFrontplateMaterial.prototype, \"gazeIntensity\", void 0);\n__decorate([\n serialize()\n], MRDLFrontplateMaterial.prototype, \"gazeFocus\", void 0);\n__decorate([\n serialize()\n], MRDLFrontplateMaterial.prototype, \"selectionFuzz\", void 0);\n__decorate([\n serialize()\n], MRDLFrontplateMaterial.prototype, \"selected\", void 0);\n__decorate([\n serialize()\n], MRDLFrontplateMaterial.prototype, \"selectionFade\", void 0);\n__decorate([\n serialize()\n], MRDLFrontplateMaterial.prototype, \"selectionFadeSize\", void 0);\n__decorate([\n serialize()\n], MRDLFrontplateMaterial.prototype, \"selectedDistance\", void 0);\n__decorate([\n serialize()\n], MRDLFrontplateMaterial.prototype, \"selectedFadeLength\", void 0);\n__decorate([\n serialize()\n], MRDLFrontplateMaterial.prototype, \"proximityMaxIntensity\", void 0);\n__decorate([\n serialize()\n], MRDLFrontplateMaterial.prototype, \"proximityFarDistance\", void 0);\n__decorate([\n serialize()\n], MRDLFrontplateMaterial.prototype, \"proximityNearRadius\", void 0);\n__decorate([\n serialize()\n], MRDLFrontplateMaterial.prototype, \"proximityAnisotropy\", void 0);\n__decorate([\n serialize()\n], MRDLFrontplateMaterial.prototype, \"useGlobalLeftIndex\", void 0);\n__decorate([\n serialize()\n], MRDLFrontplateMaterial.prototype, \"useGlobalRightIndex\", void 0);\nRegisterClass(\"BABYLON.GUI.MRDLFrontplateMaterial\", MRDLFrontplateMaterial);\n//# sourceMappingURL=mrdlFrontplateMaterial.js.map","// Do not edit.\nimport { ShaderStore } from \"@babylonjs/core/Engines/shaderStore.js\";\nconst name = \"mrdlInnerquadPixelShader\";\nconst shader = `uniform vec3 cameraPosition;varying vec2 vUV;varying vec3 vTangent;uniform vec4 _Color_;uniform float _Radius_;uniform bool _Fixed_Radius_;uniform float _Filter_Width_;uniform float _Glow_Fraction_;uniform float _Glow_Max_;uniform float _Glow_Falloff_;float FilterStep_Bid194(float edge,float x,float filterWidth)\n{float dx=max(1.0E-5,fwidth(x)*filterWidth);return max((x+dx*0.5-max(edge,x-dx*0.5))/dx,0.0);}\nvoid Round_Rect_B194(\nfloat Size_X,\nfloat Size_Y,\nfloat Radius,\nvec4 Rect_Color,\nfloat Filter_Width,\nvec2 UV,\nfloat Glow_Fraction,\nfloat Glow_Max,\nfloat Glow_Falloff,\nout vec4 Color)\n{vec2 halfSize=vec2(Size_X,Size_Y)*0.5;vec2 r=max(min(vec2(Radius,Radius),halfSize),vec2(0.01,0.01));vec2 v=abs(UV);vec2 nearestp=min(v,halfSize-r);vec2 delta=(v-nearestp)/max(vec2(0.01,0.01),r);float Distance=length(delta);float insideRect=1.0-FilterStep_Bid194(1.0-Glow_Fraction,Distance,Filter_Width);float glow=clamp((1.0-Distance)/Glow_Fraction,0.0,1.0);glow=pow(glow,Glow_Falloff);Color=Rect_Color*max(insideRect,glow*Glow_Max);}\nvoid main()\n{float X_Q192;float Y_Q192;float Z_Q192;X_Q192=vTangent.x;Y_Q192=vTangent.y;Z_Q192=vTangent.z;vec4 Color_Q194;Round_Rect_B194(X_Q192,1.0,Y_Q192,_Color_,_Filter_Width_,vUV,_Glow_Fraction_,_Glow_Max_,_Glow_Falloff_,Color_Q194);vec4 Out_Color=Color_Q194;float Clip_Threshold=0.0;gl_FragColor=Out_Color;}\n`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const mrdlInnerquadPixelShader = { name, shader };\n//# sourceMappingURL=mrdlInnerquad.fragment.js.map","// Do not edit.\nimport { ShaderStore } from \"@babylonjs/core/Engines/shaderStore.js\";\nconst name = \"mrdlInnerquadVertexShader\";\nconst shader = `uniform mat4 world;uniform mat4 viewProjection;uniform vec3 cameraPosition;attribute vec3 position;attribute vec3 normal;attribute vec2 uv;attribute vec3 tangent;attribute vec4 color;uniform vec4 _Color_;uniform float _Radius_;uniform bool _Fixed_Radius_;uniform float _Filter_Width_;uniform float _Glow_Fraction_;uniform float _Glow_Max_;uniform float _Glow_Falloff_;varying vec2 vUV;varying vec3 vTangent;void main()\n{vec3 Pos_World_Q189;Pos_World_Q189=(world*vec4(position,1.0)).xyz;vec3 Dir_World_Q190;Dir_World_Q190=(world*vec4(tangent,0.0)).xyz;vec3 Dir_World_Q191;Dir_World_Q191=(world*vec4((cross(normal,tangent)),0.0)).xyz;float Length_Q180=length(Dir_World_Q190);float Length_Q181=length(Dir_World_Q191);float Quotient_Q184=Length_Q180/Length_Q181;float Quotient_Q195=_Radius_/Length_Q181;vec2 Result_Q193;Result_Q193=vec2((uv.x-0.5)*Length_Q180/Length_Q181,(uv.y-0.5));float Result_Q198=_Fixed_Radius_ ? Quotient_Q195 : _Radius_;vec3 Vec3_Q183=vec3(Quotient_Q184,Result_Q198,0);vec3 Position=Pos_World_Q189;vec3 Normal=vec3(0,0,0);vec2 UV=Result_Q193;vec3 Tangent=Vec3_Q183;vec3 Binormal=vec3(0,0,0);vec4 Color=color;gl_Position=viewProjection*vec4(Position,1);vUV=UV;vTangent=Tangent;}\n`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const mrdlInnerquadVertexShader = { name, shader };\n//# sourceMappingURL=mrdlInnerquad.vertex.js.map","import { __decorate } from \"@babylonjs/core/tslib.es6.js\";\nimport { Color4 } from \"@babylonjs/core/Maths/math.color.js\";\nimport { Constants } from \"@babylonjs/core/Engines/constants.js\";\nimport { EffectFallbacks } from \"@babylonjs/core/Materials/effectFallbacks.js\";\nimport { MaterialDefines } from \"@babylonjs/core/Materials/materialDefines.js\";\nimport { MaterialHelper } from \"@babylonjs/core/Materials/materialHelper.js\";\nimport { PushMaterial } from \"@babylonjs/core/Materials/pushMaterial.js\";\nimport { RegisterClass } from \"@babylonjs/core/Misc/typeStore.js\";\nimport { SerializationHelper, serialize } from \"@babylonjs/core/Misc/decorators.js\";\nimport { VertexBuffer } from \"@babylonjs/core/Buffers/buffer.js\";\nimport \"./shaders/mrdlInnerquad.fragment.js\";\nimport \"./shaders/mrdlInnerquad.vertex.js\";\nclass MRDLInnerquadMaterialDefines extends MaterialDefines {\n constructor() {\n super();\n this._needNormals = true;\n this._needUVs = true;\n this.rebuild();\n }\n}\nexport class MRDLInnerquadMaterial extends PushMaterial {\n constructor(name, scene) {\n super(name, scene);\n /**\n * Gets or sets the color of the innerquad.\n */\n this.color = new Color4(1, 1, 1, 0.05);\n /**\n * Gets or sets the corner radius on the innerquad. If this value is changed, update the lineWidth to match.\n */\n this.radius = 0.12;\n /**\n * Gets or sets whether the radius of the innerquad should be fixed.\n */\n this.fixedRadius = true;\n /** @hidden */\n this._filterWidth = 1.0;\n /**\n * Gets or sets the glow fraction of the innerquad.\n */\n this.glowFraction = 0.0;\n /**\n * Gets or sets the maximum glow intensity of the innerquad.\n */\n this.glowMax = 0.5;\n /**\n * Gets or sets the glow falloff effect of the innerquad.\n */\n this.glowFalloff = 2.0;\n this.alphaMode = Constants.ALPHA_COMBINE;\n this.backFaceCulling = false;\n }\n needAlphaBlending() {\n return true;\n }\n needAlphaTesting() {\n return false;\n }\n getAlphaTestTexture() {\n return null;\n }\n // Methods\n isReadyForSubMesh(mesh, subMesh) {\n if (this.isFrozen) {\n if (subMesh.effect && subMesh.effect._wasPreviouslyReady) {\n return true;\n }\n }\n if (!subMesh.materialDefines) {\n subMesh.materialDefines = new MRDLInnerquadMaterialDefines();\n }\n const defines = subMesh.materialDefines;\n const scene = this.getScene();\n if (this._isReadyForSubMesh(subMesh)) {\n return true;\n }\n const engine = scene.getEngine();\n // Attribs\n MaterialHelper.PrepareDefinesForAttributes(mesh, defines, true, false);\n // Get correct effect\n if (defines.isDirty) {\n defines.markAsProcessed();\n scene.resetCachedMaterial();\n // Fallbacks\n const fallbacks = new EffectFallbacks();\n if (defines.FOG) {\n fallbacks.addFallback(1, \"FOG\");\n }\n MaterialHelper.HandleFallbacksForShadows(defines, fallbacks);\n defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess;\n //Attributes\n const attribs = [VertexBuffer.PositionKind];\n if (defines.NORMAL) {\n attribs.push(VertexBuffer.NormalKind);\n }\n if (defines.UV1) {\n attribs.push(VertexBuffer.UVKind);\n }\n if (defines.UV2) {\n attribs.push(VertexBuffer.UV2Kind);\n }\n if (defines.VERTEXCOLOR) {\n attribs.push(VertexBuffer.ColorKind);\n }\n if (defines.TANGENT) {\n attribs.push(VertexBuffer.TangentKind);\n }\n MaterialHelper.PrepareAttributesForInstances(attribs, defines);\n // Legacy browser patch\n const shaderName = \"mrdlInnerquad\";\n const join = defines.toString();\n const uniforms = [\n \"world\",\n \"worldView\",\n \"worldViewProjection\",\n \"view\",\n \"projection\",\n \"viewProjection\",\n \"cameraPosition\",\n \"_Color_\",\n \"_Radius_\",\n \"_Fixed_Radius_\",\n \"_Filter_Width_\",\n \"_Glow_Fraction_\",\n \"_Glow_Max_\",\n \"_Glow_Falloff_\",\n ];\n const samplers = [];\n const uniformBuffers = [];\n MaterialHelper.PrepareUniformsAndSamplersList({\n uniformsNames: uniforms,\n uniformBuffersNames: uniformBuffers,\n samplers: samplers,\n defines: defines,\n maxSimultaneousLights: 4,\n });\n subMesh.setEffect(scene.getEngine().createEffect(shaderName, {\n attributes: attribs,\n uniformsNames: uniforms,\n uniformBuffersNames: uniformBuffers,\n samplers: samplers,\n defines: join,\n fallbacks: fallbacks,\n onCompiled: this.onCompiled,\n onError: this.onError,\n indexParameters: { maxSimultaneousLights: 4 },\n }, engine), defines);\n }\n if (!subMesh.effect || !subMesh.effect.isReady()) {\n return false;\n }\n defines._renderId = scene.getRenderId();\n subMesh.effect._wasPreviouslyReady = true;\n return true;\n }\n bindForSubMesh(world, mesh, subMesh) {\n const scene = this.getScene();\n const defines = subMesh.materialDefines;\n if (!defines) {\n return;\n }\n const effect = subMesh.effect;\n if (!effect) {\n return;\n }\n this._activeEffect = effect;\n // Matrices\n this.bindOnlyWorldMatrix(world);\n this._activeEffect.setMatrix(\"viewProjection\", scene.getTransformMatrix());\n this._activeEffect.setVector3(\"cameraPosition\", scene.activeCamera.position);\n // \"Color\"\n this._activeEffect.setDirectColor4(\"_Color_\", this.color);\n // \"Shape\"\n this._activeEffect.setFloat(\"_Radius_\", this.radius);\n this._activeEffect.setFloat(\"_Fixed_Radius_\", this.fixedRadius ? 1.0 : 0.0);\n this._activeEffect.setFloat(\"_Filter_Width_\", this._filterWidth);\n // \"Glow\"\n this._activeEffect.setFloat(\"_Glow_Fraction_\", this.glowFraction);\n this._activeEffect.setFloat(\"_Glow_Max_\", this.glowMax);\n this._activeEffect.setFloat(\"_Glow_Falloff_\", this.glowFalloff);\n this._afterBind(mesh, this._activeEffect);\n }\n /**\n * Get the list of animatables in the material.\n * @returns the list of animatables object used in the material\n */\n getAnimatables() {\n return [];\n }\n dispose(forceDisposeEffect) {\n super.dispose(forceDisposeEffect);\n }\n clone(name) {\n return SerializationHelper.Clone(() => new MRDLInnerquadMaterial(name, this.getScene()), this);\n }\n serialize() {\n const serializationObject = SerializationHelper.Serialize(this);\n serializationObject.customType = \"BABYLON.MRDLInnerquadMaterial\";\n return serializationObject;\n }\n getClassName() {\n return \"MRDLInnerquadMaterial\";\n }\n // Statics\n static Parse(source, scene, rootUrl) {\n return SerializationHelper.Parse(() => new MRDLInnerquadMaterial(source.name, scene), source, scene, rootUrl);\n }\n}\n__decorate([\n serialize()\n], MRDLInnerquadMaterial.prototype, \"color\", void 0);\n__decorate([\n serialize()\n], MRDLInnerquadMaterial.prototype, \"radius\", void 0);\n__decorate([\n serialize()\n], MRDLInnerquadMaterial.prototype, \"fixedRadius\", void 0);\n__decorate([\n serialize()\n], MRDLInnerquadMaterial.prototype, \"glowFraction\", void 0);\n__decorate([\n serialize()\n], MRDLInnerquadMaterial.prototype, \"glowMax\", void 0);\n__decorate([\n serialize()\n], MRDLInnerquadMaterial.prototype, \"glowFalloff\", void 0);\nRegisterClass(\"BABYLON.GUI.MRDLInnerquadMaterial\", MRDLInnerquadMaterial);\n//# sourceMappingURL=mrdlInnerquadMaterial.js.map","import { AdvancedDynamicTexture } from \"../../../2D/advancedDynamicTexture.js\";\nimport { Animation } from \"@babylonjs/core/Animations/animation.js\";\nimport { AnimationGroup } from \"@babylonjs/core/Animations/animationGroup.js\";\nimport { Color3, Color4 } from \"@babylonjs/core/Maths/math.color.js\";\nimport { Control } from \"../../../2D/controls/control.js\";\nimport { CreatePlane } from \"@babylonjs/core/Meshes/Builders/planeBuilder.js\";\nimport { CreateBox } from \"@babylonjs/core/Meshes/Builders/boxBuilder.js\";\nimport { IsDocumentAvailable } from \"@babylonjs/core/Misc/domManagement.js\";\nimport { FadeInOutBehavior } from \"@babylonjs/core/Behaviors/Meshes/fadeInOutBehavior.js\";\nimport { Grid } from \"../../../2D/controls/grid.js\";\nimport { Image } from \"../../../2D/controls/image.js\";\nimport { MRDLBackglowMaterial } from \"../../materials/mrdl/mrdlBackglowMaterial.js\";\nimport { MRDLBackplateMaterial } from \"../../materials/mrdl/mrdlBackplateMaterial.js\";\nimport { MRDLFrontplateMaterial } from \"../../materials/mrdl/mrdlFrontplateMaterial.js\";\nimport { MRDLInnerquadMaterial } from \"../../materials/mrdl/mrdlInnerquadMaterial.js\";\nimport { Rectangle } from \"../../../2D/controls/rectangle.js\";\nimport { SceneLoader } from \"@babylonjs/core/Loading/sceneLoader.js\";\nimport { StackPanel } from \"../../../2D/controls/stackPanel.js\";\nimport { StandardMaterial } from \"@babylonjs/core/Materials/standardMaterial.js\";\nimport { TextBlock } from \"../../../2D/controls/textBlock.js\";\nimport { TouchButton3D } from \"../touchButton3D.js\";\nimport { TransformNode } from \"@babylonjs/core/Meshes/transformNode.js\";\nimport { Vector3 } from \"@babylonjs/core/Maths/math.vector.js\";\n/**\n * Class used to create the mrtkv3 button\n */\nexport class TouchHolographicButton extends TouchButton3D {\n _disposeTooltip() {\n this._tooltipFade = null;\n if (this._tooltipTextBlock) {\n this._tooltipTextBlock.dispose();\n }\n if (this._tooltipTexture) {\n this._tooltipTexture.dispose();\n }\n if (this._tooltipMesh) {\n this._tooltipMesh.dispose();\n }\n this.onPointerEnterObservable.remove(this._tooltipHoverObserver);\n this.onPointerOutObservable.remove(this._tooltipOutObserver);\n }\n /**\n * Rendering ground id of all the mesh in the button\n */\n set renderingGroupId(id) {\n this._backPlate.renderingGroupId = id;\n this._textPlate.renderingGroupId = id;\n this._frontPlate.renderingGroupId = id;\n this._backGlow.renderingGroupId = id;\n this._innerQuad.renderingGroupId = id;\n if (this._tooltipMesh) {\n this._tooltipMesh.renderingGroupId = id;\n }\n }\n get renderingGroupId() {\n return this._backPlate.renderingGroupId;\n }\n /**\n * Gets the mesh used to render this control\n */\n get mesh() {\n return this._backPlate;\n }\n /**\n * Text to be displayed on the tooltip shown when hovering on the button. When set to null tooltip is disabled. (Default: null)\n * Set this property after adding the button to the GUI3DManager\n */\n set tooltipText(text) {\n if (!text) {\n this._disposeTooltip();\n return;\n }\n if (!this._tooltipFade) {\n const rightHandedScene = this._backPlate._scene.useRightHandedSystem;\n // Create tooltip with mesh and text\n this._tooltipMesh = CreatePlane(\"\", { size: 1 }, this._backPlate._scene);\n this._tooltipMesh.position = Vector3.Down().scale(0.7).add(Vector3.Forward(rightHandedScene).scale(-0.15));\n this._tooltipMesh.isPickable = false;\n this._tooltipMesh.parent = this._frontPlateCollisionMesh;\n // Create text texture for the tooltip\n this._tooltipTexture = AdvancedDynamicTexture.CreateForMesh(this._tooltipMesh);\n const tooltipBackground = new Rectangle();\n tooltipBackground.height = 0.25;\n tooltipBackground.width = 0.8;\n tooltipBackground.cornerRadius = 25;\n tooltipBackground.color = \"#ffffff\";\n tooltipBackground.thickness = 20;\n tooltipBackground.background = \"#060668\";\n this._tooltipTexture.addControl(tooltipBackground);\n this._tooltipTextBlock = new TextBlock();\n this._tooltipTextBlock.color = \"white\";\n this._tooltipTextBlock.fontSize = 100;\n this._tooltipTexture.addControl(this._tooltipTextBlock);\n // Add hover action to tooltip\n this._tooltipFade = new FadeInOutBehavior();\n this._tooltipFade.delay = 500;\n this._tooltipMesh.addBehavior(this._tooltipFade);\n this._tooltipHoverObserver = this.onPointerEnterObservable.add(() => {\n if (this._tooltipFade) {\n this._tooltipFade.fadeIn(true);\n }\n });\n this._tooltipOutObserver = this.onPointerOutObservable.add(() => {\n if (this._tooltipFade) {\n this._tooltipFade.fadeIn(false);\n }\n });\n }\n if (this._tooltipTextBlock) {\n this._tooltipTextBlock.text = text;\n }\n }\n get tooltipText() {\n var _a;\n return ((_a = this._tooltipTextBlock) === null || _a === void 0 ? void 0 : _a.text) || null;\n }\n /**\n * Gets or sets text for the button\n */\n get text() {\n return this._text;\n }\n set text(value) {\n if (this._text === value) {\n return;\n }\n this._text = value;\n this._rebuildContent();\n }\n /**\n * Gets or sets subtext for a button with larger width\n */\n get subtext() {\n return this._subtext;\n }\n set subtext(value) {\n if (this._subtext === value) {\n return;\n }\n this._subtext = value;\n this._rebuildContent();\n }\n /**\n * Gets or sets the image url for the button\n */\n get imageUrl() {\n return this._imageUrl;\n }\n set imageUrl(value) {\n if (this._imageUrl === value) {\n return;\n }\n this._imageUrl = value;\n this._rebuildContent();\n }\n /**\n * Gets the back material used by this button\n */\n get backMaterial() {\n return this._backMaterial;\n }\n /**\n * Gets the front material used by this button\n */\n get frontMaterial() {\n return this._frontMaterial;\n }\n /**\n * Gets the back glow material used by this button\n */\n get backGlowMaterial() {\n return this._backGlowMaterial;\n }\n /**\n * Gets the inner quad material used by this button\n */\n get innerQuadMaterial() {\n return this._innerQuadMaterial;\n }\n /**\n * Gets the plate material used by this button\n */\n get plateMaterial() {\n return this._plateMaterial;\n }\n /**\n * Gets a boolean indicating if this button shares its material with other V3 Buttons\n */\n get shareMaterials() {\n return this._shareMaterials;\n }\n /**\n * Sets whether the backplate is visible or hidden. Hiding the backplate is not recommended without some sort of replacement\n */\n set isBackplateVisible(isVisible) {\n if (this.mesh && this._backMaterial) {\n if (isVisible && !this._isBackplateVisible) {\n this._backPlate.visibility = 1;\n }\n else if (!isVisible && this._isBackplateVisible) {\n this._backPlate.visibility = 0;\n }\n }\n this._isBackplateVisible = isVisible;\n }\n /**\n * Creates a new button\n * @param name defines the control name\n * @param shareMaterials\n */\n constructor(name, shareMaterials = true) {\n super(name);\n /**\n * Gets or sets the horizontal scaling for the button.\n */\n this.width = 1;\n /**\n * Gets or sets the vertical scaling for the button.\n */\n this.height = 1;\n /**\n * Gets or sets the bevel radius for the button.\n */\n this.radius = 0.14;\n /**\n * Gets or sets the font size of the button text in pixels.\n * This is only adjustable for a button with width to height ratio greater than 1.\n */\n this.textSizeInPixels = 18;\n /**\n * Gets or sets the size of the button image in pixels.\n * This is only adjustable for a button with width to height ratio greater than 1.\n */\n this.imageSizeInPixels = 40;\n /**\n * Gets or sets the color of the button plate.\n */\n this.plateMaterialColor = new Color3(0.4, 0.4, 0.4);\n // Shared variables for meshes\n /**\n * Gets or sets the depth of the button's front plate.\n * This variable determines the z scaling and z position for some of the button's meshes.\n */\n this.frontPlateDepth = 0.2;\n /**\n * Gets or sets the depth of the button's back plate.\n * This variable determines the z scaling and z position for some of the button's meshes.\n */\n this.backPlateDepth = 0.04;\n /**\n * Gets or sets the offset value for button's back glow.\n * This variable determines the x, y scaling of the button's meshes.\n */\n this.backGlowOffset = 0.1;\n /**\n * Gets or sets the value that determines the z scaling and z position for the innerQuad and BackGlow meshes.\n */\n this.flatPlaneDepth = 0.001;\n /**\n * Gets or sets the radius for FrontMaterial and innerQuadMaterial.\n */\n this.innerQuadRadius = this.radius - 0.04;\n /**\n * Gets or sets the color for innerQuadMaterial.\n */\n this.innerQuadColor = new Color4(0, 0, 0, 0);\n /**\n * Gets or sets the color for innerQuadMaterial for when it is toggled.\n */\n this.innerQuadToggledColor = new Color4(0.5197843, 0.6485234, 0.9607843, 0.6);\n /**\n * Gets or sets the color for innerQuadMaterial for when it is hovered.\n */\n this.innerQuadHoverColor = new Color4(1, 1, 1, 0.05);\n /**\n * Gets or sets the color for innerQuadMaterial for when it is toggled and hovered.\n */\n this.innerQuadToggledHoverColor = new Color4(0.5197843, 0.6485234, 0.9607843, 1);\n this._isBackplateVisible = true;\n // Materials\n this._shareMaterials = true;\n this._shareMaterials = shareMaterials;\n this.pointerEnterAnimation = () => {\n if (this._frontPlate && this._textPlate && !this.isToggleButton) {\n this._performEnterExitAnimation(1);\n }\n if (this.isToggleButton && this._innerQuadMaterial) {\n if (this.isToggled) {\n this._innerQuadMaterial.color = this.innerQuadToggledHoverColor;\n }\n else {\n this._innerQuadMaterial.color = this.innerQuadHoverColor;\n }\n }\n };\n this.pointerOutAnimation = () => {\n if (this._frontPlate && this._textPlate && !this.isToggleButton) {\n this._performEnterExitAnimation(-0.8);\n }\n if (this.isToggleButton && this._innerQuadMaterial) {\n this._onToggle(this.isToggled);\n }\n };\n this.pointerDownAnimation = () => {\n // Do nothing\n };\n this.pointerUpAnimation = () => {\n // Do nothing\n };\n this._pointerClickObserver = this.onPointerClickObservable.add(() => {\n if (this._frontPlate && this._backGlow && !this.isActiveNearInteraction) {\n this._performClickAnimation();\n }\n if (this.isToggleButton && this._innerQuadMaterial) {\n this._onToggle(this.isToggled);\n }\n });\n this._pointerEnterObserver = this.onPointerEnterObservable.add(() => {\n this.pointerEnterAnimation();\n });\n this._pointerOutObserver = this.onPointerOutObservable.add(() => {\n this.pointerOutAnimation();\n });\n this._toggleObserver = this.onToggleObservable.add((isToggled) => {\n if (isToggled) {\n this._innerQuadMaterial.color = this.innerQuadToggledColor;\n }\n else {\n this._innerQuadMaterial.color = this.innerQuadColor;\n }\n });\n }\n _getTypeName() {\n return \"TouchHolographicButton\";\n }\n _rebuildContent() {\n let content;\n if (this._getAspectRatio() <= 1) {\n // align text and image vertically\n content = this._alignContentVertically();\n }\n else {\n // align text and image horizontally\n content = this._alignContentHorizontally();\n }\n this.content = content;\n }\n _getAspectRatio() {\n return this.width / this.height;\n }\n _alignContentVertically() {\n const panel = new StackPanel();\n panel.isVertical = true;\n if (IsDocumentAvailable() && !!document.createElement) {\n if (this._imageUrl) {\n const image = new Image();\n image.source = this._imageUrl;\n image.heightInPixels = 180;\n image.widthInPixels = 100;\n image.paddingTopInPixels = 40;\n image.paddingBottomInPixels = 40;\n panel.addControl(image);\n }\n }\n if (this._text) {\n const text = new TextBlock();\n text.text = this._text;\n text.color = \"white\";\n text.heightInPixels = 30;\n text.fontSize = 24;\n panel.addControl(text);\n }\n return panel;\n }\n _alignContentHorizontally() {\n let totalPanelWidthInPixels = 240;\n const padding = 15;\n const contentContainer = new Rectangle();\n contentContainer.widthInPixels = totalPanelWidthInPixels;\n contentContainer.heightInPixels = totalPanelWidthInPixels;\n contentContainer.color = \"transparent\";\n contentContainer.setPaddingInPixels(padding, padding, padding, padding);\n totalPanelWidthInPixels -= padding * 2;\n const panel = new StackPanel();\n panel.isVertical = false;\n panel.scaleY = this._getAspectRatio();\n if (IsDocumentAvailable() && !!document.createElement) {\n if (this._imageUrl) {\n const imageContainer = new Rectangle(`${this.name}_image`);\n imageContainer.widthInPixels = this.imageSizeInPixels;\n imageContainer.heightInPixels = this.imageSizeInPixels;\n imageContainer.color = \"transparent\";\n totalPanelWidthInPixels -= this.imageSizeInPixels;\n const image = new Image();\n image.source = this._imageUrl;\n imageContainer.addControl(image);\n panel.addControl(imageContainer);\n }\n }\n if (this._text) {\n const text = new TextBlock(`${this.name}_text`);\n text.text = this._text;\n text.color = \"white\";\n text.fontSize = this.textSizeInPixels;\n text.widthInPixels = totalPanelWidthInPixels;\n if (this._imageUrl) {\n text.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;\n text.paddingLeftInPixels = padding;\n }\n if (this._subtext) {\n const textContainer = new Grid();\n textContainer.addColumnDefinition(1);\n textContainer.addRowDefinition(0.5);\n textContainer.addRowDefinition(0.5);\n textContainer.widthInPixels = totalPanelWidthInPixels;\n textContainer.heightInPixels = 45;\n const subtext = new TextBlock(`${this.name}_subtext`);\n subtext.text = this._subtext;\n subtext.color = \"#EEEEEEAB\";\n subtext.fontSize = this.textSizeInPixels * 0.75;\n subtext.fontWeight = \"600\";\n if (this._imageUrl) {\n subtext.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;\n subtext.paddingLeftInPixels = padding;\n }\n textContainer.addControl(text, 0);\n textContainer.addControl(subtext, 1);\n panel.addControl(textContainer);\n }\n else {\n panel.addControl(text);\n }\n }\n contentContainer.addControl(panel);\n return contentContainer;\n }\n // Mesh association\n _createNode(scene) {\n var _a;\n this.name = (_a = this.name) !== null && _a !== void 0 ? _a : \"TouchHolographicButton\";\n const backPlateMesh = this._createBackPlate(scene);\n const collisionMesh = this._createFrontPlate(scene);\n const innerQuadMesh = this._createInnerQuad(scene);\n const backGlowMesh = this._createBackGlow(scene);\n this._frontPlateCollisionMesh = collisionMesh;\n this._textPlate = super._createNode(scene);\n this._textPlate.name = `${this.name}_textPlate`;\n this._textPlate.isPickable = false;\n this._textPlate.scaling.x = this.width;\n this._textPlate.parent = collisionMesh;\n this._backPlate = backPlateMesh;\n this._backPlate.position = Vector3.Forward(scene.useRightHandedSystem).scale(this.backPlateDepth / 2);\n this._backPlate.isPickable = false;\n this._backPlate.addChild(collisionMesh);\n this._backPlate.addChild(innerQuadMesh);\n if (backGlowMesh) {\n this._backPlate.addChild(backGlowMesh);\n }\n const tn = new TransformNode(`${this.name}_root`, scene);\n this._backPlate.setParent(tn);\n this.collisionMesh = collisionMesh;\n this.collidableFrontDirection = this._backPlate.forward.negate(); // Mesh is facing the wrong way\n return tn;\n }\n _createBackPlate(scene) {\n const backPlateMesh = CreateBox(`${this.name}_backPlate`, {}, scene);\n backPlateMesh.isPickable = false;\n backPlateMesh.visibility = 0;\n backPlateMesh.scaling.z = 0.2;\n SceneLoader.ImportMeshAsync(undefined, TouchHolographicButton.MRTK_ASSET_BASE_URL, TouchHolographicButton.BACKPLATE_MODEL_FILENAME, scene).then((result) => {\n const backPlateModel = result.meshes[1];\n backPlateModel.visibility = 0;\n if (this._isBackplateVisible) {\n backPlateModel.visibility = 1;\n backPlateModel.name = `${this.name}_backPlate`;\n backPlateModel.isPickable = false;\n backPlateModel.scaling.x = this.width;\n backPlateModel.scaling.y = this.height;\n backPlateModel.parent = backPlateMesh;\n }\n if (this._backMaterial) {\n backPlateModel.material = this._backMaterial;\n }\n this._backPlate = backPlateModel;\n });\n return backPlateMesh;\n }\n _createFrontPlate(scene) {\n const collisionMesh = CreateBox(`${this.name}_frontPlate`, {\n width: this.width,\n height: this.height,\n depth: this.frontPlateDepth,\n }, scene);\n collisionMesh.isPickable = true;\n collisionMesh.isNearPickable = true;\n collisionMesh.visibility = 0;\n collisionMesh.position = Vector3.Forward(scene.useRightHandedSystem).scale((this.backPlateDepth - this.frontPlateDepth) / 2);\n SceneLoader.ImportMeshAsync(undefined, TouchHolographicButton.MRTK_ASSET_BASE_URL, TouchHolographicButton.FRONTPLATE_MODEL_FILENAME, scene).then((result) => {\n const collisionPlate = CreateBox(`${this.name}_collisionPlate`, {\n width: this.width,\n height: this.height,\n }, scene);\n collisionPlate.isPickable = false;\n collisionPlate.scaling.z = this.frontPlateDepth;\n collisionPlate.visibility = 0;\n collisionPlate.parent = collisionMesh;\n this._collisionPlate = collisionPlate;\n const frontPlateModel = result.meshes[1];\n frontPlateModel.name = `${this.name}_frontPlate`;\n frontPlateModel.isPickable = false;\n frontPlateModel.scaling.x = this.width - this.backGlowOffset;\n frontPlateModel.scaling.y = this.height - this.backGlowOffset;\n frontPlateModel.position = Vector3.Forward(scene.useRightHandedSystem).scale(-0.5);\n frontPlateModel.parent = collisionPlate;\n if (this.isToggleButton) {\n frontPlateModel.visibility = 0;\n }\n if (this._frontMaterial) {\n frontPlateModel.material = this._frontMaterial;\n }\n this._textPlate.scaling.x = 1;\n this._textPlate.parent = frontPlateModel;\n this._frontPlate = frontPlateModel;\n });\n return collisionMesh;\n }\n _createInnerQuad(scene) {\n const innerQuadMesh = CreateBox(`${this.name}_innerQuad`, {}, scene);\n innerQuadMesh.isPickable = false;\n innerQuadMesh.visibility = 0;\n innerQuadMesh.scaling.z = this.flatPlaneDepth;\n innerQuadMesh.position.z += this.backPlateDepth / 2 - this.flatPlaneDepth;\n SceneLoader.ImportMeshAsync(undefined, TouchHolographicButton.MRTK_ASSET_BASE_URL, TouchHolographicButton.INNERQUAD_MODEL_FILENAME, scene).then((result) => {\n const innerQuadModel = result.meshes[1];\n innerQuadModel.name = `${this.name}_innerQuad`;\n innerQuadModel.isPickable = false;\n innerQuadModel.scaling.x = this.width - this.backGlowOffset;\n innerQuadModel.scaling.y = this.height - this.backGlowOffset;\n innerQuadModel.parent = innerQuadMesh;\n if (this._innerQuadMaterial) {\n innerQuadModel.material = this._innerQuadMaterial;\n }\n this._innerQuad = innerQuadModel;\n });\n return innerQuadMesh;\n }\n _createBackGlow(scene) {\n if (this.isToggleButton) {\n return;\n }\n const backGlowMesh = CreateBox(`${this.name}_backGlow`, {}, scene);\n backGlowMesh.isPickable = false;\n backGlowMesh.visibility = 0;\n backGlowMesh.scaling.z = this.flatPlaneDepth;\n backGlowMesh.position.z += this.backPlateDepth / 2 - this.flatPlaneDepth * 2;\n SceneLoader.ImportMeshAsync(undefined, TouchHolographicButton.MRTK_ASSET_BASE_URL, TouchHolographicButton.BACKGLOW_MODEL_FILENAME, scene).then((result) => {\n const backGlowModel = result.meshes[1];\n backGlowModel.name = `${this.name}_backGlow`;\n backGlowModel.isPickable = false;\n backGlowModel.scaling.x = this.width - this.backGlowOffset;\n backGlowModel.scaling.y = this.height - this.backGlowOffset;\n backGlowModel.parent = backGlowMesh;\n if (this._backGlowMaterial) {\n backGlowModel.material = this._backGlowMaterial;\n }\n this._backGlow = backGlowModel;\n });\n return backGlowMesh;\n }\n _applyFacade(facadeTexture) {\n this._plateMaterial.emissiveTexture = facadeTexture;\n this._plateMaterial.opacityTexture = facadeTexture;\n this._plateMaterial.diffuseColor = this.plateMaterialColor;\n }\n _performClickAnimation() {\n const frameRate = 60;\n const animationGroup = new AnimationGroup(\"Click Animation Group\");\n const animations = [\n {\n name: \"backGlowMotion\",\n mesh: this._backGlow,\n property: \"material.motion\",\n keys: [\n {\n frame: 0,\n values: [0, 0, 0],\n },\n {\n frame: 20,\n values: [1, 0.0144, 0.0144],\n },\n {\n frame: 40,\n values: [0.0027713229489760476, 0, 0],\n },\n {\n frame: 45,\n values: [0.0027713229489760476],\n },\n ],\n },\n {\n name: \"_collisionPlateZSlide\",\n mesh: this._collisionPlate,\n property: \"position.z\",\n keys: [\n {\n frame: 0,\n values: [0.0, 0.0, 0.0],\n },\n {\n frame: 20,\n values: [Vector3.Forward(this._collisionPlate._scene.useRightHandedSystem).scale(this.frontPlateDepth / 2).z, 0.0, 0.0],\n },\n {\n frame: 40,\n values: [0.0, 0.005403332496794331],\n },\n {\n frame: 45,\n values: [0.0],\n },\n ],\n },\n {\n name: \"_collisionPlateZScale\",\n mesh: this._collisionPlate,\n property: \"scaling.z\",\n keys: [\n {\n frame: 0,\n values: [this.frontPlateDepth, 0.0, 0.0],\n },\n {\n frame: 20,\n values: [this.backPlateDepth, 0.0, 0.0],\n },\n {\n frame: 40,\n values: [this.frontPlateDepth, 0.0054],\n },\n {\n frame: 45,\n values: [this.frontPlateDepth],\n },\n ],\n },\n ];\n for (const animation of animations) {\n const anim = new Animation(animation.name, animation.property, frameRate, Animation.ANIMATIONTYPE_FLOAT, Animation.ANIMATIONLOOPMODE_CYCLE);\n const animkeyFrames = [];\n for (const key of animation.keys) {\n animkeyFrames.push({\n frame: key.frame,\n value: key.values[0],\n inTangent: key.values[1],\n outTangent: key.values[2],\n interpolation: key.values[3],\n });\n }\n anim.setKeys(animkeyFrames);\n if (!animation.mesh) {\n continue;\n }\n animationGroup.addTargetedAnimation(anim, animation.mesh);\n }\n animationGroup.normalize(0, 45);\n animationGroup.speedRatio = 1;\n animationGroup.play();\n }\n _performEnterExitAnimation(speedRatio) {\n const frameRate = 60;\n const animationGroup = new AnimationGroup(\"Enter Exit Animation Group\");\n const animations = [\n {\n name: \"frontPlateFadeOut\",\n mesh: this._frontPlate,\n property: \"material.fadeOut\",\n keys: [\n {\n frame: 0,\n values: [0, 0, 0.025045314830017686, 0],\n },\n {\n frame: 40,\n values: [1.00205599570012, 0.025045314830017686, 0, 0],\n },\n ],\n },\n {\n name: \"textPlateZSlide\",\n mesh: this._textPlate,\n property: \"position.z\",\n keys: [\n {\n frame: 0,\n values: [0, 0.0, 0.0],\n },\n {\n frame: 40,\n values: [Vector3.Forward(this._textPlate._scene.useRightHandedSystem).scale(-0.15).z, 0.0, 0.0],\n },\n ],\n },\n ];\n for (const animation of animations) {\n const anim = new Animation(animation.name, animation.property, frameRate, Animation.ANIMATIONTYPE_FLOAT, Animation.ANIMATIONLOOPMODE_CYCLE);\n const animkeyFrames = [];\n for (const key of animation.keys) {\n animkeyFrames.push({\n frame: key.frame,\n value: key.values[0],\n inTangent: key.values[1],\n outTangent: key.values[2],\n interpolation: key.values[3],\n });\n }\n anim.setKeys(animkeyFrames);\n if (!animation.mesh) {\n continue;\n }\n animationGroup.addTargetedAnimation(anim, animation.mesh);\n }\n animationGroup.normalize(0, 45);\n animationGroup.speedRatio = speedRatio;\n animationGroup.play();\n }\n _createBackMaterial(mesh) {\n var _a;\n this._backMaterial = (_a = this._backMaterial) !== null && _a !== void 0 ? _a : new MRDLBackplateMaterial(this.name + \"backPlateMaterial\", mesh.getScene());\n this._backMaterial.absoluteSizes = true;\n this._backMaterial.radius = this.radius;\n this._backMaterial.lineWidth = 0.02;\n }\n _createFrontMaterial(mesh) {\n var _a;\n this._frontMaterial = (_a = this._frontMaterial) !== null && _a !== void 0 ? _a : new MRDLFrontplateMaterial(this.name + \"Front Material\", mesh.getScene());\n this.frontMaterial.radius = this.innerQuadRadius;\n this.frontMaterial.fadeOut = 0.0;\n }\n _createBackGlowMaterial(mesh) {\n var _a;\n const glowRadius = this.radius + 0.04;\n this._backGlowMaterial = (_a = this._backGlowMaterial) !== null && _a !== void 0 ? _a : new MRDLBackglowMaterial(this.name + \"Back Glow Material\", mesh.getScene());\n this._backGlowMaterial.bevelRadius = glowRadius;\n this._backGlowMaterial.lineWidth = glowRadius;\n this._backGlowMaterial.motion = 0.0;\n }\n _createInnerQuadMaterial(mesh) {\n var _a;\n this._innerQuadMaterial = (_a = this._innerQuadMaterial) !== null && _a !== void 0 ? _a : new MRDLInnerquadMaterial(\"inner_quad\", mesh.getScene());\n this._innerQuadMaterial.radius = this.innerQuadRadius;\n if (this.isToggleButton) {\n this._innerQuadMaterial.color = this.innerQuadColor;\n }\n }\n _createPlateMaterial(mesh) {\n var _a;\n this._plateMaterial = (_a = this._plateMaterial) !== null && _a !== void 0 ? _a : new StandardMaterial(this.name + \"Plate Material\", mesh.getScene());\n this._plateMaterial.specularColor = Color3.Black();\n }\n _onToggle(newState) {\n super._onToggle(newState);\n }\n _affectMaterial(mesh) {\n if (this._shareMaterials) {\n // Back\n if (!this._host._touchSharedMaterials[\"mrdlBackplateMaterial\"]) {\n this._createBackMaterial(mesh);\n this._host._touchSharedMaterials[\"mrdlBackplateMaterial\"] = this._backMaterial;\n }\n else {\n this._backMaterial = this._host._touchSharedMaterials[\"mrdlBackplateMaterial\"];\n }\n // Front\n if (!this._host._touchSharedMaterials[\"mrdlFrontplateMaterial\"]) {\n this._createFrontMaterial(mesh);\n this._host._touchSharedMaterials[\"mrdlFrontplateMaterial\"] = this._frontMaterial;\n }\n else {\n this._frontMaterial = this._host._touchSharedMaterials[\"mrdlFrontplateMaterial\"];\n }\n // Back glow\n if (!this._host._touchSharedMaterials[\"mrdlBackglowMaterial\"]) {\n this._createBackGlowMaterial(mesh);\n this._host._touchSharedMaterials[\"mrdlBackglowMaterial\"] = this._backGlowMaterial;\n }\n else {\n this._backGlowMaterial = this._host._touchSharedMaterials[\"mrdlBackglowMaterial\"];\n }\n // Inner quad\n if (!this._host._touchSharedMaterials[\"mrdlInnerQuadMaterial\"]) {\n this._createInnerQuadMaterial(mesh);\n this._host._touchSharedMaterials[\"mrdlInnerQuadMaterial\"] = this._innerQuadMaterial;\n }\n else {\n this._innerQuadMaterial = this._host._touchSharedMaterials[\"mrdlInnerQuadMaterial\"];\n }\n }\n else {\n this._createBackMaterial(mesh);\n this._createFrontMaterial(mesh);\n this._createBackGlowMaterial(mesh);\n this._createInnerQuadMaterial(mesh);\n }\n this._createPlateMaterial(mesh);\n this._backPlate.material = this._backMaterial;\n this._textPlate.material = this._plateMaterial;\n if (!this._isBackplateVisible) {\n this._backPlate.visibility = 0;\n }\n if (this._frontPlate) {\n this._frontPlate.material = this._frontMaterial;\n }\n if (this._backGlow) {\n this._backGlow.material = this._backGlowMaterial;\n }\n if (this._innerQuad) {\n this._innerQuad.material = this._innerQuadMaterial;\n }\n this._rebuildContent();\n }\n /**\n * Releases all associated resources\n */\n dispose() {\n super.dispose(); // will dispose main mesh ie. back plate\n this._disposeTooltip();\n this.onPointerClickObservable.remove(this._pointerClickObserver);\n this.onPointerEnterObservable.remove(this._pointerEnterObserver);\n this.onPointerOutObservable.remove(this._pointerOutObserver);\n this.onToggleObservable.remove(this._toggleObserver);\n if (!this.shareMaterials) {\n this._backMaterial.dispose();\n this._frontMaterial.dispose();\n this._plateMaterial.dispose();\n this._backGlowMaterial.dispose();\n this._innerQuadMaterial.dispose();\n if (this._pickedPointObserver) {\n this._host.onPickedPointChangedObservable.remove(this._pickedPointObserver);\n this._pickedPointObserver = null;\n }\n }\n }\n}\n/**\n * Base Url for the frontplate model.\n */\nTouchHolographicButton.MRTK_ASSET_BASE_URL = \"https://assets.babylonjs.com/meshes/MRTK/\";\n/**\n * File name for the frontplate model.\n */\nTouchHolographicButton.FRONTPLATE_MODEL_FILENAME = \"mrtk-fluent-frontplate.glb\";\n/**\n * File name for the backplate model.\n */\nTouchHolographicButton.BACKPLATE_MODEL_FILENAME = \"mrtk-fluent-backplate.glb\";\n/**\n * File name for the backglow model.\n */\nTouchHolographicButton.BACKGLOW_MODEL_FILENAME = \"mrtk-fluent-button.glb\";\n/**\n * File name for the innerquad model.\n */\nTouchHolographicButton.INNERQUAD_MODEL_FILENAME = \"SlateProximity.glb\";\n//# sourceMappingURL=touchHolographicButton.js.map","import { Observable } from \"@babylonjs/core/Misc/observable.js\";\nimport { Vector3 } from \"@babylonjs/core/Maths/math.vector.js\";\nimport { PointerEventTypes } from \"@babylonjs/core/Events/pointerEvents.js\";\nimport { HemisphericLight } from \"@babylonjs/core/Lights/hemisphericLight.js\";\nimport { UtilityLayerRenderer } from \"@babylonjs/core/Rendering/utilityLayerRenderer.js\";\nimport { EngineStore } from \"@babylonjs/core/Engines/engineStore.js\";\nimport { Container3D } from \"./controls/container3D.js\";\n/**\n * Class used to manage 3D user interface\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui3D\n */\nexport class GUI3DManager {\n /** Gets the hosting scene */\n get scene() {\n return this._scene;\n }\n /** Gets associated utility layer */\n get utilityLayer() {\n return this._utilityLayer;\n }\n /** Gets the scaling for all UI elements owned by this manager */\n get controlScaling() {\n return this._customControlScaling;\n }\n /** Sets the scaling adjustment for all UI elements owned by this manager */\n set controlScaling(newScale) {\n if (this._customControlScaling !== newScale && newScale > 0) {\n const scaleRatio = newScale / this._customControlScaling;\n this._customControlScaling = newScale;\n this._rootContainer.children.forEach((control) => {\n control.scaling.scaleInPlace(scaleRatio);\n if (newScale !== 1) {\n control._isScaledByManager = true;\n }\n });\n }\n }\n /** Gets if controls attached to this manager are realistically sized, based on the fact that 1 unit length is 1 meter */\n get useRealisticScaling() {\n return this.controlScaling === GUI3DManager.MRTK_REALISTIC_SCALING;\n }\n /** Sets if controls attached to this manager are realistically sized, based on the fact that 1 unit length is 1 meter */\n set useRealisticScaling(newValue) {\n this.controlScaling = newValue ? GUI3DManager.MRTK_REALISTIC_SCALING : 1;\n }\n /**\n * Creates a new GUI3DManager\n * @param scene\n */\n constructor(scene) {\n this._customControlScaling = 1.0;\n /** @internal */\n this._lastControlOver = {};\n /** @internal */\n this._lastControlDown = {};\n /**\n * Observable raised when the point picked by the pointer events changed\n */\n this.onPickedPointChangedObservable = new Observable();\n /**\n * Observable raised when a picking happens\n */\n this.onPickingObservable = new Observable();\n // Shared resources\n /** @internal */\n this._sharedMaterials = {};\n /** @internal */\n this._touchSharedMaterials = {};\n this._scene = scene || EngineStore.LastCreatedScene;\n this._sceneDisposeObserver = this._scene.onDisposeObservable.add(() => {\n this._sceneDisposeObserver = null;\n this._utilityLayer = null;\n this.dispose();\n });\n this._utilityLayer = UtilityLayerRenderer._CreateDefaultUtilityLayerFromScene(this._scene);\n this._utilityLayer.onlyCheckPointerDownEvents = false;\n this._utilityLayer.pickUtilitySceneFirst = false;\n this._utilityLayer.mainSceneTrackerPredicate = (mesh) => {\n var _a, _b, _c;\n return mesh && ((_c = (_b = (_a = mesh.reservedDataStore) === null || _a === void 0 ? void 0 : _a.GUI3D) === null || _b === void 0 ? void 0 : _b.control) === null || _c === void 0 ? void 0 : _c._node);\n };\n // Root\n this._rootContainer = new Container3D(\"RootContainer\");\n this._rootContainer._host = this;\n const utilityLayerScene = this._utilityLayer.utilityLayerScene;\n // Events\n this._pointerOutObserver = this._utilityLayer.onPointerOutObservable.add((pointerId) => {\n this._handlePointerOut(pointerId, true);\n });\n this._pointerObserver = utilityLayerScene.onPointerObservable.add((pi) => {\n this._doPicking(pi);\n });\n // Scene\n this._utilityLayer.utilityLayerScene.autoClear = false;\n this._utilityLayer.utilityLayerScene.autoClearDepthAndStencil = false;\n new HemisphericLight(\"hemi\", Vector3.Up(), this._utilityLayer.utilityLayerScene);\n }\n _handlePointerOut(pointerId, isPointerUp) {\n const previousControlOver = this._lastControlOver[pointerId];\n if (previousControlOver) {\n previousControlOver._onPointerOut(previousControlOver);\n delete this._lastControlOver[pointerId];\n }\n if (isPointerUp) {\n if (this._lastControlDown[pointerId]) {\n this._lastControlDown[pointerId].forcePointerUp();\n delete this._lastControlDown[pointerId];\n }\n }\n this.onPickedPointChangedObservable.notifyObservers(null);\n }\n _doPicking(pi) {\n var _a, _b, _c;\n if (!this._utilityLayer || !this._utilityLayer.shouldRender || !this._utilityLayer.utilityLayerScene.activeCamera) {\n return false;\n }\n const pointerEvent = pi.event;\n const pointerId = pointerEvent.pointerId || 0;\n const buttonIndex = pointerEvent.button;\n const pickingInfo = pi.pickInfo;\n if (pickingInfo) {\n this.onPickingObservable.notifyObservers(pickingInfo.pickedMesh);\n }\n if (!pickingInfo || !pickingInfo.hit) {\n this._handlePointerOut(pointerId, pi.type === PointerEventTypes.POINTERUP);\n return false;\n }\n if (pickingInfo.pickedPoint) {\n this.onPickedPointChangedObservable.notifyObservers(pickingInfo.pickedPoint);\n }\n const control = (_b = (_a = pickingInfo.pickedMesh.reservedDataStore) === null || _a === void 0 ? void 0 : _a.GUI3D) === null || _b === void 0 ? void 0 : _b.control;\n if (!!control && !control._processObservables(pi.type, pickingInfo.pickedPoint, ((_c = pickingInfo.originMesh) === null || _c === void 0 ? void 0 : _c.position) || null, pointerId, buttonIndex)) {\n if (pi.type === PointerEventTypes.POINTERMOVE) {\n if (this._lastControlOver[pointerId]) {\n this._lastControlOver[pointerId]._onPointerOut(this._lastControlOver[pointerId]);\n }\n delete this._lastControlOver[pointerId];\n }\n }\n if (pi.type === PointerEventTypes.POINTERUP) {\n if (this._lastControlDown[pointerEvent.pointerId]) {\n this._lastControlDown[pointerEvent.pointerId].forcePointerUp();\n delete this._lastControlDown[pointerEvent.pointerId];\n }\n if (pointerEvent.pointerType === \"touch\" || (pointerEvent.pointerType === \"xr\" && this._scene.getEngine().hostInformation.isMobile)) {\n this._handlePointerOut(pointerId, false);\n }\n }\n return true;\n }\n /**\n * Gets the root container\n */\n get rootContainer() {\n return this._rootContainer;\n }\n /**\n * Gets a boolean indicating if the given control is in the root child list\n * @param control defines the control to check\n * @returns true if the control is in the root child list\n */\n containsControl(control) {\n return this._rootContainer.containsControl(control);\n }\n /**\n * Adds a control to the root child list\n * @param control defines the control to add\n * @returns the current manager\n */\n addControl(control) {\n this._rootContainer.addControl(control);\n if (this._customControlScaling !== 1) {\n control.scaling.scaleInPlace(this._customControlScaling);\n control._isScaledByManager = true;\n }\n return this;\n }\n /**\n * Removes a control from the root child list\n * @param control defines the control to remove\n * @returns the current container\n */\n removeControl(control) {\n this._rootContainer.removeControl(control);\n if (control._isScaledByManager) {\n control.scaling.scaleInPlace(1 / this._customControlScaling);\n control._isScaledByManager = false;\n }\n return this;\n }\n /**\n * Releases all associated resources\n */\n dispose() {\n this._rootContainer.dispose();\n for (const materialName in this._sharedMaterials) {\n if (!Object.prototype.hasOwnProperty.call(this._sharedMaterials, materialName)) {\n continue;\n }\n this._sharedMaterials[materialName].dispose();\n }\n this._sharedMaterials = {};\n for (const materialName in this._touchSharedMaterials) {\n if (!Object.prototype.hasOwnProperty.call(this._touchSharedMaterials, materialName)) {\n continue;\n }\n this._touchSharedMaterials[materialName].dispose();\n }\n this._touchSharedMaterials = {};\n if (this._pointerOutObserver && this._utilityLayer) {\n this._utilityLayer.onPointerOutObservable.remove(this._pointerOutObserver);\n this._pointerOutObserver = null;\n }\n this.onPickedPointChangedObservable.clear();\n this.onPickingObservable.clear();\n const utilityLayerScene = this._utilityLayer ? this._utilityLayer.utilityLayerScene : null;\n if (utilityLayerScene) {\n if (this._pointerObserver) {\n utilityLayerScene.onPointerObservable.remove(this._pointerObserver);\n this._pointerObserver = null;\n }\n }\n if (this._scene) {\n if (this._sceneDisposeObserver) {\n this._scene.onDisposeObservable.remove(this._sceneDisposeObserver);\n this._sceneDisposeObserver = null;\n }\n }\n if (this._utilityLayer) {\n this._utilityLayer.dispose();\n }\n }\n}\nGUI3DManager.MRTK_REALISTIC_SCALING = 0.032;\n//# sourceMappingURL=gui3DManager.js.map","import { ActionManager, Engine, Scene, SceneOptions } from '@babylonjs/core';\r\nimport { AdvancedDynamicTexture, Control, Style } from '@babylonjs/gui';\r\n\r\nexport class GuiOverlay extends Scene {\r\n public constructor(engine: Engine, options?: SceneOptions) {\r\n super(engine, options);\r\n\r\n this.autoClear = false;\r\n this.actionManager = new ActionManager(this);\r\n\r\n this._uiTexture = AdvancedDynamicTexture.CreateFullscreenUI(\r\n 'UI',\r\n true,\r\n this\r\n );\r\n }\r\n\r\n public get uiTexture(): AdvancedDynamicTexture {\r\n return this._uiTexture;\r\n }\r\n\r\n public addControl(control: Control): AdvancedDynamicTexture {\r\n return this._uiTexture.addControl(control);\r\n }\r\n\r\n public createStyle(): Style {\r\n return this._uiTexture.createStyle();\r\n }\r\n\r\n private readonly _uiTexture: AdvancedDynamicTexture;\r\n}","import { Camera, Engine, Mesh, SceneOptions, Vector3 } from '@babylonjs/core';\r\nimport { IHotspot, IIconProvider } from 'Framework/Components/Controls/XView/Core';\r\nimport { BaseHotspotOverlay } from 'Framework/Components/Controls/XView/Overlays/BaseHotspotOverlay';\r\nimport { Viewer360 } from 'Framework/Components/Controls/XView/XView.Viewer360';\r\nimport { MathHelper } from 'Framework/Helpers/MathHelper';\r\n\r\nconst defaultFovScaling = 1 / 1024;\r\n\r\nexport class HotspotFlat2DOverlay extends BaseHotspotOverlay {\r\n public constructor(\r\n engine: Engine,\r\n viewer: Viewer360,\r\n camera: Camera,\r\n imageRatio: number,\r\n iconProvider: IIconProvider,\r\n options?: SceneOptions\r\n ) {\r\n super(engine, camera, viewer, iconProvider, options);\r\n\r\n this._imageRatio = imageRatio;\r\n }\r\n\r\n protected override onMeshIconCreatedAsync(hotspot: IHotspot, mesh: Mesh): Promise {\r\n let coordinates = hotspot.coordinates[0];\r\n\r\n if (MathHelper.isPlanCoordinates(coordinates)) {\r\n mesh.position.x = coordinates.x;\r\n mesh.position.y = (1 / this._imageRatio) - coordinates.y;\r\n mesh.position.z = 0;\r\n mesh.scaling = Vector3.One().scale(defaultFovScaling);\r\n }\r\n\r\n return Promise.resolve();\r\n }\r\n\r\n public override getCartesianCoordinatesOfShapeAsync(hotspot: IHotspot): Promise> {\r\n const cartesianCoordinates = hotspot.coordinates.map(p => {\r\n return new Vector3(\r\n p.x,\r\n (1 / this._imageRatio) - p.y,\r\n 0\r\n );\r\n });\r\n\r\n return Promise.resolve(cartesianCoordinates);\r\n }\r\n\r\n private readonly _imageRatio: number;\r\n}\r\n","import { Camera, Engine, Mesh, SceneOptions, Vector3 } from '@babylonjs/core';\r\nimport { ICartesianCoordinates, IHotspot, IIconProvider, ISphericalCoordinates } from 'Framework/Components/Controls/XView/Core';\r\nimport { BaseHotspotOverlay } from 'Framework/Components/Controls/XView/Overlays/BaseHotspotOverlay';\r\nimport { Viewer360 } from 'Framework/Components/Controls/XView/XView.Viewer360';\r\nimport { MathHelper } from 'Framework/Helpers/MathHelper';\r\n\r\nexport class Hotspot360Overlay extends BaseHotspotOverlay {\r\n public constructor(\r\n engine: Engine,\r\n viewer: Viewer360,\r\n camera: Camera,\r\n sphereRadius: number,\r\n iconProvider: IIconProvider,\r\n options?: SceneOptions\r\n ) {\r\n super(engine, camera, viewer, iconProvider, options);\r\n\r\n this._hotspotsSphereRadius = sphereRadius;\r\n }\r\n\r\n protected override onMeshIconCreatedAsync(hotspot: IHotspot, mesh: Mesh): Promise {\r\n let coordinates = hotspot.coordinates[0];\r\n let cartesianCoordinates: ICartesianCoordinates = null;\r\n let sphericalCoordinates: ISphericalCoordinates = null;\r\n\r\n if (MathHelper.isSphericalCoordinates(coordinates)) {\r\n sphericalCoordinates = coordinates;\r\n cartesianCoordinates = MathHelper.toCartesianCoordinates(coordinates);\r\n }\r\n else if (MathHelper.isCartesianCoordinates(coordinates)) {\r\n cartesianCoordinates = coordinates;\r\n sphericalCoordinates = MathHelper.toSphericalCoordinates(coordinates);\r\n }\r\n\r\n mesh.position.x = -cartesianCoordinates.y * this._hotspotsSphereRadius;\r\n mesh.position.y = cartesianCoordinates.z * this._hotspotsSphereRadius;\r\n mesh.position.z = cartesianCoordinates.x * this._hotspotsSphereRadius;\r\n\r\n mesh.rotation.x = -sphericalCoordinates.phi;\r\n mesh.rotation.y = -sphericalCoordinates.theta;\r\n\r\n return Promise.resolve();\r\n }\r\n\r\n public override getCartesianCoordinatesOfShapeAsync(hotspot: IHotspot): Promise> {\r\n const cartesianCoordinates = hotspot.coordinates.map(p => {\r\n const coordinates = MathHelper.toCartesianCoordinates(p);\r\n return new Vector3(\r\n -coordinates.y * this._hotspotsSphereRadius,\r\n coordinates.z * this._hotspotsSphereRadius,\r\n coordinates.x * this._hotspotsSphereRadius\r\n );\r\n });\r\n\r\n return Promise.resolve(cartesianCoordinates);\r\n }\r\n\r\n private readonly _hotspotsSphereRadius: number;\r\n}\r\n","import { Scene, StandardMaterial, SubMesh, Texture } from '@babylonjs/core';\r\n\r\nexport class LazyTextureMaterial extends StandardMaterial {\r\n public constructor(name: string, scene: Scene, textureUrl: string, subMesh: SubMesh) {\r\n super(name, scene);\r\n\r\n this.disableDepthWrite = true;\r\n this.fogEnabled = false;\r\n\r\n this._subMesh = subMesh;\r\n this._textureUrl = textureUrl;\r\n this._loaded = false;\r\n\r\n scene.registerBeforeRender(this._checkVisibility);\r\n }\r\n\r\n private readonly _checkVisibility = () => {\r\n const scene = this.getScene();\r\n const mesh = this._subMesh.getMesh();\r\n\r\n if (!this._loaded && mesh?.isVisible && scene.activeCamera.isInFrustum(this._subMesh)) {\r\n this.emissiveTexture = new Texture(this._textureUrl, scene);\r\n\r\n this.emissiveTexture.wrapU = Texture.CLAMP_ADDRESSMODE;\r\n this.emissiveTexture.wrapV = Texture.CLAMP_ADDRESSMODE;\r\n\r\n this._loaded = true;\r\n scene.unregisterBeforeRender(this._checkVisibility);\r\n }\r\n }\r\n\r\n private _loaded: boolean;\r\n private readonly _textureUrl: string;\r\n private readonly _subMesh: SubMesh;\r\n}\r\n","import { Scene, StandardMaterial, Texture } from '@babylonjs/core';\r\n\r\nexport class TextureMaterial extends StandardMaterial {\r\n public constructor(name: string, scene: Scene, textureUrl: string) {\r\n super(name, scene);\r\n\r\n this.disableDepthWrite = true;\r\n this.fogEnabled = false;\r\n\r\n this.emissiveTexture = new Texture(textureUrl, scene);\r\n this.emissiveTexture.wrapU = Texture.CLAMP_ADDRESSMODE;\r\n this.emissiveTexture.wrapV = Texture.CLAMP_ADDRESSMODE;\r\n }\r\n}\r\n","import { Scene, StandardMaterial, Texture, VideoTexture } from '@babylonjs/core';\r\n\r\nexport class VideoTextureMaterial extends StandardMaterial {\r\n public constructor(name: string, scene: Scene, textureUrl: string) {\r\n super(name, scene);\r\n\r\n let videoTexture = new VideoTexture(\r\n `${name}_texture`,\r\n textureUrl,\r\n scene,\r\n null,\r\n null,\r\n null,\r\n {\r\n autoPlay: true,\r\n autoUpdateTexture: true,\r\n loop: true\r\n }\r\n );\r\n\r\n videoTexture.vAng = Math.PI;\r\n\r\n this.emissiveTexture = videoTexture;\r\n this.emissiveTexture.wrapU = Texture.CLAMP_ADDRESSMODE;\r\n this.emissiveTexture.wrapV = Texture.CLAMP_ADDRESSMODE;\r\n }\r\n\r\n public get video(): HTMLVideoElement {\r\n return (this.emissiveTexture as VideoTexture).video;\r\n }\r\n\r\n public override dispose(doNotRecurse?: boolean, disposeMaterialAndTextures?: boolean): void {\r\n super.dispose(doNotRecurse, disposeMaterialAndTextures);\r\n\r\n //https://doc.babylonjs.com/features/featuresDeepDive/materials/using/videoTexture#disposal\r\n if (this.video && disposeMaterialAndTextures) {\r\n this.emissiveTexture.dispose();\r\n\r\n this.video.pause();\r\n\r\n // Remove any elements, etc.\r\n while (this.video.firstChild) {\r\n this.video.removeChild(this.video.lastChild);\r\n }\r\n\r\n this.video.removeAttribute('src'); // empty source\r\n this.video.load();\r\n this.video.remove();\r\n }\r\n }\r\n}\r\n","import { Matrix, Mesh, Scene, SubMesh, Vector3, VertexData } from '@babylonjs/core';\r\n\r\nexport class MeshBuilder {\r\n // Define rotation matrices for cube sides\r\n private static readonly _rotationFront = Matrix.Identity();\r\n private static readonly _rotationBack = Matrix.RotationY(Math.PI);\r\n private static readonly _rotationLeft = Matrix.RotationY(-Math.PI / 2);\r\n private static readonly _rotationRight = Matrix.RotationY(Math.PI / 2);\r\n private static readonly _rotationUp = Matrix.RotationX(-Math.PI / 2);\r\n private static readonly _rotationDown = Matrix.RotationX(Math.PI / 2);\r\n\r\n // Define cube sides with labels and corresponding rotation matrices\r\n public static cubeSides = [\r\n { Label: 'l', RotationMatrix: MeshBuilder._rotationLeft },\r\n { Label: 'f', RotationMatrix: MeshBuilder._rotationFront },\r\n { Label: 'r', RotationMatrix: MeshBuilder._rotationRight },\r\n { Label: 'b', RotationMatrix: MeshBuilder._rotationBack },\r\n { Label: 'u', RotationMatrix: MeshBuilder._rotationUp },\r\n { Label: 'd', RotationMatrix: MeshBuilder._rotationDown }\r\n ];\r\n\r\n // Create a cube strip mesh\r\n public static CreateCubeStrip(\r\n name: string,\r\n options: {\r\n width?: number,\r\n height?: number,\r\n subdivisions?: number,\r\n subdivisionsX?: number,\r\n subdivisionsY?: number,\r\n },\r\n scene: Scene\r\n ): Mesh {\r\n const cubestrip = new Mesh(name, scene);\r\n\r\n // Create vertex data for tiled ground\r\n const vertexData = MeshBuilder.CreateTiledGround({\r\n precision: 1,\r\n subdivisions: options.subdivisions,\r\n size: options.width\r\n });\r\n vertexData.applyToMesh(cubestrip, false);\r\n\r\n // Create submeshes for the cube strip\r\n const submeshes = [];\r\n\r\n const verticesCount = cubestrip.getTotalVertices();\r\n const subdivisionsX: number = options.subdivisionsX || options.subdivisions || 1;\r\n const subdivisionsY: number = options.subdivisionsY || options.subdivisions || 1;\r\n const tileIndicesLength =\r\n cubestrip.getIndices().length / (subdivisionsX * subdivisionsY) / MeshBuilder.cubeSides.length;\r\n const tileVerticesLength =\r\n verticesCount / (subdivisionsX * subdivisionsY) / MeshBuilder.cubeSides.length;\r\n\r\n let base = 0;\r\n let baseVertice = 0;\r\n let materialIndex = 0;\r\n for (let cubeSideIndex = 0; cubeSideIndex < MeshBuilder.cubeSides.length; cubeSideIndex++) {\r\n for (let row = 0; row < subdivisionsY; row++) {\r\n for (let col = 0; col < subdivisionsX; col++) {\r\n let submesh = new SubMesh(\r\n materialIndex++,\r\n baseVertice,\r\n tileVerticesLength,\r\n base,\r\n tileIndicesLength,\r\n cubestrip,\r\n null,\r\n true\r\n );\r\n\r\n submeshes.push(submesh);\r\n base += tileIndicesLength;\r\n baseVertice += tileVerticesLength;\r\n }\r\n }\r\n }\r\n\r\n // Assign submeshes to the cube strip\r\n cubestrip.subMeshes = submeshes;\r\n cubestrip.freezeWorldMatrix();\r\n return cubestrip;\r\n }\r\n\r\n public static CreateTiledGround(\r\n options: {\r\n size: number,\r\n subdivisions?: number,\r\n precision?: number\r\n }\r\n ): VertexData {\r\n const xmin = -options.size / 2 || -1.0;\r\n const ymin = -options.size / 2 || -1.0;\r\n const xmax = options.size / 2 || 1.0;\r\n const ymax = options.size / 2 || 1.0;\r\n\r\n let subdivisions = options.subdivisions || 1.0;\r\n let precision = options.precision || 1.0;\r\n\r\n const indices = [];\r\n const positions = [];\r\n const normals = [];\r\n const uvs = [];\r\n\r\n subdivisions = (subdivisions < 1) ? 1 : subdivisions;\r\n precision = (precision < 1) ? 1 : precision;\r\n\r\n const tileSize = {\r\n 'w': (xmax - xmin) / subdivisions,\r\n 'h': (ymax - ymin) / subdivisions\r\n };\r\n\r\n //extract function\r\n function applyTile(xTileMin: number, yTileMin: number, xTileMax: number, yTileMax: number, transformationMatrix: Matrix) {\r\n // Indices\r\n const base = positions.length / 3;\r\n const rowLength = precision + 1;\r\n\r\n for (let row = 0; row < precision; row++) {\r\n for (let col = 0; col < precision; col++) {\r\n const square = [\r\n base + col + row * rowLength,\r\n base + (col + 1) + row * rowLength,\r\n base + (col + 1) + (row + 1) * rowLength,\r\n base + col + (row + 1) * rowLength\r\n\r\n ];\r\n\r\n indices.push(square[1]);\r\n indices.push(square[2]);\r\n indices.push(square[3]);\r\n indices.push(square[0]);\r\n indices.push(square[1]);\r\n indices.push(square[3]);\r\n }\r\n }\r\n\r\n // Position, normals and uvs\r\n let position = Vector3.Zero();\r\n let normal = Vector3.TransformNormal(new Vector3(0, 0, -1.0), transformationMatrix);\r\n\r\n for (let row = 0; row <= precision; row++) {\r\n for (let col = 0; col <= precision; col++) {\r\n position.x = (col * (xTileMax - xTileMin)) / precision + xTileMin;\r\n position.y = (row * (yTileMax - yTileMin)) / precision + yTileMin;\r\n position.z = options.size / 2;\r\n position = Vector3.TransformCoordinates(position, transformationMatrix);\r\n\r\n positions.push(position.x, position.y, position.z);\r\n normals.push(normal.x, normal.y, normal.z);\r\n uvs.push(col / precision, row / precision);\r\n\r\n }\r\n }\r\n }\r\n\r\n for (let cubeSideIndex = 0; cubeSideIndex < MeshBuilder.cubeSides.length; cubeSideIndex++) {\r\n const cubeSide = MeshBuilder.cubeSides[cubeSideIndex];\r\n for (let tileRow = 0; tileRow < subdivisions; tileRow++) {\r\n for (let tileCol = 0; tileCol < subdivisions; tileCol++) {\r\n applyTile(\r\n xmin + tileCol * tileSize.w,\r\n ymin + tileRow * tileSize.h,\r\n xmin + (tileCol + 1) * tileSize.w,\r\n ymin + (tileRow + 1) * tileSize.h,\r\n cubeSide.RotationMatrix\r\n );\r\n }\r\n }\r\n }\r\n\r\n // Result\r\n const vertexData = new VertexData();\r\n\r\n vertexData.indices = indices;\r\n vertexData.positions = positions;\r\n vertexData.normals = normals;\r\n vertexData.uvs = uvs;\r\n\r\n return vertexData;\r\n }\r\n\r\n public static createSphere(name: string, scene: Scene): Mesh {\r\n const sphere = new Mesh(name, scene);\r\n const options = {\r\n diameter: 1304,\r\n sideOrientation: Mesh.BACKSIDE,\r\n widthSegments: 60,\r\n heightSegments: 30,\r\n updatable: false\r\n };\r\n\r\n const vertexData = MeshBuilder.createVertexDataSphere(options);\r\n vertexData.applyToMesh(sphere, options.updatable);\r\n\r\n return sphere;\r\n }\r\n\r\n private static createVertexDataSphere(\r\n options: {\r\n widthSegments?: number,\r\n heightSegments?: number,\r\n diameter?: number,\r\n sideOrientation?: number\r\n }\r\n ): VertexData {\r\n const widthSegments = Math.max(3, Math.floor(options.widthSegments) || 8);\r\n const heightSegments = Math.max(2, Math.floor(options.heightSegments) || 6);\r\n\r\n const radius = (options.diameter || 100) / 2;\r\n const phiStart = 0;\r\n const phiLength = Math.PI * 2;\r\n const thetaStart = 0;\r\n const thetaLength = Math.PI;\r\n\r\n const indexGrid: number[][] = [];\r\n const indices: number[] = [];\r\n const vertices: number[] = [];\r\n const normals: number[] = [];\r\n const uvs: number[] = [];\r\n\r\n for (let iy = 0; iy <= heightSegments; iy++) {\r\n const verticesRow: number[] = [];\r\n const v = iy / heightSegments;\r\n\r\n for (let ix = 0; ix <= widthSegments; ix++) {\r\n const u = ix / widthSegments;\r\n const vertex = new Vector3(\r\n radius * Math.sin(phiStart + u * phiLength) * Math.sin(thetaStart + v * thetaLength),\r\n radius * Math.cos(thetaStart + v * thetaLength),\r\n -radius * Math.cos(phiStart + u * phiLength) * Math.sin(thetaStart + v * thetaLength)\r\n );\r\n\r\n vertices.push(vertex.x, vertex.y, vertex.z);\r\n const normal = vertex.normalize();\r\n normals.push(normal.x, normal.y, normal.z);\r\n uvs.push(u, 1 - v);\r\n verticesRow.push(vertices.length / 3 - 1);\r\n }\r\n\r\n indexGrid.push(verticesRow);\r\n }\r\n\r\n for (let iy = 0; iy < heightSegments; iy++) {\r\n for (let ix = 0; ix < widthSegments; ix++) {\r\n const a = indexGrid[iy][ix + 1];\r\n const b = indexGrid[iy][ix];\r\n const c = indexGrid[iy + 1][ix];\r\n const d = indexGrid[iy + 1][ix + 1];\r\n\r\n if (iy !== 0 || thetaStart > 0) indices.push(a, b, d);\r\n if (iy !== heightSegments - 1 || thetaStart + thetaLength < Math.PI) indices.push(b, c, d);\r\n }\r\n }\r\n\r\n for (let i = 0; i < indices.length; i += 3) {\r\n [indices[i], indices[i + 2]] = [indices[i + 2], indices[i]];\r\n }\r\n\r\n for (let n = 0; n < normals.length; n++) {\r\n normals[n] = -normals[n];\r\n }\r\n\r\n const vertexData = new VertexData();\r\n vertexData.indices = indices;\r\n vertexData.positions = vertices;\r\n vertexData.normals = normals;\r\n vertexData.uvs = uvs;\r\n\r\n return vertexData;\r\n }\r\n}\r\n","import { ActionManager, Camera, Engine, Scene, SceneOptions, TransformNode, Vector3 } from '@babylonjs/core';\r\nimport { ICamera } from 'Framework/Components/Controls/XView/Cameras';\r\nimport { IConfiguration } from 'Framework/Components/Controls/XView/Core';\r\nimport { IRenderer } from 'Framework/Components/Controls/XView/Renderers/IRenderer';\r\n\r\nexport abstract class BaseRenderer extends Scene implements IRenderer {\r\n protected constructor(engine: Engine, camera: ICamera, options?: SceneOptions) {\r\n super(engine, options);\r\n this.addTransformNode(new TransformNode('root'));\r\n\r\n this.metadata = { isRenderer: true };\r\n\r\n this.autoClear = false;\r\n this.actionManager = new ActionManager(this);\r\n\r\n this.camera = camera;\r\n }\r\n\r\n public load(configuration: TConfiguration): this {\r\n if (this._configuration) {\r\n this._clearScene();\r\n }\r\n\r\n this._configuration = configuration;\r\n\r\n this.camera.fov = configuration.Fov || Math.PI / 2;\r\n\r\n this.camera.maxFov = configuration.MaxFov || Math.PI / 2;\r\n this.camera.minFov = configuration.MinFov || Math.PI / 180;\r\n\r\n this.onLoad(configuration);\r\n\r\n return this;\r\n }\r\n\r\n public setOrigin(originX: number, originY: number, originZ: number): void {\r\n const transformNode = this.getTransformNodeByName('root');\r\n\r\n transformNode.position = new Vector3(originX, originY, originZ);\r\n }\r\n\r\n protected abstract onLoad(configuration: TConfiguration): void;\r\n\r\n public override dispose(): void {\r\n this._clearScene();\r\n\r\n super.dispose();\r\n }\r\n\r\n protected _clearScene(): void {\r\n while(this.textures.length > 0) {\r\n const texture = this.textures[0];\r\n texture.dispose();\r\n }\r\n\r\n while(this.materials.length > 0) {\r\n const material = this.materials[0];\r\n material.dispose();\r\n }\r\n\r\n while(this.meshes.length > 0) {\r\n const mesh = this.meshes[0];\r\n mesh.dispose(false, true);\r\n }\r\n }\r\n\r\n public get camera(): ICamera {\r\n return this._camera;\r\n }\r\n\r\n public set camera(value: ICamera) {\r\n this._camera = value;\r\n\r\n this.activeCamera = value as unknown as Camera;\r\n }\r\n\r\n protected _configuration: TConfiguration;\r\n private _camera: ICamera;\r\n}","import { Engine, Mesh, MultiMaterial, SceneOptions, StandardMaterial } from '@babylonjs/core';\r\nimport { ICamera } from 'Framework/Components/Controls/XView/Cameras';\r\nimport { IPanoramaConfiguration } from 'Framework/Components/Controls/XView/Core';\r\nimport { LazyTextureMaterial, TextureMaterial } from 'Framework/Components/Controls/XView/Materials';\r\nimport { MeshBuilder } from 'Framework/Components/Controls/XView/MeshBuilder';\r\nimport { BaseRenderer } from 'Framework/Components/Controls/XView/Renderers/BaseRenderer';\r\nimport { UIElement } from 'Framework/Components/UIElement';\r\n\r\nexport class Cube360Renderer extends BaseRenderer {\r\n public constructor(engine: Engine, camera: ICamera, options?: SceneOptions) {\r\n super(engine, camera, options);\r\n\r\n this.registerBeforeRender(() => this._cullingLevel());\r\n }\r\n\r\n protected override onLoad(configuration: IPanoramaConfiguration): void {\r\n this.camera.lookTo(configuration.startOrientation);\r\n\r\n //this._camera.idleRotationWaitTime = configuration.idleRotationWaitTime || 2000;\r\n //this._camera.idleRotationSpeed = configuration.idleRotationSpeed || 0.1;\r\n //this._camera.autoRotationEnabled = false;\r\n\r\n this._levelCubeMeshes = new Array();\r\n\r\n for (let level = 1; level <= configuration.MaxLevel; level++) {\r\n let panoramaLevel = configuration.Levels[level - 1];\r\n let faceSize = panoramaLevel.ImageWidth;\r\n let subdivisions = faceSize / panoramaLevel.TileSize;\r\n\r\n let mesh = MeshBuilder.CreateCubeStrip(`CubeStrip_${level}`, { width: faceSize, height: faceSize, subdivisions: subdivisions }, this);\r\n this._levelCubeMeshes.push(mesh);\r\n mesh.actionManager = this.actionManager;\r\n\r\n let loadedTextures: Array>;\r\n\r\n if (level === 1) {\r\n loadedTextures = new Array>();\r\n }\r\n\r\n let multimat = new MultiMaterial('multi_mat_' + level, this);\r\n\r\n mesh.material = multimat;\r\n let subMeshIndex = 0;\r\n\r\n for (let cubeSide of MeshBuilder.cubeSides) {\r\n for (let y = subdivisions - 1; y >= 0; y -= 1) {\r\n for (let x = 0; x < subdivisions; x++) {\r\n let url = configuration.Url\r\n .replace('%lvl', level.toString())\r\n .replace('%s', cubeSide.Label)\r\n .replace('%h', x.toString())\r\n .replace('%v', y.toString());\r\n\r\n const materialName = `mat_${level}_${cubeSide.Label}_${x}_${y}`;\r\n\r\n let material: StandardMaterial = level == 1\r\n ? new TextureMaterial(materialName, this, url)\r\n : new LazyTextureMaterial(materialName, this, url, mesh.subMeshes[subMeshIndex]);\r\n\r\n multimat.subMaterials.push(material);\r\n subMeshIndex++;\r\n }\r\n }\r\n }\r\n\r\n if (level > 1) {\r\n mesh.isVisible = false;\r\n }\r\n else {\r\n const _ = Promise\r\n .all(loadedTextures)\r\n .then(t => {\r\n if (t.every(isLoaded => isLoaded === true)) {\r\n UIElement.Bus.$emit('preview-loaded');\r\n }\r\n });\r\n }\r\n }\r\n }\r\n\r\n private _cullingLevel(): void {\r\n if (!this._configuration) {\r\n return;\r\n }\r\n\r\n let maxLevel = this._configuration.MaxLevel;\r\n\r\n const percent = ((this.camera.maxFov - this.camera.fov) / this.camera.maxFov);\r\n let currentLayerDepth = Math.trunc(maxLevel * percent);\r\n\r\n if (currentLayerDepth < 1) {\r\n currentLayerDepth = 1;\r\n }\r\n\r\n if (currentLayerDepth >= maxLevel) {\r\n currentLayerDepth = maxLevel - 1;\r\n }\r\n\r\n for (let level = 0; level < maxLevel; level++) {\r\n let panoramaLevel = this._levelCubeMeshes[level];\r\n\r\n panoramaLevel.isVisible = level == 0 || currentLayerDepth == level;\r\n }\r\n }\r\n\r\n private _levelCubeMeshes: Array;\r\n}\r\n","import { Engine, SceneOptions, StandardMaterial, Vector3 } from '@babylonjs/core';\r\nimport { ICamera } from 'Framework/Components/Controls/XView/Cameras';\r\nimport { IPanoramaConfiguration } from 'Framework/Components/Controls/XView/Core';\r\nimport { TextureMaterial, VideoTextureMaterial } from 'Framework/Components/Controls/XView/Materials';\r\nimport { MeshBuilder } from 'Framework/Components/Controls/XView/MeshBuilder';\r\nimport { BaseRenderer } from 'Framework/Components/Controls/XView/Renderers/BaseRenderer';\r\nimport { UIElement } from 'Framework/Components/UIElement';\r\n\r\nexport class Sphere360Renderer extends BaseRenderer {\r\n public constructor(engine: Engine, camera: ICamera, options?: SceneOptions) {\r\n super(engine, camera, options);\r\n }\r\n\r\n protected override onLoad(configuration: IPanoramaConfiguration): void {\r\n this.camera.lookTo(configuration.startOrientation);\r\n\r\n //this._camera.idleRotationWaitTime = configuration.idleRotationWaitTime || 2000;\r\n //this._camera.idleRotationSpeed = configuration.idleRotationSpeed || 0.1;\r\n //this._camera.autoRotationEnabled = false;\r\n\r\n let sphere = MeshBuilder.createSphere('sphere1', this);\r\n sphere.setAbsolutePosition(Vector3.Zero());\r\n\r\n let material: StandardMaterial = null;\r\n\r\n if (configuration.Url.includes('video')) {\r\n // .mp4, .webm, and .ogv \r\n const videoMaterial = new VideoTextureMaterial('video', this, configuration.Url);\r\n\r\n this.onPointerDown = (evt, pi) => {\r\n this._isCameraMoving = false;\r\n };\r\n\r\n this.onPointerMove = (evt, pi) => {\r\n this._isCameraMoving = true;\r\n };\r\n\r\n this.onPointerUp = async (evt, pi) => {\r\n if (this._isCameraMoving) {\r\n return;\r\n }\r\n\r\n if (videoMaterial.video.paused) {\r\n await videoMaterial.video.play();\r\n }\r\n else {\r\n videoMaterial.video.pause();\r\n }\r\n };\r\n\r\n material = videoMaterial;\r\n }\r\n else {\r\n material = new TextureMaterial('texture', this, configuration.Url);\r\n }\r\n\r\n sphere.material = material;\r\n\r\n UIElement.Bus.$emit('preview-loaded');\r\n }\r\n\r\n private _isCameraMoving: boolean;\r\n}\r\n","import { Engine, Mesh, MeshBuilder, SceneOptions, StandardMaterial, Vector3 } from '@babylonjs/core';\r\nimport { ICamera } from 'Framework/Components/Controls/XView/Cameras';\r\nimport { IFlatConfiguration } from 'Framework/Components/Controls/XView/Core';\r\nimport { TextureMaterial } from 'Framework/Components/Controls/XView/Materials';\r\nimport { BaseRenderer } from 'Framework/Components/Controls/XView/Renderers/BaseRenderer';\r\n\r\nexport class Flat2DRenderer extends BaseRenderer {\r\n public constructor(engine: Engine, camera: ICamera, options?: SceneOptions) {\r\n super(engine, camera, options);\r\n }\r\n\r\n protected override onLoad(configuration: IFlatConfiguration): void {\r\n this.camera.lookTo(configuration.startPosition);\r\n\r\n const ratio = this._configuration.ratio;\r\n\r\n this._plane = MeshBuilder.CreatePlane('plane', { width: 1, height: 1 / ratio }, this);\r\n this._plane.parent = this.getTransformNodeByName('root');\r\n this._plane.position = new Vector3(0.5, 0.5 / ratio, 0);\r\n let material: StandardMaterial = new TextureMaterial('material_2D_Plane', this, this._configuration.url);\r\n\r\n this._plane.material = material;\r\n }\r\n\r\n public fitWidth(): this {\r\n this._internalFit();\r\n\r\n return this;\r\n }\r\n\r\n public fitHeight(): this {\r\n const engine = this.getEngine();\r\n\r\n const containerRatio = engine.getRenderWidth() / engine.getRenderHeight();\r\n\r\n this._internalFit(containerRatio / this._configuration.ratio);\r\n\r\n return this;\r\n }\r\n\r\n public fit(): this {\r\n const engine = this.getEngine();\r\n\r\n const imageRatio = this._configuration.ratio;\r\n const containerRatio = engine.getRenderWidth() / engine.getRenderHeight();\r\n\r\n if (imageRatio > containerRatio) {\r\n //Fit width\r\n this._internalFit();\r\n }\r\n else {\r\n //Fit height\r\n this._internalFit(containerRatio / imageRatio);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Adjusts the camera's field of view (FOV) based on a given scale.\r\n * @param scale Scale of the image (1 = 100%) of the image width.\r\n * If you want to adjust to a specific width, the Scale is the desired width.\r\n * If you want to adjust to a specific height, the Scale is the desired height multiplied by the camera's aspect ratio.\r\n */\r\n private _internalFit(scale: number = 1): void {\r\n this.camera.fov = 2 * Math.atan(scale);\r\n }\r\n\r\n private _plane: Mesh;\r\n}","import { Color3, Vector2 } from '@babylonjs/core';\r\nimport { Button, Control, StackPanel, TextWrapping } from '@babylonjs/gui/2D';\r\nimport { GuiOverlay } from 'Framework/Components/Controls/XView/Overlays';\r\n\r\ntype ContextMenuButtonType = 'Normal' | 'Image';\r\n\r\ninterface IContextMenuItem {\r\n buttonType: ContextMenuButtonType,\r\n text?: string,\r\n imageUrl?: string,\r\n foreground?: Color3,\r\n background?: Color3,\r\n tickness?: number,\r\n isVisible?: boolean,\r\n id: string\r\n}\r\n\r\ninterface IContextMenu {\r\n fontSize?: number,\r\n fontFamily?: string,\r\n}\r\n\r\nexport class ContextMenu extends StackPanel {\r\n public constructor(name: string, guiRenderer: GuiOverlay, options?: IContextMenu) {\r\n super(name);\r\n\r\n this._guiRenderer = guiRenderer;\r\n\r\n this.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP;\r\n this.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;\r\n\r\n this.style = this._guiRenderer.createStyle();\r\n this.style.fontFamily = options?.fontFamily ?? this.fontFamily;\r\n this.style.fontSize = options?.fontSize ?? this.fontSize;\r\n\r\n this.isVisible = false;\r\n\r\n this._guiRenderer.addControl(this);\r\n }\r\n\r\n public *addMenuItems(...items: Array): IterableIterator {\r\n for (const menuItem of items) {\r\n const button: Button = this._createButton(menuItem);\r\n\r\n this.addControl(button);\r\n\r\n yield button;\r\n }\r\n\r\n this.widthInPixels = this._computeMaxWidth();\r\n }\r\n\r\n public removeMenuItems(items: Array, dispose: boolean = true): void {\r\n items.forEach(i => {\r\n this.removeControl(i)\r\n\r\n if (dispose) {\r\n i.dispose();\r\n }\r\n });\r\n }\r\n\r\n public showAt(positionX: number, positionY: number): void {\r\n this._openAt = new Vector2(positionX, positionY);\r\n\r\n this.leftInPixels = this._computeLeftInPixels(positionX);\r\n this.topInPixels = this._computeTopInPixels(positionY);\r\n\r\n this._setIsOpen(true);\r\n }\r\n\r\n public close(): void {\r\n this._setIsOpen(false);\r\n }\r\n\r\n private _createButton(options: IContextMenuItem): Button {\r\n let button: Button = null;\r\n\r\n switch (options.buttonType) {\r\n case 'Normal':\r\n button = Button.CreateSimpleButton(options.id, options.text);\r\n break;\r\n default:\r\n throw new Error('Not implemented type');\r\n }\r\n\r\n button.isVisible = options.isVisible ?? true;\r\n button.thickness = options.tickness ?? 0;\r\n button.color = (options.foreground ?? Color3.White()).toHexString();\r\n button.background = (options.background ?? Color3.Black()).toHexString();\r\n button.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;\r\n button.verticalAlignment = Control.VERTICAL_ALIGNMENT_CENTER;\r\n button.adaptHeightToChildren = true;\r\n button.adaptWidthToChildren = true;\r\n\r\n button.textBlock.textWrapping = TextWrapping.WordWrap;\r\n button.textBlock.resizeToFit = true;\r\n button.textBlock.paddingTop = 8;\r\n button.textBlock.paddingBottom = 8;\r\n button.textBlock.paddingLeft = 10;\r\n button.textBlock.paddingRight = 10;\r\n button.textBlock.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;\r\n button.style = this.style;\r\n\r\n return button;\r\n }\r\n\r\n private _computeLeftInPixels(desiredLeft: number): number {\r\n const widthScreen: number = this._guiRenderer.uiTexture.rootContainer.widthInPixels;\r\n const isWidthOverBoudingScreen: boolean = (desiredLeft + this.widthInPixels) >= widthScreen;\r\n\r\n return isWidthOverBoudingScreen\r\n ? desiredLeft - this.widthInPixels\r\n : desiredLeft;\r\n }\r\n\r\n private _computeTopInPixels(desiredTop: number): number {\r\n const heightScreen: number = this._guiRenderer.uiTexture.rootContainer.heightInPixels;\r\n const isHeightOverBoundingScreen: boolean = (desiredTop + this.heightInPixels) >= heightScreen;\r\n\r\n return isHeightOverBoundingScreen\r\n ? desiredTop - this.heightInPixels\r\n : desiredTop;\r\n }\r\n\r\n private _computeMaxWidth(): number {\r\n const context = this._guiRenderer.uiTexture.getContext();\r\n context.font = `${this.style.fontSize} ${this.style.fontFamily}`;\r\n\r\n return Math.ceil(Math.max(...this.children.map((c: Button) => (\r\n context.measureText(c.textBlock.text).width\r\n + c.textBlock.paddingLeftInPixels\r\n + c.textBlock.paddingRightInPixels\r\n ))));\r\n }\r\n\r\n public get openAt(): Vector2 {\r\n return this._openAt;\r\n }\r\n\r\n public get isOpen(): boolean {\r\n return this._isOpen;\r\n }\r\n\r\n private _setIsOpen(value: boolean): void {\r\n this._isOpen = value;\r\n this.isVisible = value;\r\n }\r\n\r\n private _openAt: Vector2;\r\n private _isOpen: boolean;\r\n private readonly _guiRenderer: GuiOverlay;\r\n}\r\n","import { ActionManager, Camera, Color4, Engine, EventState, FileTools, IScreenshotSize, Observable, PickingInfo, Scene, Tools, TransformNode, Vector3 } from '@babylonjs/core';\r\nimport { Flat2DCamera, ICamera, Sphere360Camera } from 'Framework/Components/Controls/XView/Cameras';\r\nimport { IConfiguration, ICoordinates, IIconProvider, RenderType, isFlatConfiguration, isPanoramaConfiguration } from 'Framework/Components/Controls/XView/Core';\r\nimport { BaseHotspotOverlay, GuiOverlay, Hotspot360Overlay, HotspotFlat2DOverlay } from 'Framework/Components/Controls/XView/Overlays';\r\nimport { Cube360Renderer, Sphere360Renderer } from 'Framework/Components/Controls/XView/Renderers';\r\nimport { Flat2DRenderer } from 'Framework/Components/Controls/XView/Renderers/Flat2DRenderer';\r\nimport { IRenderer } from 'Framework/Components/Controls/XView/Renderers/IRenderer';\r\nimport { ContextMenu } from 'Framework/Components/Controls/XView/XView.ContextMenu';\r\nimport { UIElement } from 'Framework/Components/UIElement';\r\n\r\nexport class Viewer360 extends UIElement {\r\n public constructor(canvasElement: HTMLCanvasElement, iconProvider: IIconProvider, onCameraChangeCallback: (eventData: Sphere360Camera, eventState: EventState) => void = null) {\r\n super(...arguments);\r\n\r\n FileTools.CorsBehavior = 'use-credentials';\r\n\r\n this._canvasElement = canvasElement;\r\n this._engine = new Engine(this._canvasElement);\r\n this._mainScene = new Scene(this._engine);\r\n this._mainScene.clearColor = new Color4(0, 0, 0, 0);\r\n\r\n let camera = new Sphere360Camera('Camera', this._mainScene);\r\n camera.attachControl(false);\r\n this._camera = camera;\r\n\r\n this._uiScene = new GuiOverlay(this._engine);\r\n this._uiScene.activeCamera = camera;\r\n this._engine.displayLoadingUI();\r\n\r\n this._iconProvider = iconProvider;\r\n this._onCameraChangeCallback = onCameraChangeCallback;\r\n\r\n this._mainScene.actionManager = new ActionManager(this._mainScene);\r\n\r\n this._contextMenu = new ContextMenu(\r\n 'contextMenu',\r\n this._uiScene as GuiOverlay,\r\n {\r\n fontSize: 12,\r\n fontFamily: 'Tahoma, Arial, sans-serif'\r\n }\r\n );\r\n\r\n this.isMobile = this.viewerWidth < 600;\r\n\r\n // the canvas/window resize event handler\r\n window.addEventListener('resize', this.resizeHandler);\r\n\r\n UIElement.Bus.$on('look-to-event-bus', this._lookToEventAction);\r\n UIElement.Bus.$on('set-fov', this._setFovAction);\r\n UIElement.Bus.$on('refresh-hotspots', this._refreshHotspotsAction);\r\n }\r\n\r\n public beforeDestroy(): void {\r\n window.removeEventListener('resize', this.resizeHandler);\r\n\r\n UIElement.Bus.$off('look-to-event-bus', this._lookToEventAction);\r\n UIElement.Bus.$off('set-fov', this._setFovAction);\r\n UIElement.Bus.$off('refresh-hotspots', this._refreshHotspotsAction);\r\n\r\n this._engine.dispose();\r\n }\r\n\r\n public addNewScene(): Scene {\r\n const scene = new Scene(this._engine);\r\n scene.autoClear = false;\r\n scene.addTransformNode(new TransformNode('root'));\r\n\r\n return scene;\r\n }\r\n\r\n /**\r\n * Defines the target the camera should look at,\r\n * @param position Cartesian coordinates, if null or undefined a zero value will be apply.\r\n */\r\n public lookTo(position: Vector3 | ICoordinates): void {\r\n this._camera.lookTo(position);\r\n }\r\n\r\n public takeScreenshotAsync(): Promise {\r\n const size: IScreenshotSize = this._canvasElement;\r\n\r\n return Tools.CreateScreenshotUsingRenderTargetAsync(this._engine, this.camera, size);\r\n }\r\n\r\n public async loadConfigurationAsync(configuration: IConfiguration): Promise {\r\n if (this._configuration) {\r\n //remove all scene except the main and GuiOverlay\r\n while (this._engine.scenes.length > 2) {\r\n const scene = this._engine.scenes[2];\r\n scene.dispose();\r\n }\r\n }\r\n\r\n UIElement.Bus.$emit('preview-loaded');\r\n\r\n this._configuration = configuration;\r\n\r\n if (isPanoramaConfiguration(configuration)) {\r\n this._internalRenderer = configuration.RenderType == RenderType.Cube\r\n ? new Cube360Renderer(this._engine, this._camera)\r\n : new Sphere360Renderer(this._engine, this._camera);\r\n\r\n this._internalRenderer.load(configuration);\r\n\r\n this._hotspotRenderer = new Hotspot360Overlay(\r\n this._engine,\r\n this,\r\n this._camera,\r\n 255,\r\n this._iconProvider\r\n );\r\n }\r\n else if (isFlatConfiguration(configuration)) {\r\n this.camera = new Flat2DCamera('Camera', this._mainScene);\r\n this.camera.attachControl(false);\r\n\r\n this._internalRenderer = new Flat2DRenderer(this._engine, this._camera)\r\n .load(configuration)\r\n .fit();\r\n\r\n this._hotspotRenderer = new HotspotFlat2DOverlay(\r\n this._engine,\r\n this,\r\n this._camera,\r\n configuration.ratio,\r\n this._iconProvider\r\n );\r\n }\r\n\r\n await this._hotspotRenderer.loadHotspotsAsync(configuration.hotspots);\r\n\r\n if (this._onCameraChangeCallback) {\r\n this.camera.onViewMatrixChangedObservable.clear();\r\n this.camera.onProjectionMatrixChangedObservable.clear();\r\n\r\n this.camera.onViewMatrixChangedObservable.add(this._onCameraChangeCallback);\r\n this.camera.onProjectionMatrixChangedObservable.add(this._onCameraChangeCallback);\r\n }\r\n\r\n this.startRendering();\r\n\r\n UIElement.Bus.$emit('configuration-changed', { sender: this, args: configuration });\r\n\r\n this._engine.hideLoadingUI();\r\n }\r\n\r\n public stopRendering(): void {\r\n this._engine.stopRenderLoop();\r\n }\r\n\r\n /**\r\n * run the render loop\r\n */\r\n public startRendering(): void {\r\n this._engine.runRenderLoop(() => {\r\n if (!this._mainScene.isDisposed && this._mainScene.activeCamera != null) {\r\n this._mainScene.render();\r\n\r\n for (const scene of this._engine.scenes) {\r\n if (scene != this._mainScene\r\n && scene != this._uiScene) {\r\n scene.render();\r\n }\r\n }\r\n\r\n if (this._uiScene.activeCamera) {\r\n this._uiScene.render();\r\n }\r\n }\r\n });\r\n }\r\n\r\n public resizeView(): void {\r\n this._engine.resize();\r\n }\r\n\r\n public setSizeView(width: number, height: number): void {\r\n this._engine.setSize(width, height);\r\n }\r\n\r\n public pick(x: number, y: number): PickingInfo {\r\n return this._internalRenderer?.pick(x, y);\r\n }\r\n\r\n private _refreshHotspots(): void {\r\n this._hotspotRenderer.clear();\r\n const _ = this._hotspotRenderer.loadHotspotsAsync(this._configuration.hotspots);\r\n }\r\n\r\n private _setFov(fov: number): void {\r\n this.camera.fov = fov;\r\n }\r\n\r\n public get FPS(): number {\r\n return this._engine.getFps();\r\n }\r\n\r\n public get camera(): Camera & ICamera {\r\n return this._camera;\r\n }\r\n\r\n private set camera(value: Camera & ICamera) {\r\n this._camera = value;\r\n }\r\n\r\n public get contextMenu(): ContextMenu {\r\n return this._contextMenu;\r\n }\r\n\r\n public get viewerWidth(): number {\r\n return Math.max(\r\n document.documentElement.clientWidth || 0,\r\n window.innerWidth || 0\r\n );\r\n }\r\n\r\n public get isMobile(): boolean {\r\n return this._isMobile;\r\n }\r\n\r\n public set isMobile(value: boolean) {\r\n if (this._isMobile != value) {\r\n this._isMobile = value;\r\n this.onMobileObservable.notifyObservers(value)\r\n }\r\n }\r\n\r\n public get scenes(): Array {\r\n return this._engine.scenes;\r\n }\r\n\r\n public readonly resizeHandler = (_e: UIEvent) => {\r\n this.isMobile = this.viewerWidth < 600;\r\n this._engine.resize();\r\n }\r\n\r\n public onMobileObservable: Observable = new Observable();\r\n public autoRotationEnabled: boolean;\r\n public isCameraMoving: boolean;\r\n\r\n private readonly _contextMenu: ContextMenu;\r\n private readonly _canvasElement: HTMLCanvasElement;\r\n private readonly _engine: Engine;\r\n private readonly _mainScene: Scene;\r\n private readonly _uiScene: Scene;\r\n private readonly _iconProvider: IIconProvider;\r\n private readonly _lookToEventAction: (sender: any, e: Vector3) => void = (o, e) => this.lookTo(e);\r\n private readonly _setFovAction: (e: { sender: any, fov: number }) => void = (e) => this._setFov(e.fov);\r\n private readonly _refreshHotspotsAction: () => void = () => this._refreshHotspots();\r\n private readonly _onCameraChangeCallback: (eventData: Sphere360Camera, eventState: EventState) => void;\r\n\r\n private _hotspotRenderer: BaseHotspotOverlay;\r\n private _configuration: IConfiguration;\r\n private _internalRenderer: IRenderer;\r\n private _isMobile: boolean;\r\n private _camera: Camera & ICamera;\r\n}\r\n","export class ColorHelper {\r\n public static ParseHexToRgbaString(hex: string): string {\r\n const color = ColorHelper._parseHexToRgba(hex);\r\n return `rgba(${color.r},${color.g},${color.b},${color.a})`;\r\n }\r\n\r\n public static ParseColorToHexa(color: string): string {\r\n let r: number;\r\n let g: number;\r\n let b: number;\r\n let a: number;\r\n\r\n if (color.startsWith('#')) {\r\n if (color.length == 7 || color.length == 9) {\r\n return color;\r\n }\r\n else {\r\n throw Error('Wrong hex color');\r\n }\r\n\r\n }\r\n else if (color.startsWith('rgb')) {\r\n const rgba = ColorHelper.ParseColorToRgba(color);\r\n\r\n return ColorHelper._rgbToHex(rgba.r, rgba.g, rgba.b, rgba.a * 255);\r\n }\r\n\r\n return ColorHelper._parseColorNameToHex(color);\r\n }\r\n\r\n public static ParseColorToRgba(color: string): { r: number, g: number, b: number, a: number } {\r\n if (color.startsWith('#')) {\r\n return ColorHelper._parseHexToRgba(color);\r\n }\r\n else if (!color.startsWith('rgb')) {\r\n return ColorHelper._parseHexToRgba(ColorHelper._parseColorNameToHex(color));\r\n }\r\n\r\n const [r, g, b, a] = color\r\n .slice(color.indexOf('(') + 1, -1)\r\n .split(',');\r\n\r\n return {\r\n r: Number.parseInt(r),\r\n g: Number.parseInt(g),\r\n b: Number.parseInt(b),\r\n a: Number.parseFloat(a) ?? 1\r\n };\r\n }\r\n\r\n /**\r\n * Check whether the given background color is \"light\" or \"dark\", to determine whether\r\n * the foreground color should be black or white accordingly.\r\n *\r\n * Implemenation of this W3C's algorithm: https://www.w3.org/TR/AERT/#color-contrast\r\n * @param color\r\n */\r\n public static IsLightBackgroundColor(color: string): boolean {\r\n const rgba = ColorHelper.ParseColorToRgba(color);\r\n\r\n const brightness = (rgba.r * 299 + rgba.g * 587 + rgba.b * 114) / 1000;\r\n\r\n return brightness > 125 || rgba.a < 0.5;\r\n }\r\n\r\n private static _rgbToHex(r: number, g: number, b: number, a: number) {\r\n const rHex = ((r & 0xff) + 0x100).toString(16).slice(1);\r\n const gHex = ((g & 0xff) + 0x100).toString(16).slice(1);\r\n const bHex = ((b & 0xff) + 0x100).toString(16).slice(1);\r\n const aHex = ((a & 0xff) + 0x100).toString(16).slice(1);\r\n\r\n return `#${rHex}${gHex}${bHex}${aHex}`.toUpperCase();\r\n }\r\n\r\n private static _parseHexToRgba(hex: string): { r: number, g: number, b: number, a: number } {\r\n // Expand shorthand form (e.g. '03FE') to full form (e.g. '0033FFEE')\r\n const shorthandRegex = /^#?([a-f\\d])([a-f\\d])([a-f\\d])([a-f\\d])$/i;\r\n hex = hex.replace(shorthandRegex, (m, r, g, b, a) => {\r\n return r + r + g + g + b + b + a + a;\r\n });\r\n\r\n const result = /^#?(?[a-f\\d]{2})(?[a-f\\d]{2})(?[a-f\\d]{2})(?[a-f\\d]{2})?$/i.exec(hex);\r\n\r\n return result ? {\r\n r: parseInt(result.groups.r, 16),\r\n g: parseInt(result.groups.g, 16),\r\n b: parseInt(result.groups.b, 16),\r\n a: parseInt(result.groups.a ?? 'ff', 16) / 255\r\n } : null;\r\n }\r\n\r\n private static _parseColorNameToHex(colorName: string): string {\r\n const hexColor = ColorHelper.colors[colorName.toLowerCase()];\r\n\r\n return hexColor\r\n ? `${hexColor}ff`\r\n : '#000000ff';\r\n }\r\n\r\n static readonly colors = {\r\n 'aliceblue': '#f0f8ff',\r\n 'antiquewhite': '#faebd7',\r\n 'aqua': '#00ffff',\r\n 'aquamarine': '#7fffd4',\r\n 'azure': '#f0ffff',\r\n 'beige': '#f5f5dc',\r\n 'bisque': '#ffe4c4',\r\n 'black': '#000000',\r\n 'blanchedalmond': '#ffebcd',\r\n 'blue': '#0000ff',\r\n 'blueviolet': '#8a2be2',\r\n 'brown': '#a52a2a',\r\n 'burlywood': '#deb887',\r\n 'cadetblue': '#5f9ea0',\r\n 'chartreuse': '#7fff00',\r\n 'chocolate': '#d2691e',\r\n 'coral': '#ff7f50',\r\n 'cornflowerblue': '#6495ed',\r\n 'cornsilk': '#fff8dc',\r\n 'crimson': '#dc143c',\r\n 'cyan': '#00ffff',\r\n 'darkblue': '#00008b',\r\n 'darkcyan': '#008b8b',\r\n 'darkgoldenrod': '#b8860b',\r\n 'darkgray': '#a9a9a9',\r\n 'darkgreen': '#006400',\r\n 'darkkhaki': '#bdb76b',\r\n 'darkmagenta': '#8b008b',\r\n 'darkolivegreen': '#556b2f',\r\n 'darkorange': '#ff8c00',\r\n 'darkorchid': '#9932cc',\r\n 'darkred': '#8b0000',\r\n 'darksalmon': '#e9967a',\r\n 'darkseagreen': '#8fbc8f',\r\n 'darkslateblue': '#483d8b',\r\n 'darkslategray': '#2f4f4f',\r\n 'darkturquoise': '#00ced1',\r\n 'darkviolet': '#9400d3',\r\n 'deeppink': '#ff1493',\r\n 'deepskyblue': '#00bfff',\r\n 'dimgray': '#696969',\r\n 'dodgerblue': '#1e90ff',\r\n 'firebrick': '#b22222',\r\n 'floralwhite': '#fffaf0',\r\n 'forestgreen': '#228b22',\r\n 'fuchsia': '#ff00ff',\r\n 'gainsboro': '#dcdcdc',\r\n 'ghostwhite': '#f8f8ff',\r\n 'gold': '#ffd700',\r\n 'goldenrod': '#daa520',\r\n 'gray': '#808080',\r\n 'green': '#008000',\r\n 'greenyellow': '#adff2f',\r\n 'honeydew': '#f0fff0',\r\n 'hotpink': '#ff69b4',\r\n 'indianred ': '#cd5c5c',\r\n 'indigo': '#4b0082',\r\n 'ivory': '#fffff0',\r\n 'khaki': '#f0e68c',\r\n 'lavender': '#e6e6fa',\r\n 'lavenderblush': '#fff0f5',\r\n 'lawngreen': '#7cfc00',\r\n 'lemonchiffon': '#fffacd',\r\n 'lightblue': '#add8e6',\r\n 'lightcoral': '#f08080',\r\n 'lightcyan': '#e0ffff',\r\n 'lightgoldenrodyellow': '#fafad2',\r\n 'lightgrey': '#d3d3d3',\r\n 'lightgreen': '#90ee90',\r\n 'lightpink': '#ffb6c1',\r\n 'lightsalmon': '#ffa07a',\r\n 'lightseagreen': '#20b2aa',\r\n 'lightskyblue': '#87cefa',\r\n 'lightslategray': '#778899',\r\n 'lightsteelblue': '#b0c4de',\r\n 'lightyellow': '#ffffe0',\r\n 'lime': '#00ff00',\r\n 'limegreen': '#32cd32',\r\n 'linen': '#faf0e6',\r\n 'magenta': '#ff00ff',\r\n 'maroon': '#800000',\r\n 'mediumaquamarine': '#66cdaa',\r\n 'mediumblue': '#0000cd',\r\n 'mediumorchid': '#ba55d3',\r\n 'mediumpurple': '#9370d8',\r\n 'mediumseagreen': '#3cb371',\r\n 'mediumslateblue': '#7b68ee',\r\n 'mediumspringgreen': '#00fa9a',\r\n 'mediumturquoise': '#48d1cc',\r\n 'mediumvioletred': '#c71585',\r\n 'midnightblue': '#191970',\r\n 'mintcream': '#f5fffa',\r\n 'mistyrose': '#ffe4e1',\r\n 'moccasin': '#ffe4b5',\r\n 'navajowhite': '#ffdead',\r\n 'navy': '#000080',\r\n 'oldlace': '#fdf5e6',\r\n 'olive': '#808000',\r\n 'olivedrab': '#6b8e23',\r\n 'orange': '#ffa500',\r\n 'orangered': '#ff4500',\r\n 'orchid': '#da70d6',\r\n 'palegoldenrod': '#eee8aa',\r\n 'palegreen': '#98fb98',\r\n 'paleturquoise': '#afeeee',\r\n 'palevioletred': '#d87093',\r\n 'papayawhip': '#ffefd5',\r\n 'peachpuff': '#ffdab9',\r\n 'peru': '#cd853f',\r\n 'pink': '#ffc0cb',\r\n 'plum': '#dda0dd',\r\n 'powderblue': '#b0e0e6',\r\n 'purple': '#800080',\r\n 'rebeccapurple': '#663399',\r\n 'red': '#ff0000',\r\n 'rosybrown': '#bc8f8f',\r\n 'royalblue': '#4169e1',\r\n 'saddlebrown': '#8b4513',\r\n 'salmon': '#fa8072',\r\n 'sandybrown': '#f4a460',\r\n 'seagreen': '#2e8b57',\r\n 'seashell': '#fff5ee',\r\n 'sienna': '#a0522d',\r\n 'silver': '#c0c0c0',\r\n 'skyblue': '#87ceeb',\r\n 'slateblue': '#6a5acd',\r\n 'slategray': '#708090',\r\n 'snow': '#fffafa',\r\n 'springgreen': '#00ff7f',\r\n 'steelblue': '#4682b4',\r\n 'tan': '#d2b48c',\r\n 'teal': '#008080',\r\n 'thistle': '#d8bfd8',\r\n 'tomato': '#ff6347',\r\n 'turquoise': '#40e0d0',\r\n 'violet': '#ee82ee',\r\n 'wheat': '#f5deb3',\r\n 'white': '#ffffff',\r\n 'whitesmoke': '#f5f5f5',\r\n 'yellow': '#ffff00',\r\n 'yellowgreen': '#9acd32'\r\n };\r\n}\r\n","import { Observable } from \"@babylonjs/core/Misc/observable.js\";\nimport { Vector2, Vector3, TmpVectors } from \"@babylonjs/core/Maths/math.vector.js\";\nimport { Tools } from \"@babylonjs/core/Misc/tools.js\";\nimport { PointerEventTypes } from \"@babylonjs/core/Events/pointerEvents.js\";\nimport { ClipboardEventTypes, ClipboardInfo } from \"@babylonjs/core/Events/clipboardEvents.js\";\nimport { KeyboardEventTypes } from \"@babylonjs/core/Events/keyboardEvents.js\";\nimport { Texture } from \"@babylonjs/core/Materials/Textures/texture.js\";\nimport { DynamicTexture } from \"@babylonjs/core/Materials/Textures/dynamicTexture.js\";\nimport { Layer } from \"@babylonjs/core/Layers/layer.js\";\nimport { Container } from \"./controls/container.js\";\nimport { Control } from \"./controls/control.js\";\nimport { Style } from \"./style.js\";\nimport { Measure } from \"./measure.js\";\nimport { Constants } from \"@babylonjs/core/Engines/constants.js\";\nimport { Viewport } from \"@babylonjs/core/Maths/math.viewport.js\";\nimport { Color3 } from \"@babylonjs/core/Maths/math.color.js\";\nimport { WebRequest } from \"@babylonjs/core/Misc/webRequest.js\";\nimport { RandomGUID } from \"@babylonjs/core/Misc/guid.js\";\nimport { GetClass } from \"@babylonjs/core/Misc/typeStore.js\";\nimport { DecodeBase64ToBinary } from \"@babylonjs/core/Misc/stringTools.js\";\n/**\n * Class used to create texture to support 2D GUI elements\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui\n */\nexport class AdvancedDynamicTexture extends DynamicTexture {\n /** Gets the number of layout calls made the last time the ADT has been rendered */\n get numLayoutCalls() {\n return this._numLayoutCalls;\n }\n /** Gets the number of render calls made the last time the ADT has been rendered */\n get numRenderCalls() {\n return this._numRenderCalls;\n }\n /**\n * Gets or sets a number used to scale rendering size (2 means that the texture will be twice bigger).\n * Useful when you want more antialiasing\n */\n get renderScale() {\n return this._renderScale;\n }\n set renderScale(value) {\n if (value === this._renderScale) {\n return;\n }\n this._renderScale = value;\n this._onResize();\n }\n /** Gets or sets the background color */\n get background() {\n return this._background;\n }\n set background(value) {\n if (this._background === value) {\n return;\n }\n this._background = value;\n this.markAsDirty();\n }\n /**\n * Gets or sets the ideal width used to design controls.\n * The GUI will then rescale everything accordingly\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#adaptive-scaling\n */\n get idealWidth() {\n return this._idealWidth;\n }\n set idealWidth(value) {\n if (this._idealWidth === value) {\n return;\n }\n this._idealWidth = value;\n this.markAsDirty();\n this._rootContainer._markAllAsDirty();\n }\n /**\n * Gets or sets the ideal height used to design controls.\n * The GUI will then rescale everything accordingly\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#adaptive-scaling\n */\n get idealHeight() {\n return this._idealHeight;\n }\n set idealHeight(value) {\n if (this._idealHeight === value) {\n return;\n }\n this._idealHeight = value;\n this.markAsDirty();\n this._rootContainer._markAllAsDirty();\n }\n /**\n * Gets or sets a boolean indicating if the smallest ideal value must be used if idealWidth and idealHeight are both set\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#adaptive-scaling\n */\n get useSmallestIdeal() {\n return this._useSmallestIdeal;\n }\n set useSmallestIdeal(value) {\n if (this._useSmallestIdeal === value) {\n return;\n }\n this._useSmallestIdeal = value;\n this.markAsDirty();\n this._rootContainer._markAllAsDirty();\n }\n /**\n * Gets or sets a boolean indicating if adaptive scaling must be used\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#adaptive-scaling\n */\n get renderAtIdealSize() {\n return this._renderAtIdealSize;\n }\n set renderAtIdealSize(value) {\n if (this._renderAtIdealSize === value) {\n return;\n }\n this._renderAtIdealSize = value;\n this._onResize();\n }\n /**\n * Gets the ratio used when in \"ideal mode\"\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#adaptive-scaling\n * */\n get idealRatio() {\n let rwidth = 0;\n let rheight = 0;\n if (this._idealWidth) {\n rwidth = this.getSize().width / this._idealWidth;\n }\n if (this._idealHeight) {\n rheight = this.getSize().height / this._idealHeight;\n }\n if (this._useSmallestIdeal && this._idealWidth && this._idealHeight) {\n return window.innerWidth < window.innerHeight ? rwidth : rheight;\n }\n if (this._idealWidth) {\n // horizontal\n return rwidth;\n }\n if (this._idealHeight) {\n // vertical\n return rheight;\n }\n return 1;\n }\n /**\n * Gets the underlying layer used to render the texture when in fullscreen mode\n */\n get layer() {\n return this._layerToDispose;\n }\n /**\n * Gets the root container control\n */\n get rootContainer() {\n return this._rootContainer;\n }\n /**\n * Returns an array containing the root container.\n * This is mostly used to let the Inspector introspects the ADT\n * @returns an array containing the rootContainer\n */\n getChildren() {\n return [this._rootContainer];\n }\n /**\n * Will return all controls that are inside this texture\n * @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\n * @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\n * @returns all child controls\n */\n getDescendants(directDescendantsOnly, predicate) {\n return this._rootContainer.getDescendants(directDescendantsOnly, predicate);\n }\n /**\n * Will return all controls with the given type name\n * @param typeName defines the type name to search for\n * @returns an array of all controls found\n */\n getControlsByType(typeName) {\n return this._rootContainer.getDescendants(false, (control) => control.typeName === typeName);\n }\n /**\n * Will return the first control with the given name\n * @param name defines the name to search for\n * @returns the first control found or null\n */\n getControlByName(name) {\n return this._getControlByKey(\"name\", name);\n }\n _getControlByKey(key, value) {\n return this._rootContainer.getDescendants().find((control) => control[key] === value) || null;\n }\n /**\n * Gets or sets the current focused control\n */\n get focusedControl() {\n return this._focusedControl;\n }\n set focusedControl(control) {\n if (this._focusedControl == control) {\n return;\n }\n if (this._focusedControl) {\n this._focusedControl.onBlur();\n }\n if (control) {\n control.onFocus();\n }\n this._focusedControl = control;\n }\n /**\n * Gets or sets a boolean indicating if the texture must be rendered in background or foreground when in fullscreen mode\n */\n get isForeground() {\n if (!this.layer) {\n return true;\n }\n return !this.layer.isBackground;\n }\n set isForeground(value) {\n if (!this.layer) {\n return;\n }\n if (this.layer.isBackground === !value) {\n return;\n }\n this.layer.isBackground = !value;\n }\n /**\n * Gets or set information about clipboardData\n */\n get clipboardData() {\n return this._clipboardData;\n }\n set clipboardData(value) {\n this._clipboardData = value;\n }\n /**\n * Creates a new AdvancedDynamicTexture\n * @param name defines the name of the texture\n * @param width defines the width of the texture\n * @param height defines the height of the texture\n * @param scene defines the hosting scene\n * @param generateMipMaps defines a boolean indicating if mipmaps must be generated (false by default)\n * @param samplingMode defines the texture sampling mode (Texture.NEAREST_SAMPLINGMODE by default)\n * @param invertY defines if the texture needs to be inverted on the y axis during loading (true by default)\n */\n constructor(name, width = 0, height = 0, scene, generateMipMaps = false, samplingMode = Texture.NEAREST_SAMPLINGMODE, invertY = true) {\n super(name, { width: width, height: height }, scene, generateMipMaps, samplingMode, Constants.TEXTUREFORMAT_RGBA, invertY);\n /** Observable that fires when the GUI is ready */\n this.onGuiReadyObservable = new Observable();\n this._isDirty = false;\n /** @internal */\n this._rootContainer = new Container(\"root\");\n /** @internal */\n this._lastControlOver = {};\n /** @internal */\n this._lastControlDown = {};\n /** @internal */\n this._capturingControl = {};\n /** @internal */\n this._linkedControls = new Array();\n /** @internal */\n this._isFullscreen = false;\n this._fullscreenViewport = new Viewport(0, 0, 1, 1);\n this._idealWidth = 0;\n this._idealHeight = 0;\n this._useSmallestIdeal = false;\n this._renderAtIdealSize = false;\n this._blockNextFocusCheck = false;\n this._renderScale = 1;\n this._cursorChanged = false;\n this._defaultMousePointerId = 0;\n this._rootChildrenHaveChanged = false;\n /** @internal */\n this._capturedPointerIds = new Set();\n /** @internal */\n this._numLayoutCalls = 0;\n /** @internal */\n this._numRenderCalls = 0;\n /**\n * Define type to string to ensure compatibility across browsers\n * Safari doesn't support DataTransfer constructor\n */\n this._clipboardData = \"\";\n /**\n * Observable event triggered each time an clipboard event is received from the rendering canvas\n */\n this.onClipboardObservable = new Observable();\n /**\n * Observable event triggered each time a pointer down is intercepted by a control\n */\n this.onControlPickedObservable = new Observable();\n /**\n * Observable event triggered before layout is evaluated\n */\n this.onBeginLayoutObservable = new Observable();\n /**\n * Observable event triggered after the layout was evaluated\n */\n this.onEndLayoutObservable = new Observable();\n /**\n * Observable event triggered before the texture is rendered\n */\n this.onBeginRenderObservable = new Observable();\n /**\n * Observable event triggered after the texture was rendered\n */\n this.onEndRenderObservable = new Observable();\n /**\n * Gets or sets a boolean defining if alpha is stored as premultiplied\n */\n this.premulAlpha = false;\n /**\n * Gets or sets a boolean indicating that the canvas must be reverted on Y when updating the texture\n */\n this.applyYInversionOnUpdate = true;\n /**\n * If this is set, even when a control is pointer blocker, some events can still be passed through to the scene.\n * Options from values are PointerEventTypes\n * POINTERDOWN, POINTERUP, POINTERMOVE, POINTERWHEEL, POINTERPICK, POINTERTAP, POINTERDOUBLETAP\n */\n this.skipBlockEvents = 0;\n /**\n * If set to true, every scene render will trigger a pointer event for the GUI\n * if it is linked to a mesh or has controls linked to a mesh. This will allow\n * you to catch the pointer moving around the GUI due to camera or mesh movements,\n * but it has a performance cost.\n */\n this.checkPointerEveryFrame = false;\n this._useInvalidateRectOptimization = true;\n // Invalidated rectangle which is the combination of all invalidated controls after they have been rotated into absolute position\n this._invalidatedRectangle = null;\n this._clearMeasure = new Measure(0, 0, 0, 0);\n /**\n * @internal\n */\n this._onClipboardCopy = (rawEvt) => {\n const evt = rawEvt;\n const ev = new ClipboardInfo(ClipboardEventTypes.COPY, evt);\n this.onClipboardObservable.notifyObservers(ev);\n evt.preventDefault();\n };\n /**\n * @internal\n */\n this._onClipboardCut = (rawEvt) => {\n const evt = rawEvt;\n const ev = new ClipboardInfo(ClipboardEventTypes.CUT, evt);\n this.onClipboardObservable.notifyObservers(ev);\n evt.preventDefault();\n };\n /**\n * @internal\n */\n this._onClipboardPaste = (rawEvt) => {\n const evt = rawEvt;\n const ev = new ClipboardInfo(ClipboardEventTypes.PASTE, evt);\n this.onClipboardObservable.notifyObservers(ev);\n evt.preventDefault();\n };\n /**\n * Recreate the content of the ADT from a JSON object\n * @param serializedObject define the JSON serialized object to restore from\n * @param scaleToSize defines whether to scale to texture to the saved size\n * @deprecated Please use parseSerializedObject instead\n */\n this.parseContent = this.parseSerializedObject;\n scene = this.getScene();\n if (!scene || !this._texture) {\n return;\n }\n this.applyYInversionOnUpdate = invertY;\n this._rootElement = scene.getEngine().getInputElement();\n this._renderObserver = scene.onBeforeCameraRenderObservable.add((camera) => this._checkUpdate(camera));\n /** Whenever a control is added or removed to the root, we have to recheck the camera projection as it can have changed */\n this._controlAddedObserver = this._rootContainer.onControlAddedObservable.add((control) => {\n if (control) {\n this._rootChildrenHaveChanged = true;\n }\n });\n this._controlRemovedObserver = this._rootContainer.onControlRemovedObservable.add((control) => {\n if (control) {\n this._rootChildrenHaveChanged = true;\n }\n });\n this._preKeyboardObserver = scene.onPreKeyboardObservable.add((info) => {\n if (!this._focusedControl) {\n return;\n }\n if (info.type === KeyboardEventTypes.KEYDOWN) {\n this._focusedControl.processKeyboard(info.event);\n }\n info.skipOnPointerObservable = true;\n });\n this._rootContainer._link(this);\n this.hasAlpha = true;\n if (!width || !height) {\n this._resizeObserver = scene.getEngine().onResizeObservable.add(() => this._onResize());\n this._onResize();\n }\n this._texture.isReady = true;\n }\n /**\n * Get the current class name of the texture useful for serialization or dynamic coding.\n * @returns \"AdvancedDynamicTexture\"\n */\n getClassName() {\n return \"AdvancedDynamicTexture\";\n }\n /**\n * Function used to execute a function on all controls\n * @param func defines the function to execute\n * @param container defines the container where controls belong. If null the root container will be used\n */\n executeOnAllControls(func, container) {\n if (!container) {\n container = this._rootContainer;\n }\n func(container);\n for (const child of container.children) {\n if (child.children) {\n this.executeOnAllControls(func, child);\n continue;\n }\n func(child);\n }\n }\n /**\n * Gets or sets a boolean indicating if the InvalidateRect optimization should be turned on\n */\n get useInvalidateRectOptimization() {\n return this._useInvalidateRectOptimization;\n }\n set useInvalidateRectOptimization(value) {\n this._useInvalidateRectOptimization = value;\n }\n /**\n * Invalidates a rectangle area on the gui texture\n * @param invalidMinX left most position of the rectangle to invalidate in the texture\n * @param invalidMinY top most position of the rectangle to invalidate in the texture\n * @param invalidMaxX right most position of the rectangle to invalidate in the texture\n * @param invalidMaxY bottom most position of the rectangle to invalidate in the texture\n */\n invalidateRect(invalidMinX, invalidMinY, invalidMaxX, invalidMaxY) {\n if (!this._useInvalidateRectOptimization) {\n return;\n }\n if (!this._invalidatedRectangle) {\n this._invalidatedRectangle = new Measure(invalidMinX, invalidMinY, invalidMaxX - invalidMinX + 1, invalidMaxY - invalidMinY + 1);\n }\n else {\n // Compute intersection\n const maxX = Math.ceil(Math.max(this._invalidatedRectangle.left + this._invalidatedRectangle.width - 1, invalidMaxX));\n const maxY = Math.ceil(Math.max(this._invalidatedRectangle.top + this._invalidatedRectangle.height - 1, invalidMaxY));\n this._invalidatedRectangle.left = Math.floor(Math.min(this._invalidatedRectangle.left, invalidMinX));\n this._invalidatedRectangle.top = Math.floor(Math.min(this._invalidatedRectangle.top, invalidMinY));\n this._invalidatedRectangle.width = maxX - this._invalidatedRectangle.left + 1;\n this._invalidatedRectangle.height = maxY - this._invalidatedRectangle.top + 1;\n }\n }\n /**\n * Marks the texture as dirty forcing a complete update\n */\n markAsDirty() {\n this._isDirty = true;\n }\n /**\n * Helper function used to create a new style\n * @returns a new style\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#styles\n */\n createStyle() {\n return new Style(this);\n }\n /**\n * Adds a new control to the root container\n * @param control defines the control to add\n * @returns the current texture\n */\n addControl(control) {\n this._rootContainer.addControl(control);\n return this;\n }\n /**\n * Removes a control from the root container\n * @param control defines the control to remove\n * @returns the current texture\n */\n removeControl(control) {\n this._rootContainer.removeControl(control);\n return this;\n }\n /**\n * Moves overlapped controls towards a position where it is not overlapping anymore.\n * Please note that this method alters linkOffsetXInPixels and linkOffsetYInPixels.\n * @param overlapGroup the overlap group which will be processed or undefined to process all overlap groups\n * @param deltaStep the step size (speed) to reach the target non overlapping position (default 0.1)\n * @param repelFactor how much is the control repelled by other controls\n */\n moveToNonOverlappedPosition(overlapGroup, deltaStep = 1, repelFactor = 1) {\n let controlsForGroup;\n if (Array.isArray(overlapGroup)) {\n controlsForGroup = overlapGroup;\n }\n else {\n const descendants = this.getDescendants(true);\n // get only the controls with an overlapGroup property set\n // if the overlapGroup parameter is set, filter the controls and get only the controls belonging to that overlapGroup\n controlsForGroup = overlapGroup === undefined ? descendants.filter((c) => c.overlapGroup !== undefined) : descendants.filter((c) => c.overlapGroup === overlapGroup);\n }\n controlsForGroup.forEach((control1) => {\n var _a;\n let velocity = Vector2.Zero();\n const center = new Vector2(control1.centerX, control1.centerY);\n controlsForGroup.forEach((control2) => {\n if (control1 !== control2 && AdvancedDynamicTexture._Overlaps(control1, control2)) {\n // if the two controls overlaps get a direction vector from one control's center to another control's center\n const diff = center.subtract(new Vector2(control2.centerX, control2.centerY));\n const diffLength = diff.length();\n if (diffLength > 0) {\n // calculate the velocity\n velocity = velocity.add(diff.normalize().scale(repelFactor / diffLength));\n }\n }\n });\n if (velocity.length() > 0) {\n // move the control along the direction vector away from the overlapping control\n velocity = velocity.normalize().scale(deltaStep * ((_a = control1.overlapDeltaMultiplier) !== null && _a !== void 0 ? _a : 1));\n control1.linkOffsetXInPixels += velocity.x;\n control1.linkOffsetYInPixels += velocity.y;\n }\n });\n }\n /**\n * Release all resources\n */\n dispose() {\n const scene = this.getScene();\n if (!scene) {\n return;\n }\n this._rootElement = null;\n scene.onBeforeCameraRenderObservable.remove(this._renderObserver);\n if (this._resizeObserver) {\n scene.getEngine().onResizeObservable.remove(this._resizeObserver);\n }\n if (this._prePointerObserver) {\n scene.onPrePointerObservable.remove(this._prePointerObserver);\n }\n if (this._sceneRenderObserver) {\n scene.onBeforeRenderObservable.remove(this._sceneRenderObserver);\n }\n if (this._pointerObserver) {\n scene.onPointerObservable.remove(this._pointerObserver);\n }\n if (this._preKeyboardObserver) {\n scene.onPreKeyboardObservable.remove(this._preKeyboardObserver);\n }\n if (this._canvasPointerOutObserver) {\n scene.getEngine().onCanvasPointerOutObservable.remove(this._canvasPointerOutObserver);\n }\n if (this._canvasBlurObserver) {\n scene.getEngine().onCanvasBlurObservable.remove(this._canvasBlurObserver);\n }\n if (this._controlAddedObserver) {\n this._rootContainer.onControlAddedObservable.remove(this._controlAddedObserver);\n }\n if (this._controlRemovedObserver) {\n this._rootContainer.onControlRemovedObservable.remove(this._controlRemovedObserver);\n }\n if (this._layerToDispose) {\n this._layerToDispose.texture = null;\n this._layerToDispose.dispose();\n this._layerToDispose = null;\n }\n this._rootContainer.dispose();\n this.onClipboardObservable.clear();\n this.onControlPickedObservable.clear();\n this.onBeginRenderObservable.clear();\n this.onEndRenderObservable.clear();\n this.onBeginLayoutObservable.clear();\n this.onEndLayoutObservable.clear();\n this.onGuiReadyObservable.clear();\n super.dispose();\n }\n _onResize() {\n const scene = this.getScene();\n if (!scene) {\n return;\n }\n // Check size\n const engine = scene.getEngine();\n const textureSize = this.getSize();\n let renderWidth = engine.getRenderWidth() * this._renderScale;\n let renderHeight = engine.getRenderHeight() * this._renderScale;\n if (this._renderAtIdealSize) {\n if (this._idealWidth) {\n renderHeight = (renderHeight * this._idealWidth) / renderWidth;\n renderWidth = this._idealWidth;\n }\n else if (this._idealHeight) {\n renderWidth = (renderWidth * this._idealHeight) / renderHeight;\n renderHeight = this._idealHeight;\n }\n }\n if (textureSize.width !== renderWidth || textureSize.height !== renderHeight) {\n this.scaleTo(renderWidth, renderHeight);\n this.markAsDirty();\n if (this._idealWidth || this._idealHeight) {\n this._rootContainer._markAllAsDirty();\n }\n }\n this.invalidateRect(0, 0, textureSize.width - 1, textureSize.height - 1);\n }\n /** @internal */\n _getGlobalViewport() {\n const size = this.getSize();\n const globalViewPort = this._fullscreenViewport.toGlobal(size.width, size.height);\n const targetX = Math.round(globalViewPort.width * (1 / this.rootContainer.scaleX));\n const targetY = Math.round(globalViewPort.height * (1 / this.rootContainer.scaleY));\n globalViewPort.x += (globalViewPort.width - targetX) / 2;\n globalViewPort.y += (globalViewPort.height - targetY) / 2;\n globalViewPort.width = targetX;\n globalViewPort.height = targetY;\n return globalViewPort;\n }\n /**\n * Get screen coordinates for a vector3\n * @param position defines the position to project\n * @param worldMatrix defines the world matrix to use\n * @returns the projected position\n */\n getProjectedPosition(position, worldMatrix) {\n const result = this.getProjectedPositionWithZ(position, worldMatrix);\n return new Vector2(result.x, result.y);\n }\n /**\n * Get screen coordinates for a vector3\n * @param position defines the position to project\n * @param worldMatrix defines the world matrix to use\n * @returns the projected position with Z\n */\n getProjectedPositionWithZ(position, worldMatrix) {\n const scene = this.getScene();\n if (!scene) {\n return Vector3.Zero();\n }\n const globalViewport = this._getGlobalViewport();\n const projectedPosition = Vector3.Project(position, worldMatrix, scene.getTransformMatrix(), globalViewport);\n return new Vector3(projectedPosition.x, projectedPosition.y, projectedPosition.z);\n }\n _checkUpdate(camera, skipUpdate) {\n if (this._layerToDispose) {\n if ((camera.layerMask & this._layerToDispose.layerMask) === 0) {\n return;\n }\n }\n if (this._isFullscreen && this._linkedControls.length) {\n const scene = this.getScene();\n if (!scene) {\n return;\n }\n const globalViewport = this._getGlobalViewport();\n for (const control of this._linkedControls) {\n if (!control.isVisible) {\n continue;\n }\n const mesh = control._linkedMesh;\n if (!mesh || mesh.isDisposed()) {\n Tools.SetImmediate(() => {\n control.linkWithMesh(null);\n });\n continue;\n }\n const position = mesh.getBoundingInfo ? mesh.getBoundingInfo().boundingSphere.center : Vector3.ZeroReadOnly;\n const projectedPosition = Vector3.Project(position, mesh.getWorldMatrix(), scene.getTransformMatrix(), globalViewport);\n if (projectedPosition.z < 0 || projectedPosition.z > 1) {\n control.notRenderable = true;\n continue;\n }\n control.notRenderable = false;\n if (this.useInvalidateRectOptimization) {\n control.invalidateRect();\n }\n control._moveToProjectedPosition(projectedPosition);\n }\n }\n if (!this._isDirty && !this._rootContainer.isDirty) {\n return;\n }\n this._isDirty = false;\n this._render(skipUpdate);\n if (!skipUpdate) {\n this.update(this.applyYInversionOnUpdate, this.premulAlpha, AdvancedDynamicTexture.AllowGPUOptimizations);\n }\n }\n _render(skipRender) {\n var _a;\n const textureSize = this.getSize();\n const renderWidth = textureSize.width;\n const renderHeight = textureSize.height;\n const context = this.getContext();\n context.font = \"18px Arial\";\n context.strokeStyle = \"white\";\n if (this.onGuiReadyObservable.hasObservers()) {\n this._checkGuiIsReady();\n }\n /** We have to recheck the camera projection in the case the root control's children have changed */\n if (this._rootChildrenHaveChanged) {\n const camera = (_a = this.getScene()) === null || _a === void 0 ? void 0 : _a.activeCamera;\n if (camera) {\n this._rootChildrenHaveChanged = false;\n this._checkUpdate(camera, true);\n }\n }\n // Layout\n this.onBeginLayoutObservable.notifyObservers(this);\n const measure = new Measure(0, 0, renderWidth, renderHeight);\n this._numLayoutCalls = 0;\n this._rootContainer._layout(measure, context);\n this.onEndLayoutObservable.notifyObservers(this);\n this._isDirty = false; // Restoring the dirty state that could have been set by controls during layout processing\n if (skipRender) {\n return;\n }\n // Clear\n if (this._invalidatedRectangle) {\n this._clearMeasure.copyFrom(this._invalidatedRectangle);\n }\n else {\n this._clearMeasure.copyFromFloats(0, 0, renderWidth, renderHeight);\n }\n context.clearRect(this._clearMeasure.left, this._clearMeasure.top, this._clearMeasure.width, this._clearMeasure.height);\n if (this._background) {\n context.save();\n context.fillStyle = this._background;\n context.fillRect(this._clearMeasure.left, this._clearMeasure.top, this._clearMeasure.width, this._clearMeasure.height);\n context.restore();\n }\n // Render\n this.onBeginRenderObservable.notifyObservers(this);\n this._numRenderCalls = 0;\n this._rootContainer._render(context, this._invalidatedRectangle);\n this.onEndRenderObservable.notifyObservers(this);\n this._invalidatedRectangle = null;\n }\n /**\n * @internal\n */\n _changeCursor(cursor) {\n if (this._rootElement) {\n this._rootElement.style.cursor = cursor;\n this._cursorChanged = true;\n }\n }\n /**\n * @internal\n */\n _registerLastControlDown(control, pointerId) {\n this._lastControlDown[pointerId] = control;\n this.onControlPickedObservable.notifyObservers(control);\n }\n _doPicking(x, y, pi, type, pointerId, buttonIndex, deltaX, deltaY) {\n const scene = this.getScene();\n if (!scene) {\n return;\n }\n const engine = scene.getEngine();\n const textureSize = this.getSize();\n if (this._isFullscreen) {\n const camera = scene.cameraToUseForPointers || scene.activeCamera;\n if (!camera) {\n return;\n }\n const viewport = camera.viewport;\n x = x * (textureSize.width / (engine.getRenderWidth() * viewport.width));\n y = y * (textureSize.height / (engine.getRenderHeight() * viewport.height));\n }\n if (this._capturingControl[pointerId]) {\n if (this._capturingControl[pointerId].isPointerBlocker) {\n this._shouldBlockPointer = true;\n }\n this._capturingControl[pointerId]._processObservables(type, x, y, pi, pointerId, buttonIndex);\n return;\n }\n this._cursorChanged = false;\n if (!this._rootContainer._processPicking(x, y, pi, type, pointerId, buttonIndex, deltaX, deltaY)) {\n if (!scene.doNotHandleCursors) {\n this._changeCursor(\"\");\n }\n if (type === PointerEventTypes.POINTERMOVE) {\n if (this._lastControlOver[pointerId]) {\n this._lastControlOver[pointerId]._onPointerOut(this._lastControlOver[pointerId], pi);\n delete this._lastControlOver[pointerId];\n }\n }\n }\n if (!this._cursorChanged && !scene.doNotHandleCursors) {\n this._changeCursor(\"\");\n }\n this._manageFocus();\n }\n /**\n * @internal\n */\n _cleanControlAfterRemovalFromList(list, control) {\n for (const pointerId in list) {\n if (!Object.prototype.hasOwnProperty.call(list, pointerId)) {\n continue;\n }\n const lastControlOver = list[pointerId];\n if (lastControlOver === control) {\n delete list[pointerId];\n }\n }\n }\n /**\n * @internal\n */\n _cleanControlAfterRemoval(control) {\n this._cleanControlAfterRemovalFromList(this._lastControlDown, control);\n this._cleanControlAfterRemovalFromList(this._lastControlOver, control);\n }\n /**\n * This function will run a pointer event on this ADT and will trigger any pointer events on any controls\n * This will work on a fullscreen ADT only. For mesh based ADT, simulate pointer events using the scene directly.\n * @param x pointer X on the canvas for the picking\n * @param y pointer Y on the canvas for the picking\n * @param pi optional pointer information\n */\n pick(x, y, pi = null) {\n if (this._isFullscreen && this._scene) {\n this._translateToPicking(this._scene, new Viewport(0, 0, 0, 0), pi, x, y);\n }\n }\n _translateToPicking(scene, tempViewport, pi, x = scene.pointerX, y = scene.pointerY) {\n const camera = scene.cameraToUseForPointers || scene.activeCamera;\n const engine = scene.getEngine();\n const originalCameraToUseForPointers = scene.cameraToUseForPointers;\n if (!camera) {\n tempViewport.x = 0;\n tempViewport.y = 0;\n tempViewport.width = engine.getRenderWidth();\n tempViewport.height = engine.getRenderHeight();\n }\n else {\n if (camera.rigCameras.length) {\n // rig camera - we need to find the camera to use for this event\n const rigViewport = new Viewport(0, 0, 1, 1);\n camera.rigCameras.forEach((rigCamera) => {\n // generate the viewport of this camera\n rigCamera.viewport.toGlobalToRef(engine.getRenderWidth(), engine.getRenderHeight(), rigViewport);\n const transformedX = x / engine.getHardwareScalingLevel() - rigViewport.x;\n const transformedY = y / engine.getHardwareScalingLevel() - (engine.getRenderHeight() - rigViewport.y - rigViewport.height);\n // check if the pointer is in the camera's viewport\n if (transformedX < 0 || transformedY < 0 || x > rigViewport.width || y > rigViewport.height) {\n // out of viewport - don't use this camera\n return;\n }\n // set the camera to use for pointers until this pointer loop is over\n scene.cameraToUseForPointers = rigCamera;\n // set the viewport\n tempViewport.x = rigViewport.x;\n tempViewport.y = rigViewport.y;\n tempViewport.width = rigViewport.width;\n tempViewport.height = rigViewport.height;\n });\n }\n else {\n camera.viewport.toGlobalToRef(engine.getRenderWidth(), engine.getRenderHeight(), tempViewport);\n }\n }\n const transformedX = x / engine.getHardwareScalingLevel() - tempViewport.x;\n const transformedY = y / engine.getHardwareScalingLevel() - (engine.getRenderHeight() - tempViewport.y - tempViewport.height);\n this._shouldBlockPointer = false;\n // Do picking modifies _shouldBlockPointer\n if (pi) {\n const pointerId = pi.event.pointerId || this._defaultMousePointerId;\n this._doPicking(transformedX, transformedY, pi, pi.type, pointerId, pi.event.button, pi.event.deltaX, pi.event.deltaY);\n // Avoid overwriting a true skipOnPointerObservable to false\n if ((this._shouldBlockPointer && !(pi.type & this.skipBlockEvents)) || this._capturingControl[pointerId]) {\n pi.skipOnPointerObservable = true;\n }\n }\n else {\n this._doPicking(transformedX, transformedY, null, PointerEventTypes.POINTERMOVE, this._defaultMousePointerId, 0);\n }\n // if overridden by a rig camera - reset back to the original value\n scene.cameraToUseForPointers = originalCameraToUseForPointers;\n }\n /** Attach to all scene events required to support pointer events */\n attach() {\n const scene = this.getScene();\n if (!scene) {\n return;\n }\n const tempViewport = new Viewport(0, 0, 0, 0);\n this._prePointerObserver = scene.onPrePointerObservable.add((pi) => {\n if (scene.isPointerCaptured(pi.event.pointerId) &&\n pi.type === PointerEventTypes.POINTERUP &&\n !this._capturedPointerIds.has(pi.event.pointerId)) {\n return;\n }\n if (pi.type !== PointerEventTypes.POINTERMOVE &&\n pi.type !== PointerEventTypes.POINTERUP &&\n pi.type !== PointerEventTypes.POINTERDOWN &&\n pi.type !== PointerEventTypes.POINTERWHEEL) {\n return;\n }\n if (pi.type === PointerEventTypes.POINTERMOVE) {\n // Avoid pointerMove events firing while the pointer is captured by the scene\n if (scene.isPointerCaptured(pi.event.pointerId)) {\n return;\n }\n if (pi.event.pointerId) {\n this._defaultMousePointerId = pi.event.pointerId; // This is required to make sure we have the correct pointer ID for wheel\n }\n }\n this._translateToPicking(scene, tempViewport, pi);\n });\n this._attachPickingToSceneRender(scene, () => this._translateToPicking(scene, tempViewport, null), false);\n this._attachToOnPointerOut(scene);\n this._attachToOnBlur(scene);\n }\n /**\n * Register the clipboard Events onto the canvas\n */\n registerClipboardEvents() {\n self.addEventListener(\"copy\", this._onClipboardCopy, false);\n self.addEventListener(\"cut\", this._onClipboardCut, false);\n self.addEventListener(\"paste\", this._onClipboardPaste, false);\n }\n /**\n * Unregister the clipboard Events from the canvas\n */\n unRegisterClipboardEvents() {\n self.removeEventListener(\"copy\", this._onClipboardCopy);\n self.removeEventListener(\"cut\", this._onClipboardCut);\n self.removeEventListener(\"paste\", this._onClipboardPaste);\n }\n /**\n * Transform uvs from mesh space to texture space, taking the texture into account\n * @param uv the uvs in mesh space\n * @returns the uvs in texture space\n */\n _transformUvs(uv) {\n const textureMatrix = this.getTextureMatrix();\n let result;\n if (textureMatrix.isIdentityAs3x2()) {\n result = uv;\n }\n else {\n const homogeneousTextureMatrix = TmpVectors.Matrix[0];\n textureMatrix.getRowToRef(0, TmpVectors.Vector4[0]);\n textureMatrix.getRowToRef(1, TmpVectors.Vector4[1]);\n textureMatrix.getRowToRef(2, TmpVectors.Vector4[2]);\n const r0 = TmpVectors.Vector4[0];\n const r1 = TmpVectors.Vector4[1];\n const r2 = TmpVectors.Vector4[2];\n homogeneousTextureMatrix.setRowFromFloats(0, r0.x, r0.y, 0, 0);\n homogeneousTextureMatrix.setRowFromFloats(1, r1.x, r1.y, 0, 0);\n homogeneousTextureMatrix.setRowFromFloats(2, 0, 0, 1, 0);\n homogeneousTextureMatrix.setRowFromFloats(3, r2.x, r2.y, 0, 1);\n result = TmpVectors.Vector2[0];\n Vector2.TransformToRef(uv, homogeneousTextureMatrix, result);\n }\n // In wrap and mirror mode, the texture coordinate for coordinates more than 1 is the fractional part of the coordinate\n if (this.wrapU === Texture.WRAP_ADDRESSMODE || this.wrapU === Texture.MIRROR_ADDRESSMODE) {\n if (result.x > 1) {\n let fX = result.x - Math.trunc(result.x);\n // In mirror mode, the sign of the texture coordinate depends on the integer part -\n // odd integers means it is mirrored from the original coordinate\n if (this.wrapU === Texture.MIRROR_ADDRESSMODE && Math.trunc(result.x) % 2 === 1) {\n fX = 1 - fX;\n }\n result.x = fX;\n }\n }\n if (this.wrapV === Texture.WRAP_ADDRESSMODE || this.wrapV === Texture.MIRROR_ADDRESSMODE) {\n if (result.y > 1) {\n let fY = result.y - Math.trunc(result.y);\n if (this.wrapV === Texture.MIRROR_ADDRESSMODE && Math.trunc(result.x) % 2 === 1) {\n fY = 1 - fY;\n }\n result.y = fY;\n }\n }\n return result;\n }\n /**\n * Connect the texture to a hosting mesh to enable interactions\n * @param mesh defines the mesh to attach to\n * @param supportPointerMove defines a boolean indicating if pointer move events must be catched as well\n */\n attachToMesh(mesh, supportPointerMove = true) {\n const scene = this.getScene();\n if (!scene) {\n return;\n }\n if (this._pointerObserver) {\n scene.onPointerObservable.remove(this._pointerObserver);\n }\n this._pointerObserver = scene.onPointerObservable.add((pi) => {\n if (pi.type !== PointerEventTypes.POINTERMOVE &&\n pi.type !== PointerEventTypes.POINTERUP &&\n pi.type !== PointerEventTypes.POINTERDOWN &&\n pi.type !== PointerEventTypes.POINTERWHEEL) {\n return;\n }\n if (pi.type === PointerEventTypes.POINTERMOVE && pi.event.pointerId) {\n this._defaultMousePointerId = pi.event.pointerId; // This is required to make sure we have the correct pointer ID for wheel\n }\n const pointerId = pi.event.pointerId || this._defaultMousePointerId;\n if (pi.pickInfo && pi.pickInfo.hit && pi.pickInfo.pickedMesh === mesh) {\n let uv = pi.pickInfo.getTextureCoordinates();\n if (uv) {\n uv = this._transformUvs(uv);\n const size = this.getSize();\n this._doPicking(uv.x * size.width, (this.applyYInversionOnUpdate ? 1.0 - uv.y : uv.y) * size.height, pi, pi.type, pointerId, pi.event.button, pi.event.deltaX, pi.event.deltaY);\n }\n }\n else if (pi.type === PointerEventTypes.POINTERUP) {\n if (this._lastControlDown[pointerId]) {\n this._lastControlDown[pointerId]._forcePointerUp(pointerId);\n }\n delete this._lastControlDown[pointerId];\n if (this.focusedControl) {\n const friendlyControls = this.focusedControl.keepsFocusWith();\n let canMoveFocus = true;\n if (friendlyControls) {\n for (const control of friendlyControls) {\n // Same host, no need to keep the focus\n if (this === control._host) {\n continue;\n }\n // Different hosts\n const otherHost = control._host;\n if (otherHost._lastControlOver[pointerId] && otherHost._lastControlOver[pointerId].isAscendant(control)) {\n canMoveFocus = false;\n break;\n }\n }\n }\n if (canMoveFocus) {\n this.focusedControl = null;\n }\n }\n }\n else if (pi.type === PointerEventTypes.POINTERMOVE) {\n if (this._lastControlOver[pointerId]) {\n this._lastControlOver[pointerId]._onPointerOut(this._lastControlOver[pointerId], pi, true);\n }\n delete this._lastControlOver[pointerId];\n }\n });\n mesh.enablePointerMoveEvents = supportPointerMove;\n this._attachPickingToSceneRender(scene, () => {\n const pointerId = this._defaultMousePointerId;\n const pick = scene === null || scene === void 0 ? void 0 : scene.pick(scene.pointerX, scene.pointerY);\n if (pick && pick.hit && pick.pickedMesh === mesh) {\n let uv = pick.getTextureCoordinates();\n if (uv) {\n uv = this._transformUvs(uv);\n const size = this.getSize();\n this._doPicking(uv.x * size.width, (this.applyYInversionOnUpdate ? 1.0 - uv.y : uv.y) * size.height, null, PointerEventTypes.POINTERMOVE, pointerId, 0);\n }\n }\n else {\n if (this._lastControlOver[pointerId]) {\n this._lastControlOver[pointerId]._onPointerOut(this._lastControlOver[pointerId], null, true);\n }\n delete this._lastControlOver[pointerId];\n }\n }, true);\n this._attachToOnPointerOut(scene);\n this._attachToOnBlur(scene);\n }\n /**\n * Move the focus to a specific control\n * @param control defines the control which will receive the focus\n */\n moveFocusToControl(control) {\n this.focusedControl = control;\n this._lastPickedControl = control;\n this._blockNextFocusCheck = true;\n }\n _manageFocus() {\n if (this._blockNextFocusCheck) {\n this._blockNextFocusCheck = false;\n this._lastPickedControl = this._focusedControl;\n return;\n }\n // Focus management\n if (this._focusedControl) {\n if (this._focusedControl !== this._lastPickedControl) {\n if (this._lastPickedControl.isFocusInvisible) {\n return;\n }\n this.focusedControl = null;\n }\n }\n }\n _attachPickingToSceneRender(scene, pickFunction, forcePicking) {\n this._sceneRenderObserver = scene.onBeforeRenderObservable.add(() => {\n if (!this.checkPointerEveryFrame) {\n return;\n }\n if (this._linkedControls.length > 0 || forcePicking) {\n pickFunction();\n }\n });\n }\n _attachToOnPointerOut(scene) {\n this._canvasPointerOutObserver = scene.getEngine().onCanvasPointerOutObservable.add((pointerEvent) => {\n if (this._lastControlOver[pointerEvent.pointerId]) {\n this._lastControlOver[pointerEvent.pointerId]._onPointerOut(this._lastControlOver[pointerEvent.pointerId], null);\n }\n delete this._lastControlOver[pointerEvent.pointerId];\n if (this._lastControlDown[pointerEvent.pointerId] && this._lastControlDown[pointerEvent.pointerId] !== this._capturingControl[pointerEvent.pointerId]) {\n this._lastControlDown[pointerEvent.pointerId]._forcePointerUp(pointerEvent.pointerId);\n delete this._lastControlDown[pointerEvent.pointerId];\n }\n });\n }\n _attachToOnBlur(scene) {\n this._canvasBlurObserver = scene.getEngine().onCanvasBlurObservable.add(() => {\n Object.entries(this._lastControlDown).forEach(([, value]) => {\n value._onCanvasBlur();\n });\n this.focusedControl = null;\n this._lastControlDown = {};\n });\n }\n /**\n * Serializes the entire GUI system\n * @returns an object with the JSON serialized data\n */\n serializeContent() {\n const size = this.getSize();\n const serializationObject = {\n root: {},\n width: size.width,\n height: size.height,\n };\n this._rootContainer.serialize(serializationObject.root);\n return serializationObject;\n }\n /**\n * Recreate the content of the ADT from a JSON object\n * @param serializedObject define the JSON serialized object to restore from\n * @param scaleToSize defines whether to scale to texture to the saved size\n */\n parseSerializedObject(serializedObject, scaleToSize) {\n this._rootContainer = Control.Parse(serializedObject.root, this);\n if (scaleToSize) {\n const width = serializedObject.width;\n const height = serializedObject.height;\n if (typeof width === \"number\" && typeof height === \"number\" && width >= 0 && height >= 0) {\n this.scaleTo(width, height);\n }\n else {\n // scales the GUI to a default size if none was available in the serialized content\n this.scaleTo(1920, 1080);\n }\n }\n }\n /**\n * Clones the ADT\n * @param newName defines the name of the new ADT\n * @returns the clone of the ADT\n */\n clone(newName) {\n const scene = this.getScene();\n if (!scene) {\n return this;\n }\n const size = this.getSize();\n const data = this.serializeContent();\n const clone = new AdvancedDynamicTexture(newName !== null && newName !== void 0 ? newName : \"Clone of \" + this.name, size.width, size.height, scene, !this.noMipmap, this.samplingMode);\n clone.parseSerializedObject(data);\n return clone;\n }\n /**\n * Recreate the content of the ADT from a snippet saved by the GUI editor\n * @param snippetId defines the snippet to load\n * @param scaleToSize defines whether to scale to texture to the saved size\n * @param appendToAdt if provided the snippet will be appended to the adt. Otherwise a fullscreen ADT will be created.\n * @returns a promise that will resolve on success\n */\n static async ParseFromSnippetAsync(snippetId, scaleToSize, appendToAdt) {\n const adt = appendToAdt !== null && appendToAdt !== void 0 ? appendToAdt : AdvancedDynamicTexture.CreateFullscreenUI(\"ADT from snippet\");\n if (snippetId === \"_BLANK\") {\n return adt;\n }\n const serialized = await AdvancedDynamicTexture._LoadURLContentAsync(AdvancedDynamicTexture.SnippetUrl + \"/\" + snippetId.replace(/#/g, \"/\"), true);\n adt.parseSerializedObject(serialized, scaleToSize);\n return adt;\n }\n /**\n * Recreate the content of the ADT from a snippet saved by the GUI editor\n * @param snippetId defines the snippet to load\n * @param scaleToSize defines whether to scale to texture to the saved size\n * @returns a promise that will resolve on success\n */\n parseFromSnippetAsync(snippetId, scaleToSize) {\n return AdvancedDynamicTexture.ParseFromSnippetAsync(snippetId, scaleToSize, this);\n }\n /**\n * Recreate the content of the ADT from a url json\n * @param url defines the url to load\n * @param scaleToSize defines whether to scale to texture to the saved size\n * @param appendToAdt if provided the snippet will be appended to the adt. Otherwise a fullscreen ADT will be created.\n * @returns a promise that will resolve on success\n */\n static async ParseFromFileAsync(url, scaleToSize, appendToAdt) {\n const adt = appendToAdt !== null && appendToAdt !== void 0 ? appendToAdt : AdvancedDynamicTexture.CreateFullscreenUI(\"ADT from URL\");\n const serialized = await AdvancedDynamicTexture._LoadURLContentAsync(url);\n adt.parseSerializedObject(serialized, scaleToSize);\n return adt;\n }\n /**\n * Recreate the content of the ADT from a url json\n * @param url defines the url to load\n * @param scaleToSize defines whether to scale to texture to the saved size\n * @returns a promise that will resolve on success\n */\n parseFromURLAsync(url, scaleToSize) {\n return AdvancedDynamicTexture.ParseFromFileAsync(url, scaleToSize, this);\n }\n static _LoadURLContentAsync(url, snippet = false) {\n if (url === \"\") {\n return Promise.reject(\"No URL provided\");\n }\n return new Promise((resolve, reject) => {\n const request = new WebRequest();\n request.addEventListener(\"readystatechange\", () => {\n if (request.readyState == 4) {\n if (request.status == 200) {\n let gui;\n if (snippet) {\n const payload = JSON.parse(JSON.parse(request.responseText).jsonPayload);\n gui = payload.encodedGui ? new TextDecoder(\"utf-8\").decode(DecodeBase64ToBinary(payload.encodedGui)) : payload.gui;\n }\n else {\n gui = request.responseText;\n }\n const serializationObject = JSON.parse(gui);\n resolve(serializationObject);\n }\n else {\n reject(\"Unable to load\");\n }\n }\n });\n request.open(\"GET\", url);\n request.send();\n });\n }\n // Statics\n /**\n * Compares two rectangle based controls for pixel overlap\n * @param control1 The first control to compare\n * @param control2 The second control to compare\n * @returns true if overlaps, otherwise false\n */\n static _Overlaps(control1, control2) {\n return !(control1.centerX > control2.centerX + control2.widthInPixels ||\n control1.centerX + control1.widthInPixels < control2.centerX ||\n control1.centerY + control1.heightInPixels < control2.centerY ||\n control1.centerY > control2.centerY + control2.heightInPixels);\n }\n /**\n * Creates a new AdvancedDynamicTexture in projected mode (ie. attached to a mesh)\n * @param mesh defines the mesh which will receive the texture\n * @param width defines the texture width (1024 by default)\n * @param height defines the texture height (1024 by default)\n * @param supportPointerMove defines a boolean indicating if the texture must capture move events (true by default)\n * @param onlyAlphaTesting defines a boolean indicating that alpha blending will not be used (only alpha testing) (false by default)\n * @param invertY defines if the texture needs to be inverted on the y axis during loading (true by default)\n * @param materialSetupCallback defines a custom way of creating and setting up the material on the mesh\n * @returns a new AdvancedDynamicTexture\n */\n static CreateForMesh(mesh, width = 1024, height = 1024, supportPointerMove = true, onlyAlphaTesting = false, invertY, materialSetupCallback = this._CreateMaterial) {\n // use a unique ID in name so serialization will work even if you create two ADTs for a single mesh\n const uniqueId = RandomGUID();\n const result = new AdvancedDynamicTexture(`AdvancedDynamicTexture for ${mesh.name} [${uniqueId}]`, width, height, mesh.getScene(), true, Texture.TRILINEAR_SAMPLINGMODE, invertY);\n materialSetupCallback(mesh, uniqueId, result, onlyAlphaTesting);\n result.attachToMesh(mesh, supportPointerMove);\n return result;\n }\n static _CreateMaterial(mesh, uniqueId, texture, onlyAlphaTesting) {\n const internalClassType = GetClass(\"BABYLON.StandardMaterial\");\n if (!internalClassType) {\n throw \"StandardMaterial needs to be imported before as it contains a side-effect required by your code.\";\n }\n const material = new internalClassType(`AdvancedDynamicTextureMaterial for ${mesh.name} [${uniqueId}]`, mesh.getScene());\n material.backFaceCulling = false;\n material.diffuseColor = Color3.Black();\n material.specularColor = Color3.Black();\n if (onlyAlphaTesting) {\n material.diffuseTexture = texture;\n material.emissiveTexture = texture;\n texture.hasAlpha = true;\n }\n else {\n material.emissiveTexture = texture;\n material.opacityTexture = texture;\n }\n mesh.material = material;\n }\n /**\n * 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\n * @param mesh defines the mesh which will receive the texture\n * @param width defines the texture width (1024 by default)\n * @param height defines the texture height (1024 by default)\n * @param supportPointerMove defines a boolean indicating if the texture must capture move events (true by default)\n * @param invertY defines if the texture needs to be inverted on the y axis during loading (true by default)\n * @returns a new AdvancedDynamicTexture\n */\n static CreateForMeshTexture(mesh, width = 1024, height = 1024, supportPointerMove = true, invertY) {\n const result = new AdvancedDynamicTexture(mesh.name + \" AdvancedDynamicTexture\", width, height, mesh.getScene(), true, Texture.TRILINEAR_SAMPLINGMODE, invertY);\n result.attachToMesh(mesh, supportPointerMove);\n return result;\n }\n /**\n * Creates a new AdvancedDynamicTexture in fullscreen mode.\n * In this mode the texture will rely on a layer for its rendering.\n * This allows it to be treated like any other layer.\n * As such, if you have a multi camera setup, you can set the layerMask on the GUI as well.\n * LayerMask is set through advancedTexture.layer.layerMask\n * @param name defines name for the texture\n * @param foreground defines a boolean indicating if the texture must be rendered in foreground (default is true)\n * @param scene defines the hosting scene\n * @param sampling defines the texture sampling mode (Texture.BILINEAR_SAMPLINGMODE by default)\n * @param adaptiveScaling defines whether to automatically scale root to match hardwarescaling (false by default)\n * @returns a new AdvancedDynamicTexture\n */\n static CreateFullscreenUI(name, foreground = true, scene = null, sampling = Texture.BILINEAR_SAMPLINGMODE, adaptiveScaling = false) {\n const result = new AdvancedDynamicTexture(name, 0, 0, scene, false, sampling);\n // Display\n const resultScene = result.getScene();\n const layer = new Layer(name + \"_layer\", null, resultScene, !foreground);\n layer.texture = result;\n result._layerToDispose = layer;\n result._isFullscreen = true;\n if (adaptiveScaling && resultScene) {\n const newScale = 1 / resultScene.getEngine().getHardwareScalingLevel();\n result._rootContainer.scaleX = newScale;\n result._rootContainer.scaleY = newScale;\n }\n // Attach\n result.attach();\n return result;\n }\n /**\n * Scales the texture\n * @param ratio the scale factor to apply to both width and height\n */\n scale(ratio) {\n super.scale(ratio);\n this.markAsDirty();\n }\n /**\n * Resizes the texture\n * @param width the new width\n * @param height the new height\n */\n scaleTo(width, height) {\n super.scaleTo(width, height);\n this.markAsDirty();\n }\n _checkGuiIsReady() {\n if (this.guiIsReady()) {\n this.onGuiReadyObservable.notifyObservers(this);\n this.onGuiReadyObservable.clear();\n }\n }\n /**\n * Returns true if all the GUI components are ready to render\n */\n guiIsReady() {\n return this._rootContainer.isReady();\n }\n}\n/** Define the Uurl to load snippets */\nAdvancedDynamicTexture.SnippetUrl = Constants.SnippetUrl;\n/** Indicates if some optimizations can be performed in GUI GPU management (the downside is additional memory/GPU texture memory used) */\nAdvancedDynamicTexture.AllowGPUOptimizations = true;\n//# sourceMappingURL=advancedDynamicTexture.js.map","import { __decorate } from \"@babylonjs/core/tslib.es6.js\";\nimport { Logger } from \"@babylonjs/core/Misc/logger.js\";\nimport { Control } from \"./control.js\";\nimport { Measure } from \"../measure.js\";\nimport { RegisterClass } from \"@babylonjs/core/Misc/typeStore.js\";\nimport { serialize } from \"@babylonjs/core/Misc/decorators.js\";\nimport { DynamicTexture } from \"@babylonjs/core/Materials/Textures/dynamicTexture.js\";\nimport { Texture } from \"@babylonjs/core/Materials/Textures/texture.js\";\nimport { Constants } from \"@babylonjs/core/Engines/constants.js\";\nimport { Observable } from \"@babylonjs/core/Misc/observable.js\";\nimport { Tools } from \"@babylonjs/core/Misc/tools.js\";\nimport { Matrix2D } from \"../math2D.js\";\n/**\n * Root class for 2D containers\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#containers\n */\nexport class Container extends Control {\n /** Gets or sets boolean indicating if children should be rendered to an intermediate texture rather than directly to host, useful for alpha blending */\n get renderToIntermediateTexture() {\n return this._renderToIntermediateTexture;\n }\n set renderToIntermediateTexture(value) {\n if (this._renderToIntermediateTexture === value) {\n return;\n }\n this._renderToIntermediateTexture = value;\n this._markAsDirty();\n }\n /** Gets or sets a boolean indicating if the container should try to adapt to its children height */\n get adaptHeightToChildren() {\n return this._adaptHeightToChildren;\n }\n set adaptHeightToChildren(value) {\n if (this._adaptHeightToChildren === value) {\n return;\n }\n this._adaptHeightToChildren = value;\n if (value) {\n this.height = \"100%\";\n }\n this._markAsDirty();\n }\n /** Gets or sets a boolean indicating if the container should try to adapt to its children width */\n get adaptWidthToChildren() {\n return this._adaptWidthToChildren;\n }\n set adaptWidthToChildren(value) {\n if (this._adaptWidthToChildren === value) {\n return;\n }\n this._adaptWidthToChildren = value;\n if (value) {\n this.width = \"100%\";\n }\n this._markAsDirty();\n }\n /** Gets or sets background color */\n get background() {\n return this._background;\n }\n set background(value) {\n if (this._background === value) {\n return;\n }\n this._background = value;\n this._markAsDirty();\n }\n /** Gets or sets background gradient color. Takes precedence over background */\n get backgroundGradient() {\n return this._backgroundGradient;\n }\n set backgroundGradient(value) {\n if (this._backgroundGradient === value) {\n return;\n }\n this._backgroundGradient = value;\n this._markAsDirty();\n }\n /** Gets the list of children */\n get children() {\n return this._children;\n }\n get isReadOnly() {\n return this._isReadOnly;\n }\n set isReadOnly(value) {\n this._isReadOnly = value;\n for (const child of this._children) {\n child.isReadOnly = value;\n }\n }\n /**\n * Creates a new Container\n * @param name defines the name of the container\n */\n constructor(name) {\n super(name);\n this.name = name;\n /** @internal */\n this._children = new Array();\n /** @internal */\n this._measureForChildren = Measure.Empty();\n /** @internal */\n this._background = \"\";\n /** @internal */\n this._backgroundGradient = null;\n /** @internal */\n this._adaptWidthToChildren = false;\n /** @internal */\n this._adaptHeightToChildren = false;\n /** @internal */\n this._renderToIntermediateTexture = false;\n /** @internal */\n this._intermediateTexture = null;\n /**\n * Gets or sets a boolean indicating that layout cycle errors should be displayed on the console\n */\n this.logLayoutCycleErrors = false;\n /**\n * Gets or sets the number of layout cycles (a change involved by a control while evaluating the layout) allowed\n */\n this.maxLayoutCycle = 3;\n /**\n * An event triggered when any control is added to this container.\n */\n this.onControlAddedObservable = new Observable();\n /**\n * An event triggered when any control is removed from this container.\n */\n this.onControlRemovedObservable = new Observable();\n this._inverseTransformMatrix = Matrix2D.Identity();\n this._inverseMeasure = new Measure(0, 0, 0, 0);\n }\n _getTypeName() {\n return \"Container\";\n }\n _flagDescendantsAsMatrixDirty() {\n for (const child of this.children) {\n child._isClipped = false;\n child._markMatrixAsDirty();\n }\n }\n /**\n * Gets a child using its name\n * @param name defines the child name to look for\n * @returns the child control if found\n */\n getChildByName(name) {\n for (const child of this.children) {\n if (child.name === name) {\n return child;\n }\n }\n return null;\n }\n /**\n * Gets a child using its type and its name\n * @param name defines the child name to look for\n * @param type defines the child type to look for\n * @returns the child control if found\n */\n getChildByType(name, type) {\n for (const child of this.children) {\n if (child.typeName === type) {\n return child;\n }\n }\n return null;\n }\n /**\n * Search for a specific control in children\n * @param control defines the control to look for\n * @returns true if the control is in child list\n */\n containsControl(control) {\n return this.children.indexOf(control) !== -1;\n }\n /**\n * Adds a new control to the current container\n * @param control defines the control to add\n * @returns the current container\n */\n addControl(control) {\n if (!control) {\n return this;\n }\n const index = this._children.indexOf(control);\n if (index !== -1) {\n return this;\n }\n control._link(this._host);\n control._markAllAsDirty();\n this._reOrderControl(control);\n this._markAsDirty();\n this.onControlAddedObservable.notifyObservers(control);\n return this;\n }\n /**\n * Removes all controls from the current container\n * @returns the current container\n */\n clearControls() {\n const children = this.children.slice();\n for (const child of children) {\n this.removeControl(child);\n }\n return this;\n }\n /**\n * Removes a control from the current container\n * @param control defines the control to remove\n * @returns the current container\n */\n removeControl(control) {\n const index = this._children.indexOf(control);\n if (index !== -1) {\n this._children.splice(index, 1);\n control.parent = null;\n }\n control.linkWithMesh(null);\n if (this._host) {\n this._host._cleanControlAfterRemoval(control);\n }\n this._markAsDirty();\n this.onControlRemovedObservable.notifyObservers(control);\n return this;\n }\n /**\n * @internal\n */\n _reOrderControl(control) {\n const linkedMesh = control.linkedMesh;\n this.removeControl(control);\n let wasAdded = false;\n for (let index = 0; index < this._children.length; index++) {\n if (this._children[index].zIndex > control.zIndex) {\n this._children.splice(index, 0, control);\n wasAdded = true;\n break;\n }\n }\n if (!wasAdded) {\n this._children.push(control);\n }\n control.parent = this;\n if (linkedMesh) {\n control.linkWithMesh(linkedMesh);\n }\n this._markAsDirty();\n }\n /**\n * @internal\n */\n _offsetLeft(offset) {\n super._offsetLeft(offset);\n for (const child of this._children) {\n child._offsetLeft(offset);\n }\n }\n /**\n * @internal\n */\n _offsetTop(offset) {\n super._offsetTop(offset);\n for (const child of this._children) {\n child._offsetTop(offset);\n }\n }\n /** @internal */\n _markAllAsDirty() {\n super._markAllAsDirty();\n for (let index = 0; index < this._children.length; index++) {\n this._children[index]._markAllAsDirty();\n }\n }\n _getBackgroundColor(context) {\n return this._backgroundGradient ? this._backgroundGradient.getCanvasGradient(context) : this._background;\n }\n /**\n * @internal\n */\n _localDraw(context) {\n if (this._background || this._backgroundGradient) {\n context.save();\n if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {\n context.shadowColor = this.shadowColor;\n context.shadowBlur = this.shadowBlur;\n context.shadowOffsetX = this.shadowOffsetX;\n context.shadowOffsetY = this.shadowOffsetY;\n }\n context.fillStyle = this._getBackgroundColor(context);\n context.fillRect(this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);\n context.restore();\n }\n }\n /**\n * @internal\n */\n _link(host) {\n super._link(host);\n for (const child of this._children) {\n child._link(host);\n }\n }\n /** @internal */\n _beforeLayout() {\n // Do nothing\n }\n /**\n * @internal\n */\n _processMeasures(parentMeasure, context) {\n if (this._isDirty || !this._cachedParentMeasure.isEqualsTo(parentMeasure)) {\n super._processMeasures(parentMeasure, context);\n this._evaluateClippingState(parentMeasure);\n if (this._renderToIntermediateTexture) {\n if (this._intermediateTexture && this._host.getScene() != this._intermediateTexture.getScene()) {\n this._intermediateTexture.dispose();\n this._intermediateTexture = null;\n }\n if (!this._intermediateTexture) {\n this._intermediateTexture = new DynamicTexture(\"\", { width: this._currentMeasure.width, height: this._currentMeasure.height }, this._host.getScene(), false, Texture.NEAREST_SAMPLINGMODE, Constants.TEXTUREFORMAT_RGBA, false);\n this._intermediateTexture.hasAlpha = true;\n }\n else {\n this._intermediateTexture.scaleTo(this._currentMeasure.width, this._currentMeasure.height);\n }\n }\n }\n }\n /**\n * @internal\n */\n _layout(parentMeasure, context) {\n var _a, _b;\n if (!this.isDirty && (!this.isVisible || this.notRenderable)) {\n return false;\n }\n this.host._numLayoutCalls++;\n if (this._isDirty) {\n this._currentMeasure.transformToRef(this._transformMatrix, this._prevCurrentMeasureTransformedIntoGlobalSpace);\n }\n let rebuildCount = 0;\n context.save();\n this._applyStates(context);\n this._beforeLayout();\n do {\n let computedWidth = -1;\n let computedHeight = -1;\n this._rebuildLayout = false;\n this._processMeasures(parentMeasure, context);\n if (!this._isClipped) {\n for (const child of this._children) {\n child._tempParentMeasure.copyFrom(this._measureForChildren);\n if (child._layout(this._measureForChildren, context)) {\n if (child.isVisible && !child.notRenderable) {\n if (this.adaptWidthToChildren && child._width.isPixel) {\n computedWidth = Math.max(computedWidth, child._currentMeasure.width + child._paddingLeftInPixels + child._paddingRightInPixels);\n }\n if (this.adaptHeightToChildren && child._height.isPixel) {\n computedHeight = Math.max(computedHeight, child._currentMeasure.height + child._paddingTopInPixels + child._paddingBottomInPixels);\n }\n }\n }\n }\n if (this.adaptWidthToChildren && computedWidth >= 0) {\n computedWidth += this.paddingLeftInPixels + this.paddingRightInPixels;\n if (this.width !== computedWidth + \"px\") {\n (_a = this.parent) === null || _a === void 0 ? void 0 : _a._markAsDirty();\n this.width = computedWidth + \"px\";\n this._width.ignoreAdaptiveScaling = true;\n this._rebuildLayout = true;\n }\n }\n if (this.adaptHeightToChildren && computedHeight >= 0) {\n computedHeight += this.paddingTopInPixels + this.paddingBottomInPixels;\n if (this.height !== computedHeight + \"px\") {\n (_b = this.parent) === null || _b === void 0 ? void 0 : _b._markAsDirty();\n this.height = computedHeight + \"px\";\n this._height.ignoreAdaptiveScaling = true;\n this._rebuildLayout = true;\n }\n }\n this._postMeasure();\n }\n rebuildCount++;\n } while (this._rebuildLayout && rebuildCount < this.maxLayoutCycle);\n if (rebuildCount >= 3 && this.logLayoutCycleErrors) {\n Logger.Error(`Layout cycle detected in GUI (Container name=${this.name}, uniqueId=${this.uniqueId})`);\n }\n context.restore();\n if (this._isDirty) {\n this.invalidateRect();\n this._isDirty = false;\n }\n return true;\n }\n _postMeasure() {\n // Do nothing by default\n }\n /**\n * @internal\n */\n _draw(context, invalidatedRectangle) {\n const renderToIntermediateTextureThisDraw = this._renderToIntermediateTexture && this._intermediateTexture;\n const contextToDrawTo = renderToIntermediateTextureThisDraw ? this._intermediateTexture.getContext() : context;\n if (renderToIntermediateTextureThisDraw) {\n contextToDrawTo.save();\n contextToDrawTo.translate(-this._currentMeasure.left, -this._currentMeasure.top);\n if (invalidatedRectangle) {\n this._transformMatrix.invertToRef(this._inverseTransformMatrix);\n invalidatedRectangle.transformToRef(this._inverseTransformMatrix, this._inverseMeasure);\n contextToDrawTo.clearRect(this._inverseMeasure.left, this._inverseMeasure.top, this._inverseMeasure.width, this._inverseMeasure.height);\n }\n else {\n contextToDrawTo.clearRect(this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);\n }\n }\n this._localDraw(contextToDrawTo);\n context.save();\n if (this.clipChildren) {\n this._clipForChildren(contextToDrawTo);\n }\n for (const child of this._children) {\n // Only redraw parts of the screen that are invalidated\n if (invalidatedRectangle) {\n if (!child._intersectsRect(invalidatedRectangle)) {\n continue;\n }\n }\n child._render(contextToDrawTo, invalidatedRectangle);\n }\n if (renderToIntermediateTextureThisDraw) {\n contextToDrawTo.restore();\n context.save();\n context.globalAlpha = this.alpha;\n context.drawImage(contextToDrawTo.canvas, this._currentMeasure.left, this._currentMeasure.top);\n context.restore();\n }\n context.restore();\n }\n getDescendantsToRef(results, directDescendantsOnly = false, predicate) {\n if (!this.children) {\n return;\n }\n for (let index = 0; index < this.children.length; index++) {\n const item = this.children[index];\n if (!predicate || predicate(item)) {\n results.push(item);\n }\n if (!directDescendantsOnly) {\n item.getDescendantsToRef(results, false, predicate);\n }\n }\n }\n /**\n * @internal\n */\n _processPicking(x, y, pi, type, pointerId, buttonIndex, deltaX, deltaY) {\n if (!this._isEnabled || !this.isVisible || this.notRenderable) {\n return false;\n }\n // checks if the picking position is within the container\n const contains = super.contains(x, y);\n // if clipChildren is off, we should still pass picking events to children even if we don't contain the pointer\n if (!contains && this.clipChildren) {\n return false;\n }\n // Checking backwards to pick closest first\n for (let index = this._children.length - 1; index >= 0; index--) {\n const child = this._children[index];\n if (child._processPicking(x, y, pi, type, pointerId, buttonIndex, deltaX, deltaY)) {\n if (child.hoverCursor) {\n this._host._changeCursor(child.hoverCursor);\n }\n return true;\n }\n }\n if (!contains) {\n return false;\n }\n if (!this.isHitTestVisible) {\n return false;\n }\n return this._processObservables(type, x, y, pi, pointerId, buttonIndex, deltaX, deltaY);\n }\n /**\n * @internal\n */\n _additionalProcessing(parentMeasure, context) {\n super._additionalProcessing(parentMeasure, context);\n this._measureForChildren.copyFrom(this._currentMeasure);\n }\n _getAdaptDimTo(dim) {\n if (dim === \"width\") {\n return this.adaptWidthToChildren;\n }\n else {\n return this.adaptHeightToChildren;\n }\n }\n isDimensionFullyDefined(dim) {\n if (this._getAdaptDimTo(dim)) {\n for (const child of this.children) {\n if (!child.isDimensionFullyDefined(dim)) {\n return false;\n }\n }\n return true;\n }\n return super.isDimensionFullyDefined(dim);\n }\n /**\n * Serializes the current control\n * @param serializationObject defined the JSON serialized object\n */\n serialize(serializationObject) {\n super.serialize(serializationObject);\n if (this.backgroundGradient) {\n serializationObject.backgroundGradient = {};\n this.backgroundGradient.serialize(serializationObject.backgroundGradient);\n }\n if (!this.children.length) {\n return;\n }\n serializationObject.children = [];\n for (const child of this.children) {\n const childSerializationObject = {};\n child.serialize(childSerializationObject);\n serializationObject.children.push(childSerializationObject);\n }\n }\n /** Releases associated resources */\n dispose() {\n var _a;\n super.dispose();\n for (let index = this.children.length - 1; index >= 0; index--) {\n this.children[index].dispose();\n }\n (_a = this._intermediateTexture) === null || _a === void 0 ? void 0 : _a.dispose();\n }\n /**\n * @internal\n */\n _parseFromContent(serializedObject, host) {\n var _a;\n super._parseFromContent(serializedObject, host);\n this._link(host);\n // Gradient\n if (serializedObject.backgroundGradient) {\n const className = Tools.Instantiate(\"BABYLON.GUI.\" + serializedObject.backgroundGradient.className);\n this._backgroundGradient = new className();\n (_a = this._backgroundGradient) === null || _a === void 0 ? void 0 : _a.parse(serializedObject.backgroundGradient);\n }\n if (!serializedObject.children) {\n return;\n }\n for (const childData of serializedObject.children) {\n this.addControl(Control.Parse(childData, host));\n }\n }\n isReady() {\n for (const child of this.children) {\n if (!child.isReady()) {\n return false;\n }\n }\n return true;\n }\n}\n__decorate([\n serialize()\n], Container.prototype, \"renderToIntermediateTexture\", null);\n__decorate([\n serialize()\n], Container.prototype, \"maxLayoutCycle\", void 0);\n__decorate([\n serialize()\n], Container.prototype, \"adaptHeightToChildren\", null);\n__decorate([\n serialize()\n], Container.prototype, \"adaptWidthToChildren\", null);\n__decorate([\n serialize()\n], Container.prototype, \"background\", null);\n__decorate([\n serialize()\n], Container.prototype, \"backgroundGradient\", null);\nRegisterClass(\"BABYLON.GUI.Container\", Container);\n//# sourceMappingURL=container.js.map","import { __decorate } from \"@babylonjs/core/tslib.es6.js\";\nimport { Observable } from \"@babylonjs/core/Misc/observable.js\";\nimport { Vector2, Vector3, Matrix } from \"@babylonjs/core/Maths/math.vector.js\";\nimport { PointerEventTypes } from \"@babylonjs/core/Events/pointerEvents.js\";\nimport { Logger } from \"@babylonjs/core/Misc/logger.js\";\nimport { Tools } from \"@babylonjs/core/Misc/tools.js\";\nimport { ValueAndUnit } from \"../valueAndUnit.js\";\nimport { Measure } from \"../measure.js\";\nimport { Matrix2D, Vector2WithInfo } from \"../math2D.js\";\nimport { GetClass, RegisterClass } from \"@babylonjs/core/Misc/typeStore.js\";\nimport { SerializationHelper, serialize } from \"@babylonjs/core/Misc/decorators.js\";\nimport { EngineStore } from \"@babylonjs/core/Engines/engineStore.js\";\n/**\n * Root class used for all 2D controls\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#controls\n */\nexport class Control {\n /**\n * Gets or sets a boolean indicating if the control is readonly (default: false).\n * A readonly control will still raise pointer events but will not react to them\n */\n get isReadOnly() {\n return this._isReadOnly;\n }\n set isReadOnly(value) {\n this._isReadOnly = value;\n }\n /**\n * Gets the transformed measure, that is the bounding box of the control after applying all transformations\n */\n get transformedMeasure() {\n return this._evaluatedMeasure;\n }\n /**\n * Sets/Gets a boolean indicating if the children are clipped to the current control bounds.\n * Please note that not clipping children may generate issues with adt.useInvalidateRectOptimization so it is recommended to turn this optimization off if you want to use unclipped children\n */\n set clipChildren(value) {\n this._clipChildren = value;\n }\n get clipChildren() {\n return this._clipChildren;\n }\n /**\n * Sets/Gets a boolean indicating that control content must be clipped\n * Please note that not clipping content may generate issues with adt.useInvalidateRectOptimization so it is recommended to turn this optimization off if you want to use unclipped children\n */\n set clipContent(value) {\n this._clipContent = value;\n }\n get clipContent() {\n return this._clipContent;\n }\n /** Gets or sets a value indicating the offset to apply on X axis to render the shadow */\n get shadowOffsetX() {\n return this._shadowOffsetX;\n }\n set shadowOffsetX(value) {\n if (this._shadowOffsetX === value) {\n return;\n }\n this._shadowOffsetX = value;\n this._markAsDirty();\n }\n /** Gets or sets a value indicating the offset to apply on Y axis to render the shadow */\n get shadowOffsetY() {\n return this._shadowOffsetY;\n }\n set shadowOffsetY(value) {\n if (this._shadowOffsetY === value) {\n return;\n }\n this._shadowOffsetY = value;\n this._markAsDirty();\n }\n /** Gets or sets a value indicating the amount of blur to use to render the shadow */\n get shadowBlur() {\n return this._shadowBlur;\n }\n set shadowBlur(value) {\n if (this._shadowBlur === value) {\n return;\n }\n this._previousShadowBlur = this._shadowBlur;\n this._shadowBlur = value;\n this._markAsDirty();\n }\n /** Gets or sets a value indicating the color of the shadow (black by default ie. \"#000\") */\n get shadowColor() {\n return this._shadowColor;\n }\n set shadowColor(value) {\n if (this._shadowColor === value) {\n return;\n }\n this._shadowColor = value;\n this._markAsDirty();\n }\n // Properties\n /** Gets the control type name */\n get typeName() {\n return this._getTypeName();\n }\n /**\n * Get the current class name of the control.\n * @returns current class name\n */\n getClassName() {\n return this._getTypeName();\n }\n /**\n * Gets or sets the accessibility tag to describe the control for accessibility purpose.\n * By default, GUI controls already indicate accessibility info, but one can override the info using this tag.\n */\n set accessibilityTag(value) {\n this._accessibilityTag = value;\n this.onAccessibilityTagChangedObservable.notifyObservers(value);\n }\n get accessibilityTag() {\n return this._accessibilityTag;\n }\n /**\n * Get the hosting AdvancedDynamicTexture\n */\n get host() {\n return this._host;\n }\n /** Gets or set information about font offsets (used to render and align text) */\n get fontOffset() {\n return this._fontOffset;\n }\n set fontOffset(offset) {\n this._fontOffset = offset;\n }\n /** Gets or sets alpha value for the control (1 means opaque and 0 means entirely transparent) */\n get alpha() {\n return this._alpha;\n }\n set alpha(value) {\n if (this._alpha === value) {\n return;\n }\n this._alphaSet = true;\n this._alpha = value;\n this._markAsDirty();\n }\n /**\n * Gets or sets a number indicating size of stroke we want to highlight the control with (mostly for debugging purpose)\n */\n get highlightLineWidth() {\n return this._highlightLineWidth;\n }\n set highlightLineWidth(value) {\n if (this._highlightLineWidth === value) {\n return;\n }\n this._highlightLineWidth = value;\n this._markAsDirty();\n }\n /**\n * Gets or sets a boolean indicating that we want to highlight the control (mostly for debugging purpose)\n */\n get isHighlighted() {\n return this._isHighlighted;\n }\n set isHighlighted(value) {\n if (this._isHighlighted === value) {\n return;\n }\n this._isHighlighted = value;\n this._markAsDirty();\n }\n /**\n * Gets or sets a string defining the color to use for highlighting this control\n */\n get highlightColor() {\n return this._highlightColor;\n }\n set highlightColor(value) {\n if (this._highlightColor === value) {\n return;\n }\n this._highlightColor = value;\n this._markAsDirty();\n }\n /** Gets or sets a value indicating the scale factor on X axis (1 by default)\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#rotation-and-scaling\n */\n get scaleX() {\n return this._scaleX;\n }\n set scaleX(value) {\n if (this._scaleX === value) {\n return;\n }\n this._scaleX = value;\n this._markAsDirty();\n this._markMatrixAsDirty();\n }\n /** Gets or sets a value indicating the scale factor on Y axis (1 by default)\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#rotation-and-scaling\n */\n get scaleY() {\n return this._scaleY;\n }\n set scaleY(value) {\n if (this._scaleY === value) {\n return;\n }\n this._scaleY = value;\n this._markAsDirty();\n this._markMatrixAsDirty();\n }\n /** Gets or sets the rotation angle (0 by default)\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#rotation-and-scaling\n */\n get rotation() {\n return this._rotation;\n }\n set rotation(value) {\n if (this._rotation === value) {\n return;\n }\n this._rotation = value;\n this._markAsDirty();\n this._markMatrixAsDirty();\n }\n /** Gets or sets the transformation center on Y axis (0 by default)\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#rotation-and-scaling\n */\n get transformCenterY() {\n return this._transformCenterY;\n }\n set transformCenterY(value) {\n if (this._transformCenterY === value) {\n return;\n }\n this._transformCenterY = value;\n this._markAsDirty();\n this._markMatrixAsDirty();\n }\n /** Gets or sets the transformation center on X axis (0 by default)\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#rotation-and-scaling\n */\n get transformCenterX() {\n return this._transformCenterX;\n }\n set transformCenterX(value) {\n if (this._transformCenterX === value) {\n return;\n }\n this._transformCenterX = value;\n this._markAsDirty();\n this._markMatrixAsDirty();\n }\n /**\n * Gets or sets the horizontal alignment\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#alignments\n */\n get horizontalAlignment() {\n return this._horizontalAlignment;\n }\n set horizontalAlignment(value) {\n if (this._horizontalAlignment === value) {\n return;\n }\n this._horizontalAlignment = value;\n this._markAsDirty();\n }\n /**\n * Gets or sets the vertical alignment\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#alignments\n */\n get verticalAlignment() {\n return this._verticalAlignment;\n }\n set verticalAlignment(value) {\n if (this._verticalAlignment === value) {\n return;\n }\n this._verticalAlignment = value;\n this._markAsDirty();\n }\n set fixedRatio(value) {\n if (this._fixedRatio === value) {\n return;\n }\n this._fixedRatio = value;\n this._markAsDirty();\n }\n /**\n * Gets or sets a fixed ratio for this control.\n * When different from 0, the ratio is used to compute the \"second\" dimension.\n * The first dimension used in the computation is the last one set (by setting width / widthInPixels or height / heightInPixels), and the\n * second dimension is computed as first dimension * fixedRatio\n */\n get fixedRatio() {\n return this._fixedRatio;\n }\n set fixedRatioMasterIsWidth(value) {\n if (this._fixedRatioMasterIsWidth === value) {\n return;\n }\n this._fixedRatioMasterIsWidth = value;\n this._markAsDirty();\n }\n /**\n * Gets or sets a boolean indicating that the fixed ratio is set on the width instead of the height. True by default.\n * When the height of a control is set, this property is changed to false.\n */\n get fixedRatioMasterIsWidth() {\n return this._fixedRatioMasterIsWidth;\n }\n /**\n * Gets or sets control width\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\n */\n get width() {\n return this._width.toString(this._host);\n }\n set width(value) {\n this._fixedRatioMasterIsWidth = true;\n if (this._width.toString(this._host) === value) {\n return;\n }\n if (this._width.fromString(value)) {\n this._markAsDirty();\n }\n }\n /**\n * Gets or sets the control width in pixel\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\n */\n get widthInPixels() {\n return this._width.getValueInPixel(this._host, this._cachedParentMeasure.width);\n }\n set widthInPixels(value) {\n if (isNaN(value)) {\n return;\n }\n this._fixedRatioMasterIsWidth = true;\n this.width = value + \"px\";\n }\n /**\n * Gets or sets control height\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\n */\n get height() {\n return this._height.toString(this._host);\n }\n set height(value) {\n this._fixedRatioMasterIsWidth = false;\n if (this._height.toString(this._host) === value) {\n return;\n }\n if (this._height.fromString(value)) {\n this._markAsDirty();\n }\n }\n /**\n * Gets or sets control height in pixel\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\n */\n get heightInPixels() {\n return this._height.getValueInPixel(this._host, this._cachedParentMeasure.height);\n }\n set heightInPixels(value) {\n if (isNaN(value)) {\n return;\n }\n this._fixedRatioMasterIsWidth = false;\n this.height = value + \"px\";\n }\n /** Gets or set font family */\n get fontFamily() {\n return this._fontFamily;\n }\n set fontFamily(value) {\n if (this._fontFamily === value) {\n return;\n }\n this._fontFamily = value;\n this._resetFontCache();\n }\n /** Gets or sets font style */\n get fontStyle() {\n return this._fontStyle;\n }\n set fontStyle(value) {\n if (this._fontStyle === value) {\n return;\n }\n this._fontStyle = value;\n this._resetFontCache();\n }\n /** Gets or sets font weight */\n get fontWeight() {\n return this._fontWeight;\n }\n set fontWeight(value) {\n if (this._fontWeight === value) {\n return;\n }\n this._fontWeight = value;\n this._resetFontCache();\n }\n /**\n * Gets or sets style\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#styles\n */\n get style() {\n return this._style;\n }\n set style(value) {\n if (this._style) {\n this._style.onChangedObservable.remove(this._styleObserver);\n this._styleObserver = null;\n }\n this._style = value;\n if (this._style) {\n this._styleObserver = this._style.onChangedObservable.add(() => {\n this._markAsDirty();\n this._resetFontCache();\n });\n }\n this._markAsDirty();\n this._resetFontCache();\n }\n /** @internal */\n get _isFontSizeInPercentage() {\n return this._fontSize.isPercentage;\n }\n /** Gets or sets font size in pixels */\n get fontSizeInPixels() {\n const fontSizeToUse = this._style ? this._style._fontSize : this._fontSize;\n if (fontSizeToUse.isPixel) {\n return fontSizeToUse.getValue(this._host);\n }\n return fontSizeToUse.getValueInPixel(this._host, this._tempParentMeasure.height || this._cachedParentMeasure.height);\n }\n set fontSizeInPixels(value) {\n if (isNaN(value)) {\n return;\n }\n this.fontSize = value + \"px\";\n }\n /** Gets or sets font size */\n get fontSize() {\n return this._fontSize.toString(this._host);\n }\n set fontSize(value) {\n if (this._fontSize.toString(this._host) === value) {\n return;\n }\n if (this._fontSize.fromString(value)) {\n this._markAsDirty();\n this._resetFontCache();\n }\n }\n /** Gets or sets foreground color */\n get color() {\n return this._color;\n }\n set color(value) {\n if (this._color === value) {\n return;\n }\n this._color = value;\n this._markAsDirty();\n }\n /** Gets or sets gradient. Setting a gradient will override the color */\n get gradient() {\n return this._gradient;\n }\n set gradient(value) {\n if (this._gradient === value) {\n return;\n }\n this._gradient = value;\n this._markAsDirty();\n }\n /** Gets or sets z index which is used to reorder controls on the z axis */\n get zIndex() {\n return this._zIndex;\n }\n set zIndex(value) {\n if (this.zIndex === value) {\n return;\n }\n this._zIndex = value;\n if (this.parent) {\n this.parent._reOrderControl(this);\n }\n }\n /** Gets or sets a boolean indicating if the control can be rendered */\n get notRenderable() {\n return this._doNotRender;\n }\n set notRenderable(value) {\n if (this._doNotRender === value) {\n return;\n }\n this._doNotRender = value;\n this._markAsDirty();\n }\n /** Gets or sets a boolean indicating if the control is visible */\n get isVisible() {\n return this._isVisible;\n }\n set isVisible(value) {\n if (this._isVisible === value) {\n return;\n }\n this._isVisible = value;\n this._markAsDirty(true);\n this.onIsVisibleChangedObservable.notifyObservers(value);\n }\n /** Gets a boolean indicating that the control needs to update its rendering */\n get isDirty() {\n return this._isDirty;\n }\n /**\n * Gets the current linked mesh (or null if none)\n */\n get linkedMesh() {\n return this._linkedMesh;\n }\n /**\n * Gets or sets a value indicating the padding should work like in CSS.\n * Basically, it will add the padding amount on each side of the parent control for its children.\n */\n get descendantsOnlyPadding() {\n return this._descendantsOnlyPadding;\n }\n set descendantsOnlyPadding(value) {\n if (this._descendantsOnlyPadding === value) {\n return;\n }\n this._descendantsOnlyPadding = value;\n this._markAsDirty();\n }\n /**\n * Gets or sets a value indicating the padding to use on the left of the control\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\n */\n get paddingLeft() {\n return this._paddingLeft.toString(this._host);\n }\n set paddingLeft(value) {\n if (this._paddingLeft.fromString(value)) {\n this._markAsDirty();\n }\n }\n /**\n * Gets or sets a value indicating the padding in pixels to use on the left of the control\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\n */\n get paddingLeftInPixels() {\n return this._paddingLeft.getValueInPixel(this._host, this._cachedParentMeasure.width);\n }\n set paddingLeftInPixels(value) {\n if (isNaN(value)) {\n return;\n }\n this.paddingLeft = value + \"px\";\n }\n /** @internal */\n get _paddingLeftInPixels() {\n if (this._descendantsOnlyPadding) {\n return 0;\n }\n return this.paddingLeftInPixels;\n }\n /**\n * Gets or sets a value indicating the padding to use on the right of the control\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\n */\n get paddingRight() {\n return this._paddingRight.toString(this._host);\n }\n set paddingRight(value) {\n if (this._paddingRight.fromString(value)) {\n this._markAsDirty();\n }\n }\n /**\n * Gets or sets a value indicating the padding in pixels to use on the right of the control\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\n */\n get paddingRightInPixels() {\n return this._paddingRight.getValueInPixel(this._host, this._cachedParentMeasure.width);\n }\n set paddingRightInPixels(value) {\n if (isNaN(value)) {\n return;\n }\n this.paddingRight = value + \"px\";\n }\n /** @internal */\n get _paddingRightInPixels() {\n if (this._descendantsOnlyPadding) {\n return 0;\n }\n return this.paddingRightInPixels;\n }\n /**\n * Gets or sets a value indicating the padding to use on the top of the control\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\n */\n get paddingTop() {\n return this._paddingTop.toString(this._host);\n }\n set paddingTop(value) {\n if (this._paddingTop.fromString(value)) {\n this._markAsDirty();\n }\n }\n /**\n * Gets or sets a value indicating the padding in pixels to use on the top of the control\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\n */\n get paddingTopInPixels() {\n return this._paddingTop.getValueInPixel(this._host, this._cachedParentMeasure.height);\n }\n set paddingTopInPixels(value) {\n if (isNaN(value)) {\n return;\n }\n this.paddingTop = value + \"px\";\n }\n /** @internal */\n get _paddingTopInPixels() {\n if (this._descendantsOnlyPadding) {\n return 0;\n }\n return this.paddingTopInPixels;\n }\n /**\n * Gets or sets a value indicating the padding to use on the bottom of the control\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\n */\n get paddingBottom() {\n return this._paddingBottom.toString(this._host);\n }\n set paddingBottom(value) {\n if (this._paddingBottom.fromString(value)) {\n this._markAsDirty();\n }\n }\n /**\n * Gets or sets a value indicating the padding in pixels to use on the bottom of the control\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\n */\n get paddingBottomInPixels() {\n return this._paddingBottom.getValueInPixel(this._host, this._cachedParentMeasure.height);\n }\n set paddingBottomInPixels(value) {\n if (isNaN(value)) {\n return;\n }\n this.paddingBottom = value + \"px\";\n }\n /** @internal */\n get _paddingBottomInPixels() {\n if (this._descendantsOnlyPadding) {\n return 0;\n }\n return this.paddingBottomInPixels;\n }\n /**\n * Gets or sets a value indicating the left coordinate of the control\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\n */\n get left() {\n return this._left.toString(this._host);\n }\n set left(value) {\n if (this._left.fromString(value)) {\n this._markAsDirty();\n }\n }\n /**\n * Gets or sets a value indicating the left coordinate in pixels of the control\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\n */\n get leftInPixels() {\n return this._left.getValueInPixel(this._host, this._cachedParentMeasure.width);\n }\n set leftInPixels(value) {\n if (isNaN(value)) {\n return;\n }\n this.left = value + \"px\";\n }\n /**\n * Gets or sets a value indicating the top coordinate of the control\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\n */\n get top() {\n return this._top.toString(this._host);\n }\n set top(value) {\n if (this._top.fromString(value)) {\n this._markAsDirty();\n }\n }\n /**\n * Gets or sets a value indicating the top coordinate in pixels of the control\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\n */\n get topInPixels() {\n return this._top.getValueInPixel(this._host, this._cachedParentMeasure.height);\n }\n set topInPixels(value) {\n if (isNaN(value)) {\n return;\n }\n this.top = value + \"px\";\n }\n /**\n * Gets or sets a value indicating the offset on X axis to the linked mesh\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#tracking-positions\n */\n get linkOffsetX() {\n return this._linkOffsetX.toString(this._host);\n }\n set linkOffsetX(value) {\n if (this._linkOffsetX.fromString(value)) {\n this._markAsDirty();\n }\n }\n /**\n * Gets or sets a value indicating the offset in pixels on X axis to the linked mesh\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#tracking-positions\n */\n get linkOffsetXInPixels() {\n return this._linkOffsetX.getValueInPixel(this._host, this._cachedParentMeasure.width);\n }\n set linkOffsetXInPixels(value) {\n if (isNaN(value)) {\n return;\n }\n this.linkOffsetX = value + \"px\";\n }\n /**\n * Gets or sets a value indicating the offset on Y axis to the linked mesh\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#tracking-positions\n */\n get linkOffsetY() {\n return this._linkOffsetY.toString(this._host);\n }\n set linkOffsetY(value) {\n if (this._linkOffsetY.fromString(value)) {\n this._markAsDirty();\n }\n }\n /**\n * Gets or sets a value indicating the offset in pixels on Y axis to the linked mesh\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#tracking-positions\n */\n get linkOffsetYInPixels() {\n return this._linkOffsetY.getValueInPixel(this._host, this._cachedParentMeasure.height);\n }\n set linkOffsetYInPixels(value) {\n if (isNaN(value)) {\n return;\n }\n this.linkOffsetY = value + \"px\";\n }\n /** Gets the center coordinate on X axis */\n get centerX() {\n return this._currentMeasure.left + this._currentMeasure.width / 2;\n }\n /** Gets the center coordinate on Y axis */\n get centerY() {\n return this._currentMeasure.top + this._currentMeasure.height / 2;\n }\n /** Gets or sets if control is Enabled */\n get isEnabled() {\n return this._isEnabled;\n }\n set isEnabled(value) {\n if (this._isEnabled === value) {\n return;\n }\n this._isEnabled = value;\n this._markAsDirty();\n // if this control or any of it's descendants are under a pointer, we need to fire a pointerOut event\n const recursivelyFirePointerOut = (control) => {\n if (!control.host) {\n return;\n }\n for (const pointer in control.host._lastControlOver) {\n if (control === this.host._lastControlOver[pointer]) {\n control._onPointerOut(control, null, true);\n delete control.host._lastControlOver[pointer];\n }\n }\n if (control.children !== undefined) {\n control.children.forEach(recursivelyFirePointerOut);\n }\n };\n recursivelyFirePointerOut(this);\n this.onEnabledStateChangedObservable.notifyObservers(value);\n }\n /** Gets or sets background color of control if it's disabled. Only applies to Button class. */\n get disabledColor() {\n return this._disabledColor;\n }\n set disabledColor(value) {\n if (this._disabledColor === value) {\n return;\n }\n this._disabledColor = value;\n this._markAsDirty();\n }\n /** Gets or sets front color of control if it's disabled. Only applies to Checkbox class. */\n get disabledColorItem() {\n return this._disabledColorItem;\n }\n set disabledColorItem(value) {\n if (this._disabledColorItem === value) {\n return;\n }\n this._disabledColorItem = value;\n this._markAsDirty();\n }\n // Functions\n /**\n * Creates a new control\n * @param name defines the name of the control\n */\n constructor(\n /** defines the name of the control */\n name) {\n this.name = name;\n this._alpha = 1;\n this._alphaSet = false;\n this._zIndex = 0;\n /** @internal */\n this._currentMeasure = Measure.Empty();\n /** @internal */\n this._tempPaddingMeasure = Measure.Empty();\n this._fontFamily = \"\";\n this._fontStyle = \"\";\n this._fontWeight = \"\";\n this._fontSize = new ValueAndUnit(18, ValueAndUnit.UNITMODE_PIXEL, false);\n /** @internal */\n this._width = new ValueAndUnit(1, ValueAndUnit.UNITMODE_PERCENTAGE, false);\n /** @internal */\n this._height = new ValueAndUnit(1, ValueAndUnit.UNITMODE_PERCENTAGE, false);\n this._color = \"\";\n this._style = null;\n /** @internal */\n this._horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_CENTER;\n /** @internal */\n this._verticalAlignment = Control.VERTICAL_ALIGNMENT_CENTER;\n /** @internal */\n this._isDirty = true;\n /** @internal */\n this._wasDirty = false;\n /** @internal */\n this._tempParentMeasure = Measure.Empty();\n /** @internal */\n this._prevCurrentMeasureTransformedIntoGlobalSpace = Measure.Empty();\n /** @internal */\n this._cachedParentMeasure = Measure.Empty();\n this._descendantsOnlyPadding = false;\n this._paddingLeft = new ValueAndUnit(0);\n this._paddingRight = new ValueAndUnit(0);\n this._paddingTop = new ValueAndUnit(0);\n this._paddingBottom = new ValueAndUnit(0);\n /** @internal */\n this._left = new ValueAndUnit(0);\n /** @internal */\n this._top = new ValueAndUnit(0);\n this._scaleX = 1.0;\n this._scaleY = 1.0;\n this._rotation = 0;\n this._transformCenterX = 0.5;\n this._transformCenterY = 0.5;\n /** @internal */\n this._transformMatrix = Matrix2D.Identity();\n /** @internal */\n this._invertTransformMatrix = Matrix2D.Identity();\n /** @internal */\n this._transformedPosition = Vector2.Zero();\n this._isMatrixDirty = true;\n this._isVisible = true;\n this._isHighlighted = false;\n this._highlightColor = \"#4affff\";\n this._highlightLineWidth = 2;\n this._fontSet = false;\n this._dummyVector2 = Vector2.Zero();\n this._downCount = 0;\n this._enterCount = -1;\n this._doNotRender = false;\n this._downPointerIds = {};\n this._evaluatedMeasure = new Measure(0, 0, 0, 0);\n this._evaluatedParentMeasure = new Measure(0, 0, 0, 0);\n this._isEnabled = true;\n this._disabledColor = \"#9a9a9a\";\n this._disabledColorItem = \"#6a6a6a\";\n this._isReadOnly = false;\n this._gradient = null;\n /** @internal */\n this._rebuildLayout = false;\n /**\n * Observable that fires when the control's enabled state changes\n */\n this.onEnabledStateChangedObservable = new Observable();\n /** @internal */\n this._customData = {};\n /** @internal */\n this._isClipped = false;\n /** @internal */\n this._automaticSize = false;\n /**\n * Gets or sets an object used to store user defined information for the node\n */\n this.metadata = null;\n /** Gets or sets a boolean indicating if the control can be hit with pointer events */\n this.isHitTestVisible = true;\n /** Gets or sets a boolean indicating if the control can block pointer events. False by default except on the following controls:\n * * Button controls (Button, RadioButton, ToggleButton)\n * * Checkbox\n * * ColorPicker\n * * InputText\n * * Slider\n */\n this.isPointerBlocker = false;\n /** Gets or sets a boolean indicating if the control can be focusable */\n this.isFocusInvisible = false;\n this._clipChildren = true;\n this._clipContent = true;\n /**\n * Gets or sets a boolean indicating that the current control should cache its rendering (useful when the control does not change often)\n */\n this.useBitmapCache = false;\n this._shadowOffsetX = 0;\n this._shadowOffsetY = 0;\n this._shadowBlur = 0;\n this._previousShadowBlur = 0;\n this._shadowColor = \"black\";\n /** Gets or sets the cursor to use when the control is hovered */\n this.hoverCursor = \"\";\n /** @internal */\n this._linkOffsetX = new ValueAndUnit(0);\n /** @internal */\n this._linkOffsetY = new ValueAndUnit(0);\n this._accessibilityTag = null;\n this.onAccessibilityTagChangedObservable = new Observable();\n /**\n * An event triggered when pointer wheel is scrolled\n */\n this.onWheelObservable = new Observable();\n /**\n * An event triggered when the pointer moves over the control.\n */\n this.onPointerMoveObservable = new Observable();\n /**\n * An event triggered when the pointer moves out of the control.\n */\n this.onPointerOutObservable = new Observable();\n /**\n * An event triggered when the pointer taps the control\n */\n this.onPointerDownObservable = new Observable();\n /**\n * An event triggered when pointer up\n */\n this.onPointerUpObservable = new Observable();\n /**\n * An event triggered when a control is clicked on\n */\n this.onPointerClickObservable = new Observable();\n /**\n * An event triggered when pointer enters the control\n */\n this.onPointerEnterObservable = new Observable();\n /**\n * An event triggered when the control is marked as dirty\n */\n this.onDirtyObservable = new Observable();\n /**\n * An event triggered before drawing the control\n */\n this.onBeforeDrawObservable = new Observable();\n /**\n * An event triggered after the control was drawn\n */\n this.onAfterDrawObservable = new Observable();\n /**\n * An event triggered when the control has been disposed\n */\n this.onDisposeObservable = new Observable();\n /**\n * An event triggered when the control isVisible is changed\n */\n this.onIsVisibleChangedObservable = new Observable();\n this._fixedRatio = 0;\n this._fixedRatioMasterIsWidth = true;\n /**\n * Array of animations\n */\n this.animations = null;\n this._tmpMeasureA = new Measure(0, 0, 0, 0);\n }\n /** @internal */\n _getTypeName() {\n return \"Control\";\n }\n /**\n * Gets the first ascendant in the hierarchy of the given type\n * @param className defines the required type\n * @returns the ascendant or null if not found\n */\n getAscendantOfClass(className) {\n if (!this.parent) {\n return null;\n }\n if (this.parent.getClassName() === className) {\n return this.parent;\n }\n return this.parent.getAscendantOfClass(className);\n }\n /**\n * Mark control element as dirty\n * @param force force non visible elements to be marked too\n */\n markAsDirty(force = false) {\n this._markAsDirty(force);\n }\n /**\n * Mark the element and its children as dirty\n */\n markAllAsDirty() {\n this._markAllAsDirty();\n }\n /** @internal */\n _resetFontCache() {\n this._fontSet = true;\n this._markAsDirty();\n }\n /**\n * Determines if a container is an ascendant of the current control\n * @param container defines the container to look for\n * @returns true if the container is one of the ascendant of the control\n */\n isAscendant(container) {\n if (!this.parent) {\n return false;\n }\n if (this.parent === container) {\n return true;\n }\n return this.parent.isAscendant(container);\n }\n /**\n * Gets coordinates in local control space\n * @param globalCoordinates defines the coordinates to transform\n * @returns the new coordinates in local space\n */\n getLocalCoordinates(globalCoordinates) {\n const result = Vector2.Zero();\n this.getLocalCoordinatesToRef(globalCoordinates, result);\n return result;\n }\n /**\n * Gets coordinates in local control space\n * @param globalCoordinates defines the coordinates to transform\n * @param result defines the target vector2 where to store the result\n * @returns the current control\n */\n getLocalCoordinatesToRef(globalCoordinates, result) {\n result.x = globalCoordinates.x - this._currentMeasure.left;\n result.y = globalCoordinates.y - this._currentMeasure.top;\n return this;\n }\n /**\n * Gets coordinates in parent local control space\n * @param globalCoordinates defines the coordinates to transform\n * @returns the new coordinates in parent local space\n */\n getParentLocalCoordinates(globalCoordinates) {\n const result = Vector2.Zero();\n result.x = globalCoordinates.x - this._cachedParentMeasure.left;\n result.y = globalCoordinates.y - this._cachedParentMeasure.top;\n return result;\n }\n /**\n * Move the current control to a vector3 position projected onto the screen.\n * @param position defines the target position\n * @param scene defines the hosting scene\n */\n moveToVector3(position, scene) {\n if (!this._host || this.parent !== this._host._rootContainer) {\n Tools.Error(\"Cannot move a control to a vector3 if the control is not at root level\");\n return;\n }\n this.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;\n this.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP;\n const globalViewport = this._host._getGlobalViewport();\n const projectedPosition = Vector3.Project(position, Matrix.IdentityReadOnly, scene.getTransformMatrix(), globalViewport);\n this._moveToProjectedPosition(projectedPosition);\n if (projectedPosition.z < 0 || projectedPosition.z > 1) {\n this.notRenderable = true;\n return;\n }\n this.notRenderable = false;\n }\n /**\n * Will store all controls that have this control as ascendant in a given array\n * @param results defines the array where to store the descendants\n * @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\n * @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\n */\n getDescendantsToRef(results, directDescendantsOnly = false, predicate) {\n // Do nothing by default\n }\n /**\n * Will return all controls that have this control as ascendant\n * @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\n * @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\n * @returns all child controls\n */\n getDescendants(directDescendantsOnly, predicate) {\n const results = [];\n this.getDescendantsToRef(results, directDescendantsOnly, predicate);\n return results;\n }\n /**\n * Link current control with a target mesh\n * @param mesh defines the mesh to link with\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#tracking-positions\n */\n linkWithMesh(mesh) {\n if (!this._host || (this.parent && this.parent !== this._host._rootContainer)) {\n if (mesh) {\n Tools.Error(\"Cannot link a control to a mesh if the control is not at root level\");\n }\n return;\n }\n const index = this._host._linkedControls.indexOf(this);\n if (index !== -1) {\n this._linkedMesh = mesh;\n if (!mesh) {\n this._host._linkedControls.splice(index, 1);\n }\n return;\n }\n else if (!mesh) {\n return;\n }\n this.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;\n this.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP;\n this._linkedMesh = mesh;\n this._host._linkedControls.push(this);\n }\n /**\n * Shorthand function to set the top, right, bottom, and left padding values on the control.\n * @param { string | number} paddingTop - The value of the top padding.\n * @param { string | number} paddingRight - The value of the right padding. If omitted, top is used.\n * @param { string | number} paddingBottom - The value of the bottom padding. If omitted, top is used.\n * @param { string | number} paddingLeft - The value of the left padding. If omitted, right is used.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\n */\n setPadding(paddingTop, paddingRight, paddingBottom, paddingLeft) {\n const top = paddingTop;\n const right = paddingRight !== null && paddingRight !== void 0 ? paddingRight : top;\n const bottom = paddingBottom !== null && paddingBottom !== void 0 ? paddingBottom : top;\n const left = paddingLeft !== null && paddingLeft !== void 0 ? paddingLeft : right;\n this.paddingTop = top;\n this.paddingRight = right;\n this.paddingBottom = bottom;\n this.paddingLeft = left;\n }\n /**\n * Shorthand funtion to set the top, right, bottom, and left padding values in pixels on the control.\n * @param { number} paddingTop - The value in pixels of the top padding.\n * @param { number} paddingRight - The value in pixels of the right padding. If omitted, top is used.\n * @param { number} paddingBottom - The value in pixels of the bottom padding. If omitted, top is used.\n * @param { number} paddingLeft - The value in pixels of the left padding. If omitted, right is used.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\n */\n setPaddingInPixels(paddingTop, paddingRight, paddingBottom, paddingLeft) {\n const top = paddingTop;\n const right = paddingRight !== null && paddingRight !== void 0 ? paddingRight : top;\n const bottom = paddingBottom !== null && paddingBottom !== void 0 ? paddingBottom : top;\n const left = paddingLeft !== null && paddingLeft !== void 0 ? paddingLeft : right;\n this.paddingTopInPixels = top;\n this.paddingRightInPixels = right;\n this.paddingBottomInPixels = bottom;\n this.paddingLeftInPixels = left;\n }\n /**\n * @internal\n */\n _moveToProjectedPosition(projectedPosition) {\n var _a;\n const oldLeft = this._left.getValue(this._host);\n const oldTop = this._top.getValue(this._host);\n const parentMeasure = (_a = this.parent) === null || _a === void 0 ? void 0 : _a._currentMeasure;\n if (parentMeasure) {\n this._processMeasures(parentMeasure, this._host.getContext());\n }\n let newLeft = projectedPosition.x + this._linkOffsetX.getValue(this._host) - this._currentMeasure.width / 2;\n let newTop = projectedPosition.y + this._linkOffsetY.getValue(this._host) - this._currentMeasure.height / 2;\n const leftAndTopIgnoreAdaptiveScaling = this._left.ignoreAdaptiveScaling && this._top.ignoreAdaptiveScaling;\n if (leftAndTopIgnoreAdaptiveScaling) {\n if (Math.abs(newLeft - oldLeft) < 0.5) {\n newLeft = oldLeft;\n }\n if (Math.abs(newTop - oldTop) < 0.5) {\n newTop = oldTop;\n }\n }\n if (!leftAndTopIgnoreAdaptiveScaling && oldLeft === newLeft && oldTop === newTop) {\n return;\n }\n this.left = newLeft + \"px\";\n this.top = newTop + \"px\";\n this._left.ignoreAdaptiveScaling = true;\n this._top.ignoreAdaptiveScaling = true;\n this._markAsDirty();\n }\n /**\n * @internal\n */\n _offsetLeft(offset) {\n this._isDirty = true;\n this._currentMeasure.left += offset;\n }\n /**\n * @internal\n */\n _offsetTop(offset) {\n this._isDirty = true;\n this._currentMeasure.top += offset;\n }\n /** @internal */\n _markMatrixAsDirty() {\n this._isMatrixDirty = true;\n this._flagDescendantsAsMatrixDirty();\n }\n /** @internal */\n _flagDescendantsAsMatrixDirty() {\n // No child\n }\n /**\n * @internal\n */\n _intersectsRect(rect, context) {\n // make sure we are transformed correctly before checking intersections. no-op if nothing is dirty.\n this._transform(context);\n if (this._evaluatedMeasure.left >= rect.left + rect.width) {\n return false;\n }\n if (this._evaluatedMeasure.top >= rect.top + rect.height) {\n return false;\n }\n if (this._evaluatedMeasure.left + this._evaluatedMeasure.width <= rect.left) {\n return false;\n }\n if (this._evaluatedMeasure.top + this._evaluatedMeasure.height <= rect.top) {\n return false;\n }\n return true;\n }\n /** @internal */\n _computeAdditionalOffsetX() {\n return 0;\n }\n /** @internal */\n _computeAdditionalOffsetY() {\n return 0;\n }\n /** @internal */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n invalidateRect() {\n this._transform();\n if (this.host && this.host.useInvalidateRectOptimization) {\n // Rotate by transform to get the measure transformed to global space\n this._currentMeasure.transformToRef(this._transformMatrix, this._tmpMeasureA);\n // get the boudning box of the current measure and last frames measure in global space and invalidate it\n // the previous measure is used to properly clear a control that is scaled down\n Measure.CombineToRef(this._tmpMeasureA, this._prevCurrentMeasureTransformedIntoGlobalSpace, this._tmpMeasureA);\n // Expand rect based on shadows\n const shadowOffsetX = this.shadowOffsetX;\n const shadowOffsetY = this.shadowOffsetY;\n const shadowBlur = Math.max(this._previousShadowBlur, this.shadowBlur);\n const leftShadowOffset = Math.min(Math.min(shadowOffsetX, 0) - shadowBlur * 2, 0);\n const rightShadowOffset = Math.max(Math.max(shadowOffsetX, 0) + shadowBlur * 2, 0);\n const topShadowOffset = Math.min(Math.min(shadowOffsetY, 0) - shadowBlur * 2, 0);\n const bottomShadowOffset = Math.max(Math.max(shadowOffsetY, 0) + shadowBlur * 2, 0);\n const offsetX = this._computeAdditionalOffsetX();\n const offsetY = this._computeAdditionalOffsetY();\n this.host.invalidateRect(Math.floor(this._tmpMeasureA.left + leftShadowOffset - offsetX), Math.floor(this._tmpMeasureA.top + topShadowOffset - offsetY), Math.ceil(this._tmpMeasureA.left + this._tmpMeasureA.width + rightShadowOffset + offsetX), Math.ceil(this._tmpMeasureA.top + this._tmpMeasureA.height + bottomShadowOffset + offsetY));\n }\n }\n /**\n * @internal\n */\n _markAsDirty(force = false) {\n if (!this._isVisible && !force) {\n return;\n }\n this._isDirty = true;\n this._markMatrixAsDirty();\n // Redraw only this rectangle\n if (this._host) {\n this._host.markAsDirty();\n }\n }\n /** @internal */\n _markAllAsDirty() {\n this._markAsDirty();\n if (this._font) {\n this._prepareFont();\n }\n }\n /**\n * @internal\n */\n _link(host) {\n this._host = host;\n if (this._host) {\n this.uniqueId = this._host.getScene().getUniqueId();\n }\n }\n /**\n * @internal\n */\n _transform(context) {\n if (!this._isMatrixDirty && this._scaleX === 1 && this._scaleY === 1 && this._rotation === 0) {\n return;\n }\n // postTranslate\n const offsetX = this._currentMeasure.width * this._transformCenterX + this._currentMeasure.left;\n const offsetY = this._currentMeasure.height * this._transformCenterY + this._currentMeasure.top;\n if (context) {\n context.translate(offsetX, offsetY);\n // rotate\n context.rotate(this._rotation);\n // scale\n context.scale(this._scaleX, this._scaleY);\n // preTranslate\n context.translate(-offsetX, -offsetY);\n }\n // Need to update matrices?\n if (this._isMatrixDirty || this._cachedOffsetX !== offsetX || this._cachedOffsetY !== offsetY) {\n this._cachedOffsetX = offsetX;\n this._cachedOffsetY = offsetY;\n this._isMatrixDirty = false;\n this._flagDescendantsAsMatrixDirty();\n Matrix2D.ComposeToRef(-offsetX, -offsetY, this._rotation, this._scaleX, this._scaleY, this.parent ? this.parent._transformMatrix : null, this._transformMatrix);\n this._transformMatrix.invertToRef(this._invertTransformMatrix);\n this._currentMeasure.transformToRef(this._transformMatrix, this._evaluatedMeasure);\n }\n }\n /**\n * @internal\n */\n _renderHighlight(context) {\n if (!this.isHighlighted) {\n return;\n }\n context.save();\n context.strokeStyle = this._highlightColor;\n context.lineWidth = this._highlightLineWidth;\n this._renderHighlightSpecific(context);\n context.restore();\n }\n /**\n * @internal\n */\n _renderHighlightSpecific(context) {\n context.strokeRect(this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);\n }\n _getColor(context) {\n return this.gradient ? this.gradient.getCanvasGradient(context) : this.color;\n }\n /**\n * @internal\n */\n _applyStates(context) {\n if (this._isFontSizeInPercentage) {\n this._fontSet = true;\n }\n if (this._host && this._host.useSmallestIdeal && !this._font) {\n this._fontSet = true;\n }\n if (this._fontSet) {\n this._prepareFont();\n this._fontSet = false;\n }\n if (this._font) {\n context.font = this._font;\n }\n if (this._color || this.gradient) {\n context.fillStyle = this._getColor(context);\n }\n if (Control.AllowAlphaInheritance) {\n context.globalAlpha *= this._alpha;\n }\n else if (this._alphaSet) {\n context.globalAlpha = this.parent && !this.parent.renderToIntermediateTexture ? this.parent.alpha * this._alpha : this._alpha;\n }\n }\n /**\n * @internal\n */\n _layout(parentMeasure, context) {\n if (!this.isDirty && (!this.isVisible || this.notRenderable)) {\n return false;\n }\n if (this._isDirty || !this._cachedParentMeasure.isEqualsTo(parentMeasure)) {\n this.host._numLayoutCalls++;\n this._currentMeasure.addAndTransformToRef(this._transformMatrix, -this._paddingLeftInPixels | 0, -this._paddingTopInPixels | 0, this._paddingRightInPixels | 0, this._paddingBottomInPixels | 0, this._prevCurrentMeasureTransformedIntoGlobalSpace);\n context.save();\n this._applyStates(context);\n let rebuildCount = 0;\n do {\n this._rebuildLayout = false;\n this._processMeasures(parentMeasure, context);\n rebuildCount++;\n } while (this._rebuildLayout && rebuildCount < 3);\n if (rebuildCount >= 3) {\n Logger.Error(`Layout cycle detected in GUI (Control name=${this.name}, uniqueId=${this.uniqueId})`);\n }\n context.restore();\n this.invalidateRect();\n this._evaluateClippingState(parentMeasure);\n }\n this._wasDirty = this._isDirty;\n this._isDirty = false;\n return true;\n }\n /**\n * @internal\n */\n _processMeasures(parentMeasure, context) {\n this._tempPaddingMeasure.copyFrom(parentMeasure);\n // Apply padding if in correct mode\n if (this.parent && this.parent.descendantsOnlyPadding) {\n this._tempPaddingMeasure.left += this.parent.paddingLeftInPixels;\n this._tempPaddingMeasure.top += this.parent.paddingTopInPixels;\n this._tempPaddingMeasure.width -= this.parent.paddingLeftInPixels + this.parent.paddingRightInPixels;\n this._tempPaddingMeasure.height -= this.parent.paddingTopInPixels + this.parent.paddingBottomInPixels;\n }\n this._currentMeasure.copyFrom(this._tempPaddingMeasure);\n // Let children take some pre-measurement actions\n this._preMeasure(this._tempPaddingMeasure, context);\n this._measure();\n // Let children take some post-measurement actions\n this._postMeasure(this._tempPaddingMeasure, context);\n this._computeAlignment(this._tempPaddingMeasure, context);\n // Convert to int values\n this._currentMeasure.left = this._currentMeasure.left | 0;\n this._currentMeasure.top = this._currentMeasure.top | 0;\n this._currentMeasure.width = this._currentMeasure.width | 0;\n this._currentMeasure.height = this._currentMeasure.height | 0;\n // Let children add more features\n this._additionalProcessing(this._tempPaddingMeasure, context);\n this._cachedParentMeasure.copyFrom(this._tempPaddingMeasure);\n this._currentMeasure.transformToRef(this._transformMatrix, this._evaluatedMeasure);\n if (this.onDirtyObservable.hasObservers()) {\n this.onDirtyObservable.notifyObservers(this);\n }\n }\n _evaluateClippingState(parentMeasure) {\n // Since transformMatrix is used here, we need to have it freshly computed\n this._transform();\n this._currentMeasure.transformToRef(this._transformMatrix, this._evaluatedMeasure);\n if (this.parent && this.parent.clipChildren) {\n parentMeasure.transformToRef(this.parent._transformMatrix, this._evaluatedParentMeasure);\n // Early clip\n if (this._evaluatedMeasure.left > this._evaluatedParentMeasure.left + this._evaluatedParentMeasure.width) {\n this._isClipped = true;\n return;\n }\n if (this._evaluatedMeasure.left + this._evaluatedMeasure.width < this._evaluatedParentMeasure.left) {\n this._isClipped = true;\n return;\n }\n if (this._evaluatedMeasure.top > this._evaluatedParentMeasure.top + this._evaluatedParentMeasure.height) {\n this._isClipped = true;\n return;\n }\n if (this._evaluatedMeasure.top + this._evaluatedMeasure.height < this._evaluatedParentMeasure.top) {\n this._isClipped = true;\n return;\n }\n }\n this._isClipped = false;\n }\n /** @internal */\n _measure() {\n // Width / Height\n if (this._width.isPixel) {\n this._currentMeasure.width = this._width.getValue(this._host);\n }\n else {\n this._currentMeasure.width *= this._width.getValue(this._host);\n }\n if (this._height.isPixel) {\n this._currentMeasure.height = this._height.getValue(this._host);\n }\n else {\n this._currentMeasure.height *= this._height.getValue(this._host);\n }\n if (this._fixedRatio !== 0) {\n if (this._fixedRatioMasterIsWidth) {\n this._currentMeasure.height = this._currentMeasure.width * this._fixedRatio;\n }\n else {\n this._currentMeasure.width = this._currentMeasure.height * this._fixedRatio;\n }\n }\n }\n /**\n * @internal\n */\n _computeAlignment(parentMeasure, context) {\n const width = this._currentMeasure.width;\n const height = this._currentMeasure.height;\n const parentWidth = parentMeasure.width;\n const parentHeight = parentMeasure.height;\n // Left / top\n let x = 0;\n let y = 0;\n switch (this.horizontalAlignment) {\n case Control.HORIZONTAL_ALIGNMENT_LEFT:\n x = 0;\n break;\n case Control.HORIZONTAL_ALIGNMENT_RIGHT:\n x = parentWidth - width;\n break;\n case Control.HORIZONTAL_ALIGNMENT_CENTER:\n x = (parentWidth - width) / 2;\n break;\n }\n switch (this.verticalAlignment) {\n case Control.VERTICAL_ALIGNMENT_TOP:\n y = 0;\n break;\n case Control.VERTICAL_ALIGNMENT_BOTTOM:\n y = parentHeight - height;\n break;\n case Control.VERTICAL_ALIGNMENT_CENTER:\n y = (parentHeight - height) / 2;\n break;\n }\n if (!this.descendantsOnlyPadding) {\n if (this._paddingLeft.isPixel) {\n this._currentMeasure.left += this._paddingLeft.getValue(this._host);\n this._currentMeasure.width -= this._paddingLeft.getValue(this._host);\n }\n else {\n this._currentMeasure.left += parentWidth * this._paddingLeft.getValue(this._host);\n this._currentMeasure.width -= parentWidth * this._paddingLeft.getValue(this._host);\n }\n if (this._paddingRight.isPixel) {\n this._currentMeasure.width -= this._paddingRight.getValue(this._host);\n }\n else {\n this._currentMeasure.width -= parentWidth * this._paddingRight.getValue(this._host);\n }\n if (this._paddingTop.isPixel) {\n this._currentMeasure.top += this._paddingTop.getValue(this._host);\n this._currentMeasure.height -= this._paddingTop.getValue(this._host);\n }\n else {\n this._currentMeasure.top += parentHeight * this._paddingTop.getValue(this._host);\n this._currentMeasure.height -= parentHeight * this._paddingTop.getValue(this._host);\n }\n if (this._paddingBottom.isPixel) {\n this._currentMeasure.height -= this._paddingBottom.getValue(this._host);\n }\n else {\n this._currentMeasure.height -= parentHeight * this._paddingBottom.getValue(this._host);\n }\n }\n if (this._left.isPixel) {\n this._currentMeasure.left += this._left.getValue(this._host);\n }\n else {\n this._currentMeasure.left += parentWidth * this._left.getValue(this._host);\n }\n if (this._top.isPixel) {\n this._currentMeasure.top += this._top.getValue(this._host);\n }\n else {\n this._currentMeasure.top += parentHeight * this._top.getValue(this._host);\n }\n this._currentMeasure.left += x;\n this._currentMeasure.top += y;\n }\n /**\n * @internal\n */\n _preMeasure(parentMeasure, context) {\n // Do nothing\n }\n /**\n * @internal\n */\n _postMeasure(parentMeasure, context) {\n // Do nothing\n }\n /**\n * @internal\n */\n _additionalProcessing(parentMeasure, context) {\n // Do nothing\n }\n /**\n * @internal\n */\n _clipForChildren(context) {\n // DO nothing\n }\n _clip(context, invalidatedRectangle) {\n context.beginPath();\n Control._ClipMeasure.copyFrom(this._currentMeasure);\n if (invalidatedRectangle) {\n // Rotate the invalidated rect into the control's space\n invalidatedRectangle.transformToRef(this._invertTransformMatrix, this._tmpMeasureA);\n // Get the intersection of the rect in context space and the current context\n const intersection = new Measure(0, 0, 0, 0);\n intersection.left = Math.max(this._tmpMeasureA.left, this._currentMeasure.left);\n intersection.top = Math.max(this._tmpMeasureA.top, this._currentMeasure.top);\n intersection.width = Math.min(this._tmpMeasureA.left + this._tmpMeasureA.width, this._currentMeasure.left + this._currentMeasure.width) - intersection.left;\n intersection.height = Math.min(this._tmpMeasureA.top + this._tmpMeasureA.height, this._currentMeasure.top + this._currentMeasure.height) - intersection.top;\n Control._ClipMeasure.copyFrom(intersection);\n }\n if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {\n const shadowOffsetX = this.shadowOffsetX;\n const shadowOffsetY = this.shadowOffsetY;\n const shadowBlur = this.shadowBlur;\n const leftShadowOffset = Math.min(Math.min(shadowOffsetX, 0) - shadowBlur * 2, 0);\n const rightShadowOffset = Math.max(Math.max(shadowOffsetX, 0) + shadowBlur * 2, 0);\n const topShadowOffset = Math.min(Math.min(shadowOffsetY, 0) - shadowBlur * 2, 0);\n const bottomShadowOffset = Math.max(Math.max(shadowOffsetY, 0) + shadowBlur * 2, 0);\n context.rect(Control._ClipMeasure.left + leftShadowOffset, Control._ClipMeasure.top + topShadowOffset, Control._ClipMeasure.width + rightShadowOffset - leftShadowOffset, Control._ClipMeasure.height + bottomShadowOffset - topShadowOffset);\n }\n else {\n context.rect(Control._ClipMeasure.left, Control._ClipMeasure.top, Control._ClipMeasure.width, Control._ClipMeasure.height);\n }\n context.clip();\n }\n /**\n * @internal\n */\n _render(context, invalidatedRectangle) {\n if (!this.isVisible || this.notRenderable || this._isClipped) {\n this._isDirty = false;\n return false;\n }\n this.host._numRenderCalls++;\n context.save();\n this._applyStates(context);\n // Transform\n this._transform(context);\n // Clip\n if (this.clipContent) {\n this._clip(context, invalidatedRectangle);\n }\n if (this.onBeforeDrawObservable.hasObservers()) {\n this.onBeforeDrawObservable.notifyObservers(this);\n }\n if (this.useBitmapCache && !this._wasDirty && this._cacheData) {\n context.putImageData(this._cacheData, this._currentMeasure.left, this._currentMeasure.top);\n }\n else {\n this._draw(context, invalidatedRectangle);\n }\n if (this.useBitmapCache && this._wasDirty) {\n this._cacheData = context.getImageData(this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);\n }\n this._renderHighlight(context);\n if (this.onAfterDrawObservable.hasObservers()) {\n this.onAfterDrawObservable.notifyObservers(this);\n }\n context.restore();\n return true;\n }\n /**\n * @internal\n */\n _draw(context, invalidatedRectangle) {\n // Do nothing\n }\n /**\n * Tests if a given coordinates belong to the current control\n * @param x defines x coordinate to test\n * @param y defines y coordinate to test\n * @returns true if the coordinates are inside the control\n */\n contains(x, y) {\n // Invert transform\n this._invertTransformMatrix.transformCoordinates(x, y, this._transformedPosition);\n x = this._transformedPosition.x;\n y = this._transformedPosition.y;\n // Check\n if (x < this._currentMeasure.left) {\n return false;\n }\n if (x > this._currentMeasure.left + this._currentMeasure.width) {\n return false;\n }\n if (y < this._currentMeasure.top) {\n return false;\n }\n if (y > this._currentMeasure.top + this._currentMeasure.height) {\n return false;\n }\n if (this.isPointerBlocker) {\n this._host._shouldBlockPointer = true;\n }\n return true;\n }\n /**\n * @internal\n */\n _processPicking(x, y, pi, type, pointerId, buttonIndex, deltaX, deltaY) {\n if (!this._isEnabled) {\n return false;\n }\n if (!this.isHitTestVisible || !this.isVisible || this._doNotRender) {\n return false;\n }\n if (!this.contains(x, y)) {\n return false;\n }\n this._processObservables(type, x, y, pi, pointerId, buttonIndex, deltaX, deltaY);\n return true;\n }\n /**\n * @internal\n */\n _onPointerMove(target, coordinates, pointerId, pi) {\n const canNotify = this.onPointerMoveObservable.notifyObservers(coordinates, -1, target, this, pi);\n if (canNotify && this.parent != null && !this.isPointerBlocker) {\n this.parent._onPointerMove(target, coordinates, pointerId, pi);\n }\n }\n /**\n * @internal\n */\n _onPointerEnter(target, pi) {\n if (!this._isEnabled) {\n return false;\n }\n if (this._enterCount > 0) {\n return false;\n }\n if (this._enterCount === -1) {\n // -1 is for touch input, we are now sure we are with a mouse or pencil\n this._enterCount = 0;\n }\n this._enterCount++;\n const canNotify = this.onPointerEnterObservable.notifyObservers(this, -1, target, this, pi);\n if (canNotify && this.parent != null && !this.isPointerBlocker) {\n this.parent._onPointerEnter(target, pi);\n }\n return true;\n }\n /**\n * @internal\n */\n _onPointerOut(target, pi, force = false) {\n if (!force && (!this._isEnabled || target === this)) {\n return;\n }\n this._enterCount = 0;\n let canNotify = true;\n if (!target.isAscendant(this)) {\n canNotify = this.onPointerOutObservable.notifyObservers(this, -1, target, this, pi);\n }\n if (canNotify && this.parent != null && !this.isPointerBlocker) {\n this.parent._onPointerOut(target, pi, force);\n }\n }\n /**\n * @internal\n */\n _onPointerDown(target, coordinates, pointerId, buttonIndex, pi) {\n // Prevent pointerout to lose control context.\n // Event redundancy is checked inside the function.\n this._onPointerEnter(this, pi);\n if (this._downCount !== 0) {\n return false;\n }\n this._downCount++;\n this._downPointerIds[pointerId] = true;\n const canNotify = this.onPointerDownObservable.notifyObservers(new Vector2WithInfo(coordinates, buttonIndex), -1, target, this, pi);\n if (canNotify && this.parent != null && !this.isPointerBlocker) {\n this.parent._onPointerDown(target, coordinates, pointerId, buttonIndex, pi);\n }\n if (pi && this.uniqueId !== this._host.rootContainer.uniqueId) {\n this._host._capturedPointerIds.add(pi.event.pointerId);\n }\n return true;\n }\n /**\n * @internal\n */\n _onPointerUp(target, coordinates, pointerId, buttonIndex, notifyClick, pi) {\n if (!this._isEnabled) {\n return;\n }\n this._downCount = 0;\n delete this._downPointerIds[pointerId];\n let canNotifyClick = notifyClick;\n if (notifyClick && (this._enterCount > 0 || this._enterCount === -1)) {\n canNotifyClick = this.onPointerClickObservable.notifyObservers(new Vector2WithInfo(coordinates, buttonIndex), -1, target, this, pi);\n }\n const canNotify = this.onPointerUpObservable.notifyObservers(new Vector2WithInfo(coordinates, buttonIndex), -1, target, this, pi);\n if (canNotify && this.parent != null && !this.isPointerBlocker) {\n this.parent._onPointerUp(target, coordinates, pointerId, buttonIndex, canNotifyClick, pi);\n }\n if (pi && this.uniqueId !== this._host.rootContainer.uniqueId) {\n this._host._capturedPointerIds.delete(pi.event.pointerId);\n }\n }\n /**\n * @internal\n */\n _forcePointerUp(pointerId = null) {\n if (pointerId !== null) {\n this._onPointerUp(this, Vector2.Zero(), pointerId, 0, true);\n }\n else {\n for (const key in this._downPointerIds) {\n this._onPointerUp(this, Vector2.Zero(), +key, 0, true);\n }\n }\n }\n /**\n * @internal\n */\n _onWheelScroll(deltaX, deltaY) {\n if (!this._isEnabled) {\n return;\n }\n const canNotify = this.onWheelObservable.notifyObservers(new Vector2(deltaX, deltaY));\n if (canNotify && this.parent != null) {\n this.parent._onWheelScroll(deltaX, deltaY);\n }\n }\n /** @internal */\n _onCanvasBlur() { }\n /**\n * @internal\n */\n _processObservables(type, x, y, pi, pointerId, buttonIndex, deltaX, deltaY) {\n if (!this._isEnabled) {\n return false;\n }\n this._dummyVector2.copyFromFloats(x, y);\n if (type === PointerEventTypes.POINTERMOVE) {\n this._onPointerMove(this, this._dummyVector2, pointerId, pi);\n const previousControlOver = this._host._lastControlOver[pointerId];\n if (previousControlOver && previousControlOver !== this) {\n previousControlOver._onPointerOut(this, pi);\n }\n if (previousControlOver !== this) {\n this._onPointerEnter(this, pi);\n }\n this._host._lastControlOver[pointerId] = this;\n return true;\n }\n if (type === PointerEventTypes.POINTERDOWN) {\n this._onPointerDown(this, this._dummyVector2, pointerId, buttonIndex, pi);\n this._host._registerLastControlDown(this, pointerId);\n this._host._lastPickedControl = this;\n return true;\n }\n if (type === PointerEventTypes.POINTERUP) {\n if (this._host._lastControlDown[pointerId]) {\n this._host._lastControlDown[pointerId]._onPointerUp(this, this._dummyVector2, pointerId, buttonIndex, true, pi);\n }\n delete this._host._lastControlDown[pointerId];\n return true;\n }\n if (type === PointerEventTypes.POINTERWHEEL) {\n if (this._host._lastControlOver[pointerId]) {\n this._host._lastControlOver[pointerId]._onWheelScroll(deltaX, deltaY);\n return true;\n }\n }\n return false;\n }\n _getStyleProperty(propName, defaultValue) {\n var _a;\n const prop = (_a = (this._style && this._style[propName])) !== null && _a !== void 0 ? _a : this[propName];\n if (!prop && this.parent) {\n return this.parent._getStyleProperty(propName, defaultValue);\n }\n else if (!this.parent) {\n return defaultValue;\n }\n else {\n return prop;\n }\n }\n _prepareFont() {\n if (!this._font && !this._fontSet) {\n return;\n }\n this._font =\n this._getStyleProperty(\"fontStyle\", \"\") +\n \" \" +\n this._getStyleProperty(\"fontWeight\", \"\") +\n \" \" +\n this.fontSizeInPixels +\n \"px \" +\n this._getStyleProperty(\"fontFamily\", \"Arial\");\n this._fontOffset = Control._GetFontOffset(this._font);\n //children need to be refreshed\n this.getDescendants().forEach((child) => child._markAllAsDirty());\n }\n /**\n * A control has a dimension fully defined if that dimension doesn't depend on the parent's dimension.\n * As an example, a control that has dimensions in pixels is fully defined, while in percentage is not fully defined.\n * @param dim the dimension to check (width or height)\n * @returns if the dimension is fully defined\n */\n isDimensionFullyDefined(dim) {\n return this.getDimension(dim).isPixel;\n }\n /**\n * Gets the dimension of the control along a specified axis\n * @param dim the dimension to retrieve (width or height)\n * @returns the dimension value along the specified axis\n */\n getDimension(dim) {\n if (dim === \"width\") {\n return this._width;\n }\n else {\n return this._height;\n }\n }\n /**\n * Clones a control and its descendants\n * @param host the texture where the control will be instantiated. Can be empty, in which case the control will be created on the same texture\n * @returns the cloned control\n */\n clone(host) {\n const serialization = {};\n this.serialize(serialization);\n const controlType = Tools.Instantiate(\"BABYLON.GUI.\" + serialization.className);\n const cloned = new controlType();\n cloned.parse(serialization, host);\n return cloned;\n }\n /**\n * Parses a serialized object into this control\n * @param serializedObject the object with the serialized properties\n * @param host the texture where the control will be instantiated. Can be empty, in which case the control will be created on the same texture\n * @returns this control\n */\n parse(serializedObject, host) {\n SerializationHelper.Parse(() => this, serializedObject, null);\n this.name = serializedObject.name;\n this._parseFromContent(serializedObject, host !== null && host !== void 0 ? host : this._host);\n return this;\n }\n /**\n * Serializes the current control\n * @param serializationObject defined the JSON serialized object\n */\n serialize(serializationObject) {\n SerializationHelper.Serialize(this, serializationObject);\n serializationObject.name = this.name;\n serializationObject.className = this.getClassName();\n // Call prepareFont to guarantee the font is properly set before serializing\n this._prepareFont();\n if (this._font) {\n serializationObject.fontFamily = this._fontFamily;\n serializationObject.fontSize = this.fontSize;\n serializationObject.fontWeight = this.fontWeight;\n serializationObject.fontStyle = this.fontStyle;\n }\n if (this._gradient) {\n serializationObject.gradient = {};\n this._gradient.serialize(serializationObject.gradient);\n }\n // Animations\n SerializationHelper.AppendSerializedAnimations(this, serializationObject);\n }\n /**\n * @internal\n */\n _parseFromContent(serializedObject, host) {\n var _a, _b;\n if (serializedObject.fontFamily) {\n this.fontFamily = serializedObject.fontFamily;\n }\n if (serializedObject.fontSize) {\n this.fontSize = serializedObject.fontSize;\n }\n if (serializedObject.fontWeight) {\n this.fontWeight = serializedObject.fontWeight;\n }\n if (serializedObject.fontStyle) {\n this.fontStyle = serializedObject.fontStyle;\n }\n // Gradient\n if (serializedObject.gradient) {\n const className = Tools.Instantiate(\"BABYLON.GUI.\" + serializedObject.gradient.className);\n this._gradient = new className();\n (_a = this._gradient) === null || _a === void 0 ? void 0 : _a.parse(serializedObject.gradient);\n }\n // Animations\n if (serializedObject.animations) {\n this.animations = [];\n for (let animationIndex = 0; animationIndex < serializedObject.animations.length; animationIndex++) {\n const parsedAnimation = serializedObject.animations[animationIndex];\n const internalClass = GetClass(\"BABYLON.Animation\");\n if (internalClass) {\n this.animations.push(internalClass.Parse(parsedAnimation));\n }\n }\n if (serializedObject.autoAnimate && this._host && this._host.getScene()) {\n this._host\n .getScene()\n .beginAnimation(this, serializedObject.autoAnimateFrom, serializedObject.autoAnimateTo, serializedObject.autoAnimateLoop, serializedObject.autoAnimateSpeed || 1.0);\n }\n }\n this.fixedRatioMasterIsWidth = (_b = serializedObject.fixedRatioMasterIsWidth) !== null && _b !== void 0 ? _b : this.fixedRatioMasterIsWidth;\n }\n /** Releases associated resources */\n dispose() {\n this.onDirtyObservable.clear();\n this.onBeforeDrawObservable.clear();\n this.onAfterDrawObservable.clear();\n this.onPointerDownObservable.clear();\n this.onPointerEnterObservable.clear();\n this.onPointerMoveObservable.clear();\n this.onPointerOutObservable.clear();\n this.onPointerUpObservable.clear();\n this.onPointerClickObservable.clear();\n this.onWheelObservable.clear();\n if (this._styleObserver && this._style) {\n this._style.onChangedObservable.remove(this._styleObserver);\n this._styleObserver = null;\n }\n if (this.parent) {\n this.parent.removeControl(this);\n this.parent = null;\n }\n if (this._host) {\n const index = this._host._linkedControls.indexOf(this);\n if (index > -1) {\n this.linkWithMesh(null);\n }\n }\n // Callback\n this.onDisposeObservable.notifyObservers(this);\n this.onDisposeObservable.clear();\n }\n /** HORIZONTAL_ALIGNMENT_LEFT */\n static get HORIZONTAL_ALIGNMENT_LEFT() {\n return Control._HORIZONTAL_ALIGNMENT_LEFT;\n }\n /** HORIZONTAL_ALIGNMENT_RIGHT */\n static get HORIZONTAL_ALIGNMENT_RIGHT() {\n return Control._HORIZONTAL_ALIGNMENT_RIGHT;\n }\n /** HORIZONTAL_ALIGNMENT_CENTER */\n static get HORIZONTAL_ALIGNMENT_CENTER() {\n return Control._HORIZONTAL_ALIGNMENT_CENTER;\n }\n /** VERTICAL_ALIGNMENT_TOP */\n static get VERTICAL_ALIGNMENT_TOP() {\n return Control._VERTICAL_ALIGNMENT_TOP;\n }\n /** VERTICAL_ALIGNMENT_BOTTOM */\n static get VERTICAL_ALIGNMENT_BOTTOM() {\n return Control._VERTICAL_ALIGNMENT_BOTTOM;\n }\n /** VERTICAL_ALIGNMENT_CENTER */\n static get VERTICAL_ALIGNMENT_CENTER() {\n return Control._VERTICAL_ALIGNMENT_CENTER;\n }\n /**\n * @internal\n */\n static _GetFontOffset(font) {\n if (Control._FontHeightSizes[font]) {\n return Control._FontHeightSizes[font];\n }\n const engine = EngineStore.LastCreatedEngine;\n if (!engine) {\n throw new Error(\"Invalid engine. Unable to create a canvas.\");\n }\n const result = engine.getFontOffset(font);\n Control._FontHeightSizes[font] = result;\n return result;\n }\n /**\n * Creates a Control from parsed data\n * @param serializedObject defines parsed data\n * @param host defines the hosting AdvancedDynamicTexture\n * @returns a new Control\n */\n static Parse(serializedObject, host) {\n const controlType = Tools.Instantiate(\"BABYLON.GUI.\" + serializedObject.className);\n const control = SerializationHelper.Parse(() => new controlType(), serializedObject, null);\n control.name = serializedObject.name;\n control._parseFromContent(serializedObject, host);\n return control;\n }\n /**\n * @internal\n */\n static drawEllipse(x, y, width, height, context) {\n context.translate(x, y);\n context.scale(width, height);\n context.beginPath();\n context.arc(0, 0, 1, 0, 2 * Math.PI);\n context.closePath();\n context.scale(1 / width, 1 / height);\n context.translate(-x, -y);\n }\n /**\n * Returns true if the control is ready to be used\n * @returns\n */\n isReady() {\n // Most controls are ready by default, so the default implementation is to return true\n return true;\n }\n}\n/**\n * Gets or sets a boolean indicating if alpha must be an inherited value (false by default)\n */\nControl.AllowAlphaInheritance = false;\nControl._ClipMeasure = new Measure(0, 0, 0, 0);\n// Statics\nControl._HORIZONTAL_ALIGNMENT_LEFT = 0;\nControl._HORIZONTAL_ALIGNMENT_RIGHT = 1;\nControl._HORIZONTAL_ALIGNMENT_CENTER = 2;\nControl._VERTICAL_ALIGNMENT_TOP = 0;\nControl._VERTICAL_ALIGNMENT_BOTTOM = 1;\nControl._VERTICAL_ALIGNMENT_CENTER = 2;\nControl._FontHeightSizes = {};\nControl.AddHeader = () => { };\n__decorate([\n serialize()\n], Control.prototype, \"metadata\", void 0);\n__decorate([\n serialize()\n], Control.prototype, \"isHitTestVisible\", void 0);\n__decorate([\n serialize()\n], Control.prototype, \"isPointerBlocker\", void 0);\n__decorate([\n serialize()\n], Control.prototype, \"isFocusInvisible\", void 0);\n__decorate([\n serialize()\n], Control.prototype, \"clipChildren\", null);\n__decorate([\n serialize()\n], Control.prototype, \"clipContent\", null);\n__decorate([\n serialize()\n], Control.prototype, \"useBitmapCache\", void 0);\n__decorate([\n serialize()\n], Control.prototype, \"shadowOffsetX\", null);\n__decorate([\n serialize()\n], Control.prototype, \"shadowOffsetY\", null);\n__decorate([\n serialize()\n], Control.prototype, \"shadowBlur\", null);\n__decorate([\n serialize()\n], Control.prototype, \"shadowColor\", null);\n__decorate([\n serialize()\n], Control.prototype, \"hoverCursor\", void 0);\n__decorate([\n serialize()\n], Control.prototype, \"fontOffset\", null);\n__decorate([\n serialize()\n], Control.prototype, \"alpha\", null);\n__decorate([\n serialize()\n], Control.prototype, \"scaleX\", null);\n__decorate([\n serialize()\n], Control.prototype, \"scaleY\", null);\n__decorate([\n serialize()\n], Control.prototype, \"rotation\", null);\n__decorate([\n serialize()\n], Control.prototype, \"transformCenterY\", null);\n__decorate([\n serialize()\n], Control.prototype, \"transformCenterX\", null);\n__decorate([\n serialize()\n], Control.prototype, \"horizontalAlignment\", null);\n__decorate([\n serialize()\n], Control.prototype, \"verticalAlignment\", null);\n__decorate([\n serialize()\n], Control.prototype, \"fixedRatio\", null);\n__decorate([\n serialize()\n], Control.prototype, \"fixedRatioMasterIsWidth\", null);\n__decorate([\n serialize()\n], Control.prototype, \"width\", null);\n__decorate([\n serialize()\n], Control.prototype, \"height\", null);\n__decorate([\n serialize()\n], Control.prototype, \"style\", null);\n__decorate([\n serialize()\n], Control.prototype, \"color\", null);\n__decorate([\n serialize()\n], Control.prototype, \"gradient\", null);\n__decorate([\n serialize()\n], Control.prototype, \"zIndex\", null);\n__decorate([\n serialize()\n], Control.prototype, \"notRenderable\", null);\n__decorate([\n serialize()\n], Control.prototype, \"isVisible\", null);\n__decorate([\n serialize()\n], Control.prototype, \"descendantsOnlyPadding\", null);\n__decorate([\n serialize()\n], Control.prototype, \"paddingLeft\", null);\n__decorate([\n serialize()\n], Control.prototype, \"paddingRight\", null);\n__decorate([\n serialize()\n], Control.prototype, \"paddingTop\", null);\n__decorate([\n serialize()\n], Control.prototype, \"paddingBottom\", null);\n__decorate([\n serialize()\n], Control.prototype, \"left\", null);\n__decorate([\n serialize()\n], Control.prototype, \"top\", null);\n__decorate([\n serialize()\n], Control.prototype, \"linkOffsetX\", null);\n__decorate([\n serialize()\n], Control.prototype, \"linkOffsetY\", null);\n__decorate([\n serialize()\n], Control.prototype, \"isEnabled\", null);\n__decorate([\n serialize()\n], Control.prototype, \"disabledColor\", null);\n__decorate([\n serialize()\n], Control.prototype, \"disabledColorItem\", null);\n__decorate([\n serialize()\n], Control.prototype, \"overlapGroup\", void 0);\n__decorate([\n serialize()\n], Control.prototype, \"overlapDeltaMultiplier\", void 0);\nRegisterClass(\"BABYLON.GUI.Control\", Control);\n//# sourceMappingURL=control.js.map","import { __decorate } from \"@babylonjs/core/tslib.es6.js\";\nimport { Container } from \"./container.js\";\nimport { ValueAndUnit } from \"../valueAndUnit.js\";\nimport { Control } from \"./control.js\";\nimport { Tools } from \"@babylonjs/core/Misc/tools.js\";\nimport { RegisterClass } from \"@babylonjs/core/Misc/typeStore.js\";\nimport { serialize } from \"@babylonjs/core/Misc/decorators.js\";\n/**\n * Class used to create a 2D grid container\n */\nexport class Grid extends Container {\n /**\n * Sets/Gets a boolean indicating that control content must be clipped\n * Please note that not clipping content may generate issues with adt.useInvalidateRectOptimization so it is recommended to turn this optimization off if you want to use unclipped children\n */\n set clipContent(value) {\n this._clipContent = value;\n // This value has to be replicated on all of the container cells\n for (const key in this._cells) {\n this._cells[key].clipContent = value;\n }\n }\n get clipContent() {\n return this._clipContent;\n }\n /**\n * Sets/Gets a boolean indicating if the children are clipped to the current control bounds.\n * Please note that not clipping children may generate issues with adt.useInvalidateRectOptimization so it is recommended to turn this optimization off if you want to use unclipped children\n */\n set clipChildren(value) {\n this._clipChildren = value;\n // This value has to be replicated on all of the container cells\n for (const key in this._cells) {\n this._cells[key].clipChildren = value;\n }\n }\n get clipChildren() {\n return this._clipChildren;\n }\n /**\n * Gets the number of columns\n */\n get columnCount() {\n return this._columnDefinitions.length;\n }\n /**\n * Gets the number of rows\n */\n get rowCount() {\n return this._rowDefinitions.length;\n }\n /** Gets the list of children */\n get children() {\n return this._childControls;\n }\n /** Gets the list of cells (e.g. the containers) */\n get cells() {\n return this._cells;\n }\n /**\n * Gets the definition of a specific row\n * @param index defines the index of the row\n * @returns the row definition\n */\n getRowDefinition(index) {\n if (index < 0 || index >= this._rowDefinitions.length) {\n return null;\n }\n return this._rowDefinitions[index];\n }\n /**\n * Gets the definition of a specific column\n * @param index defines the index of the column\n * @returns the column definition\n */\n getColumnDefinition(index) {\n if (index < 0 || index >= this._columnDefinitions.length) {\n return null;\n }\n return this._columnDefinitions[index];\n }\n /**\n * Adds a new row to the grid\n * @param height defines the height of the row (either in pixel or a value between 0 and 1)\n * @param isPixel defines if the height is expressed in pixel (or in percentage)\n * @returns the current grid\n */\n addRowDefinition(height, isPixel = false) {\n this._rowDefinitions.push(new ValueAndUnit(height, isPixel ? ValueAndUnit.UNITMODE_PIXEL : ValueAndUnit.UNITMODE_PERCENTAGE));\n this._rowDefinitionObservers.push(this._rowDefinitions[this.rowCount - 1].onChangedObservable.add(() => this._markAsDirty()));\n this._markAsDirty();\n return this;\n }\n /**\n * Adds a new column to the grid\n * @param width defines the width of the column (either in pixel or a value between 0 and 1)\n * @param isPixel defines if the width is expressed in pixel (or in percentage)\n * @returns the current grid\n */\n addColumnDefinition(width, isPixel = false) {\n this._columnDefinitions.push(new ValueAndUnit(width, isPixel ? ValueAndUnit.UNITMODE_PIXEL : ValueAndUnit.UNITMODE_PERCENTAGE));\n this._columnDefinitionObservers.push(this._columnDefinitions[this.columnCount - 1].onChangedObservable.add(() => this._markAsDirty()));\n this._markAsDirty();\n return this;\n }\n /**\n * Update a row definition\n * @param index defines the index of the row to update\n * @param height defines the height of the row (either in pixel or a value between 0 and 1)\n * @param isPixel defines if the weight is expressed in pixel (or in percentage)\n * @returns the current grid\n */\n setRowDefinition(index, height, isPixel = false) {\n if (index < 0 || index >= this._rowDefinitions.length) {\n return this;\n }\n const current = this._rowDefinitions[index];\n if (current && current.isPixel === isPixel && current.value === height) {\n return this;\n }\n this._rowDefinitions[index].onChangedObservable.remove(this._rowDefinitionObservers[index]);\n this._rowDefinitions[index] = new ValueAndUnit(height, isPixel ? ValueAndUnit.UNITMODE_PIXEL : ValueAndUnit.UNITMODE_PERCENTAGE);\n this._rowDefinitionObservers[index] = this._rowDefinitions[index].onChangedObservable.add(() => this._markAsDirty());\n this._markAsDirty();\n return this;\n }\n /**\n * Update a column definition\n * @param index defines the index of the column to update\n * @param width defines the width of the column (either in pixel or a value between 0 and 1)\n * @param isPixel defines if the width is expressed in pixel (or in percentage)\n * @returns the current grid\n */\n setColumnDefinition(index, width, isPixel = false) {\n if (index < 0 || index >= this._columnDefinitions.length) {\n return this;\n }\n const current = this._columnDefinitions[index];\n if (current && current.isPixel === isPixel && current.value === width) {\n return this;\n }\n this._columnDefinitions[index].onChangedObservable.remove(this._columnDefinitionObservers[index]);\n this._columnDefinitions[index] = new ValueAndUnit(width, isPixel ? ValueAndUnit.UNITMODE_PIXEL : ValueAndUnit.UNITMODE_PERCENTAGE);\n this._columnDefinitionObservers[index] = this._columnDefinitions[index].onChangedObservable.add(() => this._markAsDirty());\n this._markAsDirty();\n return this;\n }\n /**\n * Gets the list of children stored in a specific cell\n * @param row defines the row to check\n * @param column defines the column to check\n * @returns the list of controls\n */\n getChildrenAt(row, column) {\n const cell = this._cells[`${row}:${column}`];\n if (!cell) {\n return null;\n }\n return cell.children;\n }\n /**\n * Gets a string representing the child cell info (row x column)\n * @param child defines the control to get info from\n * @returns a string containing the child cell info (row x column)\n */\n getChildCellInfo(child) {\n return child._tag;\n }\n _removeCell(cell, key) {\n if (!cell) {\n return;\n }\n super.removeControl(cell);\n for (const control of cell.children) {\n const childIndex = this._childControls.indexOf(control);\n if (childIndex !== -1) {\n this._childControls.splice(childIndex, 1);\n }\n }\n delete this._cells[key];\n }\n _offsetCell(previousKey, key) {\n if (!this._cells[key]) {\n return;\n }\n this._cells[previousKey] = this._cells[key];\n for (const control of this._cells[previousKey].children) {\n control._tag = previousKey;\n }\n delete this._cells[key];\n }\n /**\n * Remove a column definition at specified index\n * @param index defines the index of the column to remove\n * @returns the current grid\n */\n removeColumnDefinition(index) {\n if (index < 0 || index >= this._columnDefinitions.length) {\n return this;\n }\n for (let x = 0; x < this._rowDefinitions.length; x++) {\n const key = `${x}:${index}`;\n const cell = this._cells[key];\n this._removeCell(cell, key);\n }\n for (let x = 0; x < this._rowDefinitions.length; x++) {\n for (let y = index + 1; y < this._columnDefinitions.length; y++) {\n const previousKey = `${x}:${y - 1}`;\n const key = `${x}:${y}`;\n this._offsetCell(previousKey, key);\n }\n }\n this._columnDefinitions[index].onChangedObservable.remove(this._columnDefinitionObservers[index]);\n this._columnDefinitions.splice(index, 1);\n this._columnDefinitionObservers.splice(index, 1);\n this._markAsDirty();\n return this;\n }\n /**\n * Remove a row definition at specified index\n * @param index defines the index of the row to remove\n * @returns the current grid\n */\n removeRowDefinition(index) {\n if (index < 0 || index >= this._rowDefinitions.length) {\n return this;\n }\n for (let y = 0; y < this._columnDefinitions.length; y++) {\n const key = `${index}:${y}`;\n const cell = this._cells[key];\n this._removeCell(cell, key);\n }\n for (let y = 0; y < this._columnDefinitions.length; y++) {\n for (let x = index + 1; x < this._rowDefinitions.length; x++) {\n const previousKey = `${x - 1}:${y}`;\n const key = `${x}:${y}`;\n this._offsetCell(previousKey, key);\n }\n }\n this._rowDefinitions[index].onChangedObservable.remove(this._rowDefinitionObservers[index]);\n this._rowDefinitions.splice(index, 1);\n this._rowDefinitionObservers.splice(index, 1);\n this._markAsDirty();\n return this;\n }\n /**\n * Adds a new control to the current grid\n * @param control defines the control to add\n * @param row defines the row where to add the control (0 by default)\n * @param column defines the column where to add the control (0 by default)\n * @returns the current grid\n */\n addControl(control, row = 0, column = 0) {\n if (this._rowDefinitions.length === 0) {\n // Add default row definition\n this.addRowDefinition(1, false);\n }\n if (this._columnDefinitions.length === 0) {\n // Add default column definition\n this.addColumnDefinition(1, false);\n }\n if (this._childControls.indexOf(control) !== -1) {\n Tools.Warn(`Control (Name:${control.name}, UniqueId:${control.uniqueId}) is already associated with this grid. You must remove it before reattaching it`);\n return this;\n }\n const x = Math.min(row, this._rowDefinitions.length - 1);\n const y = Math.min(column, this._columnDefinitions.length - 1);\n const key = `${x}:${y}`;\n let goodContainer = this._cells[key];\n if (!goodContainer) {\n goodContainer = new Container(key);\n this._cells[key] = goodContainer;\n goodContainer.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;\n goodContainer.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP;\n goodContainer.clipContent = this.clipContent;\n goodContainer.clipChildren = this.clipChildren;\n super.addControl(goodContainer);\n }\n goodContainer.addControl(control);\n this._childControls.push(control);\n control._tag = key;\n control.parent = this;\n this._markAsDirty();\n return this;\n }\n /**\n * Removes a control from the current container\n * @param control defines the control to remove\n * @returns the current container\n */\n removeControl(control) {\n const index = this._childControls.indexOf(control);\n if (index !== -1) {\n this._childControls.splice(index, 1);\n }\n const cell = this._cells[control._tag];\n if (cell) {\n cell.removeControl(control);\n control._tag = null;\n }\n this._markAsDirty();\n return this;\n }\n /**\n * Creates a new Grid\n * @param name defines control name\n */\n constructor(name) {\n super(name);\n this.name = name;\n this._rowDefinitions = new Array();\n this._rowDefinitionObservers = [];\n this._columnDefinitions = new Array();\n this._columnDefinitionObservers = [];\n this._cells = {};\n this._childControls = new Array();\n }\n _getTypeName() {\n return \"Grid\";\n }\n _getGridDefinitions(definitionCallback) {\n const widths = [];\n const heights = [];\n const lefts = [];\n const tops = [];\n let availableWidth = this._currentMeasure.width;\n let globalWidthPercentage = 0;\n let availableHeight = this._currentMeasure.height;\n let globalHeightPercentage = 0;\n // Heights\n let index = 0;\n for (const rowDefinition of this._rowDefinitions) {\n if (rowDefinition.isPixel) {\n const height = rowDefinition.getValue(this._host);\n availableHeight -= height;\n heights[index] = height;\n }\n else {\n globalHeightPercentage += rowDefinition.value;\n }\n index++;\n }\n let top = 0;\n index = 0;\n for (const rowDefinition of this._rowDefinitions) {\n tops.push(top);\n if (!rowDefinition.isPixel) {\n const height = Math.round((rowDefinition.value / globalHeightPercentage) * availableHeight);\n top += height;\n heights[index] = height;\n }\n else {\n top += rowDefinition.getValue(this._host);\n }\n index++;\n }\n // Widths\n index = 0;\n for (const columnDefinition of this._columnDefinitions) {\n if (columnDefinition.isPixel) {\n const width = columnDefinition.getValue(this._host);\n availableWidth -= width;\n widths[index] = width;\n }\n else {\n globalWidthPercentage += columnDefinition.value;\n }\n index++;\n }\n let left = 0;\n index = 0;\n for (const columnDefinition of this._columnDefinitions) {\n lefts.push(left);\n if (!columnDefinition.isPixel) {\n const width = Math.round((columnDefinition.value / globalWidthPercentage) * availableWidth);\n left += width;\n widths[index] = width;\n }\n else {\n left += columnDefinition.getValue(this._host);\n }\n index++;\n }\n definitionCallback(lefts, tops, widths, heights);\n }\n _additionalProcessing(parentMeasure, context) {\n this._getGridDefinitions((lefts, tops, widths, heights) => {\n // Setting child sizes\n for (const key in this._cells) {\n if (!Object.prototype.hasOwnProperty.call(this._cells, key)) {\n continue;\n }\n const split = key.split(\":\");\n const x = parseInt(split[0]);\n const y = parseInt(split[1]);\n const cell = this._cells[key];\n cell.leftInPixels = lefts[y];\n cell.topInPixels = tops[x];\n cell.widthInPixels = widths[y];\n cell.heightInPixels = heights[x];\n cell._left.ignoreAdaptiveScaling = true;\n cell._top.ignoreAdaptiveScaling = true;\n cell._width.ignoreAdaptiveScaling = true;\n cell._height.ignoreAdaptiveScaling = true;\n }\n });\n super._additionalProcessing(parentMeasure, context);\n }\n _flagDescendantsAsMatrixDirty() {\n for (const key in this._cells) {\n if (!Object.prototype.hasOwnProperty.call(this._cells, key)) {\n continue;\n }\n const child = this._cells[key];\n child._markMatrixAsDirty();\n }\n }\n _renderHighlightSpecific(context) {\n super._renderHighlightSpecific(context);\n this._getGridDefinitions((lefts, tops, widths, heights) => {\n // Columns\n for (let index = 0; index < lefts.length; index++) {\n const left = this._currentMeasure.left + lefts[index] + widths[index];\n context.beginPath();\n context.moveTo(left, this._currentMeasure.top);\n context.lineTo(left, this._currentMeasure.top + this._currentMeasure.height);\n context.stroke();\n }\n // Rows\n for (let index = 0; index < tops.length; index++) {\n const top = this._currentMeasure.top + tops[index] + heights[index];\n context.beginPath();\n context.moveTo(this._currentMeasure.left, top);\n context.lineTo(this._currentMeasure.left + this._currentMeasure.width, top);\n context.stroke();\n }\n });\n context.restore();\n }\n /** Releases associated resources */\n dispose() {\n super.dispose();\n for (const control of this._childControls) {\n control.dispose();\n }\n for (let index = 0; index < this._rowDefinitions.length; index++) {\n this._rowDefinitions[index].onChangedObservable.remove(this._rowDefinitionObservers[index]);\n }\n for (let index = 0; index < this._columnDefinitions.length; index++) {\n this._columnDefinitions[index].onChangedObservable.remove(this._columnDefinitionObservers[index]);\n }\n this._rowDefinitionObservers.length = 0;\n this._rowDefinitions.length = 0;\n this._columnDefinitionObservers.length = 0;\n this._columnDefinitions.length = 0;\n this._cells = {};\n this._childControls.length = 0;\n }\n /**\n * Serializes the current control\n * @param serializationObject defined the JSON serialized object\n */\n serialize(serializationObject) {\n super.serialize(serializationObject);\n serializationObject.columnCount = this.columnCount;\n serializationObject.rowCount = this.rowCount;\n serializationObject.columns = [];\n serializationObject.rows = [];\n serializationObject.tags = [];\n for (let i = 0; i < this.columnCount; ++i) {\n const cd = this.getColumnDefinition(i);\n const childSerializationObject = { value: cd === null || cd === void 0 ? void 0 : cd.getValue(this.host), unit: cd === null || cd === void 0 ? void 0 : cd.unit };\n serializationObject.columns.push(childSerializationObject);\n }\n for (let i = 0; i < this.rowCount; ++i) {\n const rd = this.getRowDefinition(i);\n const childSerializationObject = { value: rd === null || rd === void 0 ? void 0 : rd.getValue(this.host), unit: rd === null || rd === void 0 ? void 0 : rd.unit };\n serializationObject.rows.push(childSerializationObject);\n }\n this.children.forEach((child) => {\n serializationObject.tags.push(child._tag);\n });\n }\n /**\n * @internal\n */\n _parseFromContent(serializedObject, host) {\n super._parseFromContent(serializedObject, host);\n const children = [];\n this.children.forEach((child) => {\n children.push(child);\n });\n this.removeRowDefinition(0);\n this.removeColumnDefinition(0);\n for (let i = 0; i < serializedObject.columnCount; ++i) {\n const columnValue = serializedObject.columns[i].value;\n const unit = serializedObject.columns[i].unit;\n this.addColumnDefinition(columnValue, unit === 1 ? true : false);\n }\n for (let i = 0; i < serializedObject.rowCount; ++i) {\n const rowValue = serializedObject.rows[i].value;\n const unit = serializedObject.rows[i].unit;\n this.addRowDefinition(rowValue, unit === 1 ? true : false);\n }\n for (let i = 0; i < children.length; ++i) {\n const cellInfo = serializedObject.tags[i];\n let rowNumber = parseInt(cellInfo.substring(0, cellInfo.search(\":\")));\n if (isNaN(rowNumber)) {\n rowNumber = 0;\n }\n let columnNumber = parseInt(cellInfo.substring(cellInfo.search(\":\") + 1));\n if (isNaN(columnNumber)) {\n columnNumber = 0;\n }\n this.addControl(children[i], rowNumber, columnNumber);\n }\n }\n}\n__decorate([\n serialize()\n], Grid.prototype, \"clipContent\", null);\nRegisterClass(\"BABYLON.GUI.Grid\", Grid);\n//# sourceMappingURL=grid.js.map","import { __decorate } from \"@babylonjs/core/tslib.es6.js\";\nimport { Observable } from \"@babylonjs/core/Misc/observable.js\";\nimport { Tools } from \"@babylonjs/core/Misc/tools.js\";\nimport { Control } from \"./control.js\";\nimport { RegisterClass } from \"@babylonjs/core/Misc/typeStore.js\";\nimport { serialize } from \"@babylonjs/core/Misc/decorators.js\";\nimport { EngineStore } from \"@babylonjs/core/Engines/engineStore.js\";\n/**\n * Class used to create 2D images\n */\nexport class Image extends Control {\n /**\n * Gets a boolean indicating that the content is loaded\n */\n get isLoaded() {\n return this._loaded;\n }\n isReady() {\n return this.isLoaded;\n }\n /**\n * Gets or sets a boolean indicating if pointers should only be validated on pixels with alpha > 0.\n * Beware using this as this will consume more memory as the image has to be stored twice\n */\n get detectPointerOnOpaqueOnly() {\n return this._detectPointerOnOpaqueOnly;\n }\n set detectPointerOnOpaqueOnly(value) {\n if (this._detectPointerOnOpaqueOnly === value) {\n return;\n }\n this._detectPointerOnOpaqueOnly = value;\n }\n /**\n * Gets or sets the left value for slicing (9-patch)\n */\n get sliceLeft() {\n return this._sliceLeft;\n }\n set sliceLeft(value) {\n if (this._sliceLeft === value) {\n return;\n }\n this._sliceLeft = value;\n this._markAsDirty();\n }\n /**\n * Gets or sets the right value for slicing (9-patch)\n */\n get sliceRight() {\n return this._sliceRight;\n }\n set sliceRight(value) {\n if (this._sliceRight === value) {\n return;\n }\n this._sliceRight = value;\n this._markAsDirty();\n }\n /**\n * Gets or sets the top value for slicing (9-patch)\n */\n get sliceTop() {\n return this._sliceTop;\n }\n set sliceTop(value) {\n if (this._sliceTop === value) {\n return;\n }\n this._sliceTop = value;\n this._markAsDirty();\n }\n /**\n * Gets or sets the bottom value for slicing (9-patch)\n */\n get sliceBottom() {\n return this._sliceBottom;\n }\n set sliceBottom(value) {\n if (this._sliceBottom === value) {\n return;\n }\n this._sliceBottom = value;\n this._markAsDirty();\n }\n /**\n * Gets or sets the left coordinate in the source image\n */\n get sourceLeft() {\n return this._sourceLeft;\n }\n set sourceLeft(value) {\n if (this._sourceLeft === value) {\n return;\n }\n this._sourceLeft = value;\n this._markAsDirty();\n }\n /**\n * Gets or sets the top coordinate in the source image\n */\n get sourceTop() {\n return this._sourceTop;\n }\n set sourceTop(value) {\n if (this._sourceTop === value) {\n return;\n }\n this._sourceTop = value;\n this._markAsDirty();\n }\n /**\n * Gets or sets the width to capture in the source image\n */\n get sourceWidth() {\n return this._sourceWidth;\n }\n set sourceWidth(value) {\n if (this._sourceWidth === value) {\n return;\n }\n this._sourceWidth = value;\n this._markAsDirty();\n }\n /**\n * Gets or sets the height to capture in the source image\n */\n get sourceHeight() {\n return this._sourceHeight;\n }\n set sourceHeight(value) {\n if (this._sourceHeight === value) {\n return;\n }\n this._sourceHeight = value;\n this._markAsDirty();\n }\n /**\n * Gets the image width\n */\n get imageWidth() {\n return this._imageWidth;\n }\n /**\n * Gets the image height\n */\n get imageHeight() {\n return this._imageHeight;\n }\n /**\n * Gets or sets a boolean indicating if nine patch slices (left, top, right, bottom) should be read from image data\n */\n get populateNinePatchSlicesFromImage() {\n return this._populateNinePatchSlicesFromImage;\n }\n set populateNinePatchSlicesFromImage(value) {\n if (this._populateNinePatchSlicesFromImage === value) {\n return;\n }\n this._populateNinePatchSlicesFromImage = value;\n if (this._populateNinePatchSlicesFromImage && this._loaded) {\n this._extractNinePatchSliceDataFromImage();\n }\n }\n /** Indicates if the format of the image is SVG */\n get isSVG() {\n return this._isSVG;\n }\n /** Gets the status of the SVG attributes computation (sourceLeft, sourceTop, sourceWidth, sourceHeight) */\n get svgAttributesComputationCompleted() {\n return this._svgAttributesComputationCompleted;\n }\n /**\n * Gets or sets a boolean indicating if the image can force its container to adapt its size\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#image\n */\n get autoScale() {\n return this._autoScale;\n }\n set autoScale(value) {\n if (this._autoScale === value) {\n return;\n }\n this._autoScale = value;\n if (value && this._loaded) {\n this.synchronizeSizeWithContent();\n }\n }\n /** Gets or sets the stretching mode used by the image */\n get stretch() {\n return this._stretch;\n }\n set stretch(value) {\n if (this._stretch === value) {\n return;\n }\n this._stretch = value;\n this._markAsDirty();\n }\n /**\n * @internal\n */\n _rotate90(n, preserveProperties = false) {\n var _a, _b;\n const width = this._domImage.width;\n const height = this._domImage.height;\n // Should abstract platform instead of using LastCreatedEngine\n const engine = ((_b = (_a = this._host) === null || _a === void 0 ? void 0 : _a.getScene()) === null || _b === void 0 ? void 0 : _b.getEngine()) || EngineStore.LastCreatedEngine;\n if (!engine) {\n throw new Error(\"Invalid engine. Unable to create a canvas.\");\n }\n const canvas = engine.createCanvas(height, width);\n const context = canvas.getContext(\"2d\");\n context.translate(canvas.width / 2, canvas.height / 2);\n context.rotate((n * Math.PI) / 2);\n context.drawImage(this._domImage, 0, 0, width, height, -width / 2, -height / 2, width, height);\n const dataUrl = canvas.toDataURL(\"image/jpg\");\n const rotatedImage = new Image(this.name + \"rotated\", dataUrl);\n if (preserveProperties) {\n rotatedImage._stretch = this._stretch;\n rotatedImage._autoScale = this._autoScale;\n rotatedImage._cellId = this._cellId;\n rotatedImage._cellWidth = n % 1 ? this._cellHeight : this._cellWidth;\n rotatedImage._cellHeight = n % 1 ? this._cellWidth : this._cellHeight;\n }\n this._handleRotationForSVGImage(this, rotatedImage, n);\n this._imageDataCache.data = null;\n return rotatedImage;\n }\n _handleRotationForSVGImage(srcImage, dstImage, n) {\n if (!srcImage._isSVG) {\n return;\n }\n if (srcImage._svgAttributesComputationCompleted) {\n this._rotate90SourceProperties(srcImage, dstImage, n);\n this._markAsDirty();\n }\n else {\n srcImage.onSVGAttributesComputedObservable.addOnce(() => {\n this._rotate90SourceProperties(srcImage, dstImage, n);\n this._markAsDirty();\n });\n }\n }\n _rotate90SourceProperties(srcImage, dstImage, n) {\n let srcLeft = srcImage.sourceLeft, srcTop = srcImage.sourceTop, srcWidth = srcImage.domImage.width, srcHeight = srcImage.domImage.height;\n let dstLeft = srcLeft, dstTop = srcTop, dstWidth = srcImage.sourceWidth, dstHeight = srcImage.sourceHeight;\n if (n != 0) {\n const mult = n < 0 ? -1 : 1;\n n = n % 4;\n for (let i = 0; i < Math.abs(n); ++i) {\n dstLeft = -(srcTop - srcHeight / 2) * mult + srcHeight / 2;\n dstTop = (srcLeft - srcWidth / 2) * mult + srcWidth / 2;\n [dstWidth, dstHeight] = [dstHeight, dstWidth];\n if (n < 0) {\n dstTop -= dstHeight;\n }\n else {\n dstLeft -= dstWidth;\n }\n srcLeft = dstLeft;\n srcTop = dstTop;\n [srcWidth, srcHeight] = [srcHeight, srcWidth];\n }\n }\n dstImage.sourceLeft = dstLeft;\n dstImage.sourceTop = dstTop;\n dstImage.sourceWidth = dstWidth;\n dstImage.sourceHeight = dstHeight;\n }\n _extractNinePatchSliceDataFromImage() {\n var _a, _b;\n const width = this._domImage.width;\n const height = this._domImage.height;\n if (!this._workingCanvas) {\n const engine = ((_b = (_a = this._host) === null || _a === void 0 ? void 0 : _a.getScene()) === null || _b === void 0 ? void 0 : _b.getEngine()) || EngineStore.LastCreatedEngine;\n if (!engine) {\n throw new Error(\"Invalid engine. Unable to create a canvas.\");\n }\n this._workingCanvas = engine.createCanvas(width, height);\n }\n const canvas = this._workingCanvas;\n const context = canvas.getContext(\"2d\");\n context.drawImage(this._domImage, 0, 0, width, height);\n const imageData = context.getImageData(0, 0, width, height);\n // Left and right\n this._sliceLeft = -1;\n this._sliceRight = -1;\n for (let x = 0; x < width; x++) {\n const alpha = imageData.data[x * 4 + 3];\n if (alpha > 127 && this._sliceLeft === -1) {\n this._sliceLeft = x;\n continue;\n }\n if (alpha < 127 && this._sliceLeft > -1) {\n this._sliceRight = x;\n break;\n }\n }\n // top and bottom\n this._sliceTop = -1;\n this._sliceBottom = -1;\n for (let y = 0; y < height; y++) {\n const alpha = imageData.data[y * width * 4 + 3];\n if (alpha > 127 && this._sliceTop === -1) {\n this._sliceTop = y;\n continue;\n }\n if (alpha < 127 && this._sliceTop > -1) {\n this._sliceBottom = y;\n break;\n }\n }\n }\n /**\n * Gets or sets the internal DOM image used to render the control\n */\n set domImage(value) {\n this._domImage = value;\n this._loaded = false;\n this._imageDataCache.data = null;\n if (this._domImage.width) {\n this._onImageLoaded();\n }\n else {\n this._domImage.onload = () => {\n this._onImageLoaded();\n };\n }\n }\n get domImage() {\n return this._domImage;\n }\n _onImageLoaded() {\n this._imageDataCache.data = null;\n this._imageWidth = this._domImage.width;\n this._imageHeight = this._domImage.height;\n this._loaded = true;\n if (this._populateNinePatchSlicesFromImage) {\n this._extractNinePatchSliceDataFromImage();\n }\n if (this._autoScale) {\n this.synchronizeSizeWithContent();\n }\n this.onImageLoadedObservable.notifyObservers(this);\n this._markAsDirty();\n }\n /**\n * Gets the image source url\n */\n get source() {\n return this._source;\n }\n /**\n * Resets the internal Image Element cache. Can reduce memory usage.\n */\n static ResetImageCache() {\n Image.SourceImgCache.clear();\n }\n _removeCacheUsage(source) {\n const value = source && Image.SourceImgCache.get(source);\n if (value) {\n value.timesUsed -= 1;\n // Since the image isn't being used anymore, we can clean it from the cache\n if (value.timesUsed === 0) {\n Image.SourceImgCache.delete(source);\n }\n }\n }\n /**\n * Gets or sets image source url\n */\n set source(value) {\n var _a, _b;\n if (this._source === value) {\n return;\n }\n this._removeCacheUsage(this._source);\n this._loaded = false;\n this._source = value;\n this._imageDataCache.data = null;\n if (value) {\n value = this._svgCheck(value);\n }\n // Should abstract platform instead of using LastCreatedEngine\n const engine = ((_b = (_a = this._host) === null || _a === void 0 ? void 0 : _a.getScene()) === null || _b === void 0 ? void 0 : _b.getEngine()) || EngineStore.LastCreatedEngine;\n if (!engine) {\n throw new Error(\"Invalid engine. Unable to create a canvas.\");\n }\n if (value && Image.SourceImgCache.has(value)) {\n const cachedData = Image.SourceImgCache.get(value);\n this._domImage = cachedData.img;\n cachedData.timesUsed += 1;\n if (cachedData.loaded) {\n this._onImageLoaded();\n }\n else {\n cachedData.waitingForLoadCallback.push(this._onImageLoaded.bind(this));\n }\n return;\n }\n this._domImage = engine.createCanvasImage();\n if (value) {\n Image.SourceImgCache.set(value, { img: this._domImage, timesUsed: 1, loaded: false, waitingForLoadCallback: [this._onImageLoaded.bind(this)] });\n }\n this._domImage.onload = () => {\n if (value) {\n const cachedData = Image.SourceImgCache.get(value);\n if (cachedData) {\n cachedData.loaded = true;\n for (const waitingCallback of cachedData.waitingForLoadCallback) {\n waitingCallback();\n }\n cachedData.waitingForLoadCallback.length = 0;\n return;\n }\n }\n this._onImageLoaded();\n };\n if (value) {\n Tools.SetCorsBehavior(value, this._domImage);\n Tools.SetReferrerPolicyBehavior(this.referrerPolicy, this._domImage);\n this._domImage.src = value;\n }\n }\n /**\n * Checks for svg document with icon id present\n * @param value\n */\n _svgCheck(value) {\n if (window.SVGSVGElement && value.search(/.svg#/gi) !== -1 && value.indexOf(\"#\") === value.lastIndexOf(\"#\")) {\n this._isSVG = true;\n const svgsrc = value.split(\"#\")[0];\n const elemid = value.split(\"#\")[1];\n // check if object alr exist in document\n const svgExist = document.body.querySelector('object[data=\"' + svgsrc + '\"]');\n if (svgExist) {\n const svgDoc = svgExist.contentDocument;\n // get viewbox width and height, get svg document width and height in px\n if (svgDoc && svgDoc.documentElement) {\n const vb = svgDoc.documentElement.getAttribute(\"viewBox\");\n const docwidth = Number(svgDoc.documentElement.getAttribute(\"width\"));\n const docheight = Number(svgDoc.documentElement.getAttribute(\"height\"));\n const elem = svgDoc.getElementById(elemid);\n if (elem && vb && docwidth && docheight) {\n this._getSVGAttribs(svgExist, elemid);\n return value;\n }\n }\n // wait for object to load\n svgExist.addEventListener(\"load\", () => {\n this._getSVGAttribs(svgExist, elemid);\n });\n }\n else {\n // create document object\n const svgImage = document.createElement(\"object\");\n svgImage.data = svgsrc;\n svgImage.type = \"image/svg+xml\";\n svgImage.width = \"0%\";\n svgImage.height = \"0%\";\n document.body.appendChild(svgImage);\n // when the object has loaded, get the element attribs\n svgImage.onload = () => {\n const svgobj = document.body.querySelector('object[data=\"' + svgsrc + '\"]');\n if (svgobj) {\n this._getSVGAttribs(svgobj, elemid);\n }\n };\n }\n return svgsrc;\n }\n else {\n return value;\n }\n }\n /**\n * Sets sourceLeft, sourceTop, sourceWidth, sourceHeight automatically\n * given external svg file and icon id\n * @param svgsrc\n * @param elemid\n */\n _getSVGAttribs(svgsrc, elemid) {\n const svgDoc = svgsrc.contentDocument;\n // get viewbox width and height, get svg document width and height in px\n if (svgDoc && svgDoc.documentElement) {\n const vb = svgDoc.documentElement.getAttribute(\"viewBox\");\n const docwidth = Number(svgDoc.documentElement.getAttribute(\"width\"));\n const docheight = Number(svgDoc.documentElement.getAttribute(\"height\"));\n // get element bbox and matrix transform\n const elem = svgDoc.getElementById(elemid);\n if (vb && docwidth && docheight && elem) {\n const vb_width = Number(vb.split(\" \")[2]);\n const vb_height = Number(vb.split(\" \")[3]);\n const elem_bbox = elem.getBBox();\n let elem_matrix_a = 1;\n let elem_matrix_d = 1;\n let elem_matrix_e = 0;\n let elem_matrix_f = 0;\n const mainMatrix = elem.transform.baseVal.consolidate().matrix;\n if (elem.transform && elem.transform.baseVal.consolidate()) {\n elem_matrix_a = mainMatrix.a;\n elem_matrix_d = mainMatrix.d;\n elem_matrix_e = mainMatrix.e;\n elem_matrix_f = mainMatrix.f;\n }\n // compute source coordinates and dimensions\n this.sourceLeft = ((elem_matrix_a * elem_bbox.x + elem_matrix_e) * docwidth) / vb_width;\n this.sourceTop = ((elem_matrix_d * elem_bbox.y + elem_matrix_f) * docheight) / vb_height;\n this.sourceWidth = elem_bbox.width * elem_matrix_a * (docwidth / vb_width);\n this.sourceHeight = elem_bbox.height * elem_matrix_d * (docheight / vb_height);\n this._svgAttributesComputationCompleted = true;\n this.onSVGAttributesComputedObservable.notifyObservers(this);\n }\n }\n }\n /**\n * Gets or sets the cell width to use when animation sheet is enabled\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#image\n */\n get cellWidth() {\n return this._cellWidth;\n }\n set cellWidth(value) {\n if (this._cellWidth === value) {\n return;\n }\n this._cellWidth = value;\n this._markAsDirty();\n }\n /**\n * Gets or sets the cell height to use when animation sheet is enabled\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#image\n */\n get cellHeight() {\n return this._cellHeight;\n }\n set cellHeight(value) {\n if (this._cellHeight === value) {\n return;\n }\n this._cellHeight = value;\n this._markAsDirty();\n }\n /**\n * Gets or sets the cell id to use (this will turn on the animation sheet mode)\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#image\n */\n get cellId() {\n return this._cellId;\n }\n set cellId(value) {\n if (this._cellId === value) {\n return;\n }\n this._cellId = value;\n this._markAsDirty();\n }\n /**\n * Creates a new Image\n * @param name defines the control name\n * @param url defines the image url\n */\n constructor(name, url = null) {\n super(name);\n this.name = name;\n this._workingCanvas = null;\n this._loaded = false;\n this._stretch = Image.STRETCH_FILL;\n this._autoScale = false;\n this._sourceLeft = 0;\n this._sourceTop = 0;\n this._sourceWidth = 0;\n this._sourceHeight = 0;\n this._svgAttributesComputationCompleted = false;\n this._isSVG = false;\n this._cellWidth = 0;\n this._cellHeight = 0;\n this._cellId = -1;\n this._populateNinePatchSlicesFromImage = false;\n this._imageDataCache = { data: null, key: \"\" };\n /**\n * Observable notified when the content is loaded\n */\n this.onImageLoadedObservable = new Observable();\n /**\n * Observable notified when _sourceLeft, _sourceTop, _sourceWidth and _sourceHeight are computed\n */\n this.onSVGAttributesComputedObservable = new Observable();\n this.source = url;\n }\n /**\n * Tests if a given coordinates belong to the current control\n * @param x defines x coordinate to test\n * @param y defines y coordinate to test\n * @returns true if the coordinates are inside the control\n */\n contains(x, y) {\n if (!super.contains(x, y)) {\n return false;\n }\n if (!this._detectPointerOnOpaqueOnly || !this._workingCanvas) {\n return true;\n }\n const width = this._currentMeasure.width | 0;\n const height = this._currentMeasure.height | 0;\n const key = width + \"_\" + height;\n let imageData = this._imageDataCache.data;\n if (!imageData || this._imageDataCache.key !== key) {\n const canvas = this._workingCanvas;\n const context = canvas.getContext(\"2d\");\n this._imageDataCache.data = imageData = context.getImageData(0, 0, width, height).data;\n this._imageDataCache.key = key;\n }\n x = (x - this._currentMeasure.left) | 0;\n y = (y - this._currentMeasure.top) | 0;\n const pickedPixel = imageData[(x + y * width) * 4 + 3];\n return pickedPixel > 0;\n }\n _getTypeName() {\n return \"Image\";\n }\n /** Force the control to synchronize with its content */\n synchronizeSizeWithContent() {\n if (!this._loaded) {\n return;\n }\n this.width = this._domImage.width + \"px\";\n this.height = this._domImage.height + \"px\";\n }\n _processMeasures(parentMeasure, context) {\n if (this._loaded) {\n switch (this._stretch) {\n case Image.STRETCH_NONE:\n break;\n case Image.STRETCH_FILL:\n break;\n case Image.STRETCH_UNIFORM:\n break;\n case Image.STRETCH_NINE_PATCH:\n break;\n case Image.STRETCH_EXTEND:\n if (this._autoScale) {\n this.synchronizeSizeWithContent();\n }\n if (this.parent && this.parent.parent) {\n // Will update root size if root is not the top root\n this.parent.adaptWidthToChildren = true;\n this.parent.adaptHeightToChildren = true;\n }\n break;\n }\n }\n super._processMeasures(parentMeasure, context);\n }\n _prepareWorkingCanvasForOpaqueDetection() {\n var _a, _b;\n if (!this._detectPointerOnOpaqueOnly) {\n return;\n }\n const width = this._currentMeasure.width;\n const height = this._currentMeasure.height;\n if (!this._workingCanvas) {\n const engine = ((_b = (_a = this._host) === null || _a === void 0 ? void 0 : _a.getScene()) === null || _b === void 0 ? void 0 : _b.getEngine()) || EngineStore.LastCreatedEngine;\n if (!engine) {\n throw new Error(\"Invalid engine. Unable to create a canvas.\");\n }\n this._workingCanvas = engine.createCanvas(width, height);\n }\n const canvas = this._workingCanvas;\n const context = canvas.getContext(\"2d\");\n context.clearRect(0, 0, width, height);\n }\n _drawImage(context, sx, sy, sw, sh, tx, ty, tw, th) {\n context.drawImage(this._domImage, sx, sy, sw, sh, tx, ty, tw, th);\n if (!this._detectPointerOnOpaqueOnly) {\n return;\n }\n const transform = context.getTransform();\n const canvas = this._workingCanvas;\n const workingCanvasContext = canvas.getContext(\"2d\");\n workingCanvasContext.save();\n const ttx = tx - this._currentMeasure.left;\n const tty = ty - this._currentMeasure.top;\n workingCanvasContext.setTransform(transform.a, transform.b, transform.c, transform.d, (ttx + tw) / 2, (tty + th) / 2);\n workingCanvasContext.translate(-(ttx + tw) / 2, -(tty + th) / 2);\n workingCanvasContext.drawImage(this._domImage, sx, sy, sw, sh, ttx, tty, tw, th);\n workingCanvasContext.restore();\n }\n _draw(context) {\n context.save();\n if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {\n context.shadowColor = this.shadowColor;\n context.shadowBlur = this.shadowBlur;\n context.shadowOffsetX = this.shadowOffsetX;\n context.shadowOffsetY = this.shadowOffsetY;\n }\n let x, y, width, height;\n if (this.cellId == -1) {\n x = this._sourceLeft;\n y = this._sourceTop;\n width = this._sourceWidth ? this._sourceWidth : this._imageWidth;\n height = this._sourceHeight ? this._sourceHeight : this._imageHeight;\n }\n else {\n const rowCount = this._domImage.naturalWidth / this.cellWidth;\n const column = (this.cellId / rowCount) >> 0;\n const row = this.cellId % rowCount;\n x = this.cellWidth * row;\n y = this.cellHeight * column;\n width = this.cellWidth;\n height = this.cellHeight;\n }\n this._prepareWorkingCanvasForOpaqueDetection();\n this._applyStates(context);\n if (this._loaded) {\n switch (this._stretch) {\n case Image.STRETCH_NONE:\n this._drawImage(context, x, y, width, height, this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);\n break;\n case Image.STRETCH_FILL:\n this._drawImage(context, x, y, width, height, this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);\n break;\n case Image.STRETCH_UNIFORM: {\n const hRatio = this._currentMeasure.width / width;\n const vRatio = this._currentMeasure.height / height;\n const ratio = Math.min(hRatio, vRatio);\n const centerX = (this._currentMeasure.width - width * ratio) / 2;\n const centerY = (this._currentMeasure.height - height * ratio) / 2;\n this._drawImage(context, x, y, width, height, this._currentMeasure.left + centerX, this._currentMeasure.top + centerY, width * ratio, height * ratio);\n break;\n }\n case Image.STRETCH_EXTEND:\n this._drawImage(context, x, y, width, height, this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);\n break;\n case Image.STRETCH_NINE_PATCH:\n this._renderNinePatch(context, x, y, width, height);\n break;\n }\n }\n context.restore();\n }\n _renderNinePatch(context, sx, sy, sw, sh) {\n const leftWidth = this._sliceLeft;\n const topHeight = this._sliceTop;\n const bottomHeight = sh - this._sliceBottom;\n const rightWidth = sw - this._sliceRight;\n const centerWidth = this._sliceRight - this._sliceLeft;\n const centerHeight = this._sliceBottom - this._sliceTop;\n const targetCenterWidth = this._currentMeasure.width - rightWidth - leftWidth + 2;\n const targetCenterHeight = this._currentMeasure.height - bottomHeight - topHeight + 2;\n const centerLeftOffset = this._currentMeasure.left + leftWidth - 1;\n const centerTopOffset = this._currentMeasure.top + topHeight - 1;\n const rightOffset = this._currentMeasure.left + this._currentMeasure.width - rightWidth;\n const bottomOffset = this._currentMeasure.top + this._currentMeasure.height - bottomHeight;\n //Top Left\n this._drawImage(context, sx, sy, leftWidth, topHeight, this._currentMeasure.left, this._currentMeasure.top, leftWidth, topHeight);\n //Top\n this._drawImage(context, sx + this._sliceLeft, sy, centerWidth, topHeight, centerLeftOffset + 1, this._currentMeasure.top, targetCenterWidth - 2, topHeight);\n //Top Right\n this._drawImage(context, sx + this._sliceRight, sy, rightWidth, topHeight, rightOffset, this._currentMeasure.top, rightWidth, topHeight);\n //Left\n this._drawImage(context, sx, sy + this._sliceTop, leftWidth, centerHeight, this._currentMeasure.left, centerTopOffset + 1, leftWidth, targetCenterHeight - 2);\n // Center\n this._drawImage(context, sx + this._sliceLeft, sy + this._sliceTop, centerWidth, centerHeight, centerLeftOffset, centerTopOffset, targetCenterWidth, targetCenterHeight);\n //Right\n this._drawImage(context, sx + this._sliceRight, sy + this._sliceTop, rightWidth, centerHeight, rightOffset, centerTopOffset + 1, rightWidth, targetCenterHeight - 2);\n //Bottom Left\n this._drawImage(context, sx, sy + this._sliceBottom, leftWidth, bottomHeight, this._currentMeasure.left, bottomOffset, leftWidth, bottomHeight);\n //Bottom\n this._drawImage(context, sx + this.sliceLeft, sy + this._sliceBottom, centerWidth, bottomHeight, centerLeftOffset + 1, bottomOffset, targetCenterWidth - 2, bottomHeight);\n //Bottom Right\n this._drawImage(context, sx + this._sliceRight, sy + this._sliceBottom, rightWidth, bottomHeight, rightOffset, bottomOffset, rightWidth, bottomHeight);\n }\n dispose() {\n super.dispose();\n this.onImageLoadedObservable.clear();\n this.onSVGAttributesComputedObservable.clear();\n this._removeCacheUsage(this._source);\n }\n}\n/**\n * Cache of images to avoid loading the same image multiple times\n */\nImage.SourceImgCache = new Map();\n// Static\n/** STRETCH_NONE */\nImage.STRETCH_NONE = 0;\n/** STRETCH_FILL */\nImage.STRETCH_FILL = 1;\n/** STRETCH_UNIFORM */\nImage.STRETCH_UNIFORM = 2;\n/** STRETCH_EXTEND */\nImage.STRETCH_EXTEND = 3;\n/** NINE_PATCH */\nImage.STRETCH_NINE_PATCH = 4;\n__decorate([\n serialize()\n], Image.prototype, \"detectPointerOnOpaqueOnly\", null);\n__decorate([\n serialize()\n], Image.prototype, \"sliceLeft\", null);\n__decorate([\n serialize()\n], Image.prototype, \"sliceRight\", null);\n__decorate([\n serialize()\n], Image.prototype, \"sliceTop\", null);\n__decorate([\n serialize()\n], Image.prototype, \"sliceBottom\", null);\n__decorate([\n serialize()\n], Image.prototype, \"sourceLeft\", null);\n__decorate([\n serialize()\n], Image.prototype, \"sourceTop\", null);\n__decorate([\n serialize()\n], Image.prototype, \"sourceWidth\", null);\n__decorate([\n serialize()\n], Image.prototype, \"sourceHeight\", null);\n__decorate([\n serialize()\n], Image.prototype, \"populateNinePatchSlicesFromImage\", null);\n__decorate([\n serialize()\n], Image.prototype, \"autoScale\", null);\n__decorate([\n serialize()\n], Image.prototype, \"stretch\", null);\n__decorate([\n serialize()\n], Image.prototype, \"source\", null);\n__decorate([\n serialize()\n], Image.prototype, \"cellWidth\", null);\n__decorate([\n serialize()\n], Image.prototype, \"cellHeight\", null);\n__decorate([\n serialize()\n], Image.prototype, \"cellId\", null);\nRegisterClass(\"BABYLON.GUI.Image\", Image);\n//# sourceMappingURL=image.js.map","import { __decorate } from \"@babylonjs/core/tslib.es6.js\";\nimport { Container } from \"./container.js\";\nimport { RegisterClass } from \"@babylonjs/core/Misc/typeStore.js\";\nimport { serialize } from \"@babylonjs/core/Misc/decorators.js\";\n/** Class used to create rectangle container */\nexport class Rectangle extends Container {\n /** Gets or sets border thickness */\n get thickness() {\n return this._thickness;\n }\n set thickness(value) {\n if (this._thickness === value) {\n return;\n }\n this._thickness = value;\n this._markAsDirty();\n }\n /** Gets or sets the corner radius of all angles */\n get cornerRadius() {\n return this._cornerRadius[0];\n }\n set cornerRadius(value) {\n if (value < 0) {\n value = 0;\n }\n if (this._cornerRadius[0] === value && this._cornerRadius[1] === value && this._cornerRadius[2] === value && this._cornerRadius[3] === value) {\n return;\n }\n this._cornerRadius[0] = this._cornerRadius[1] = this._cornerRadius[2] = this._cornerRadius[3] = value;\n this._markAsDirty();\n }\n /** Gets or sets the corner radius top left angle */\n get cornerRadiusX() {\n return this._cornerRadius[0];\n }\n set cornerRadiusX(value) {\n if (this._cornerRadius[0] === value) {\n return;\n }\n this._cornerRadius[0] = value;\n }\n /** Gets or sets the corner radius top right angle */\n get cornerRadiusY() {\n return this._cornerRadius[1];\n }\n set cornerRadiusY(value) {\n if (this._cornerRadius[1] === value) {\n return;\n }\n this._cornerRadius[1] = value;\n }\n /** Gets or sets the corner radius bottom left angle */\n get cornerRadiusZ() {\n return this._cornerRadius[2];\n }\n set cornerRadiusZ(value) {\n if (this._cornerRadius[2] === value) {\n return;\n }\n this._cornerRadius[2] = value;\n }\n /** Gets or sets the corner radius bottom right angle */\n get cornerRadiusW() {\n return this._cornerRadius[3];\n }\n set cornerRadiusW(value) {\n if (this._cornerRadius[3] === value) {\n return;\n }\n this._cornerRadius[3] = value;\n }\n /**\n * Creates a new Rectangle\n * @param name defines the control name\n */\n constructor(name) {\n super(name);\n this.name = name;\n this._thickness = 1;\n this._cornerRadius = [0, 0, 0, 0];\n this._cachedRadius = [0, 0, 0, 0];\n }\n _getTypeName() {\n return \"Rectangle\";\n }\n /** @internal */\n _computeAdditionalOffsetX() {\n let additionalWidth = 0;\n if (this._cornerRadius[0] !== 0 || this._cornerRadius[1] !== 0 || this._cornerRadius[2] !== 0 || this._cornerRadius[3] !== 0) {\n // Take in account the aliasing\n additionalWidth += 1;\n }\n if (this.thickness) {\n additionalWidth += this.thickness / 2;\n }\n return additionalWidth;\n }\n /** @internal */\n _computeAdditionalOffsetY() {\n let additionalHeight = 0;\n if (this._cornerRadius[0] !== 0 || this._cornerRadius[1] !== 0 || this._cornerRadius[2] !== 0 || this._cornerRadius[3] !== 0) {\n // Take in account the aliasing\n additionalHeight += 1;\n }\n if (this.thickness) {\n additionalHeight += this.thickness / 2;\n }\n return additionalHeight;\n }\n _getRectangleFill(context) {\n return this._getBackgroundColor(context);\n }\n _localDraw(context) {\n context.save();\n if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {\n context.shadowColor = this.shadowColor;\n context.shadowBlur = this.shadowBlur;\n context.shadowOffsetX = this.shadowOffsetX;\n context.shadowOffsetY = this.shadowOffsetY;\n }\n if (this._background || this._backgroundGradient) {\n context.fillStyle = this._getRectangleFill(context);\n if (this._cornerRadius[0] !== 0 || this._cornerRadius[1] !== 0 || this._cornerRadius[2] !== 0 || this._cornerRadius[3] !== 0) {\n this._drawRoundedRect(context, this._thickness / 2);\n context.fill();\n }\n else {\n context.fillRect(this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);\n }\n }\n if (this._thickness) {\n if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {\n context.shadowBlur = 0;\n context.shadowOffsetX = 0;\n context.shadowOffsetY = 0;\n }\n if (this.color || this.gradient) {\n context.strokeStyle = this.gradient ? this.gradient.getCanvasGradient(context) : this.color;\n }\n context.lineWidth = this._thickness;\n if (this._cornerRadius[0] !== 0 || this._cornerRadius[1] !== 0 || this._cornerRadius[2] !== 0 || this._cornerRadius[3] !== 0) {\n this._drawRoundedRect(context, this._thickness / 2);\n context.stroke();\n }\n else {\n context.strokeRect(this._currentMeasure.left + this._thickness / 2, this._currentMeasure.top + this._thickness / 2, this._currentMeasure.width - this._thickness, this._currentMeasure.height - this._thickness);\n }\n }\n context.restore();\n }\n _additionalProcessing(parentMeasure, context) {\n super._additionalProcessing(parentMeasure, context);\n this._measureForChildren.width -= 2 * this._thickness;\n this._measureForChildren.height -= 2 * this._thickness;\n this._measureForChildren.left += this._thickness;\n this._measureForChildren.top += this._thickness;\n }\n _drawRoundedRect(context, offset = 0) {\n const x = this._currentMeasure.left + offset;\n const y = this._currentMeasure.top + offset;\n const width = this._currentMeasure.width - offset * 2;\n const height = this._currentMeasure.height - offset * 2;\n for (let index = 0; index < this._cornerRadius.length; index++) {\n this._cachedRadius[index] = Math.abs(Math.min(height / 2, Math.min(width / 2, this._cornerRadius[index])));\n }\n context.beginPath();\n context.moveTo(x + this._cachedRadius[0], y);\n context.lineTo(x + width - this._cachedRadius[1], y);\n context.arc(x + width - this._cachedRadius[1], y + this._cachedRadius[1], this._cachedRadius[1], (3 * Math.PI) / 2, Math.PI * 2);\n context.lineTo(x + width, y + height - this._cachedRadius[2]);\n context.arc(x + width - this._cachedRadius[2], y + height - this._cachedRadius[2], this._cachedRadius[2], 0, Math.PI / 2);\n context.lineTo(x + this._cachedRadius[3], y + height);\n context.arc(x + this._cachedRadius[3], y + height - this._cachedRadius[3], this._cachedRadius[3], Math.PI / 2, Math.PI);\n context.lineTo(x, y + this._cachedRadius[0]);\n context.arc(x + this._cachedRadius[0], y + this._cachedRadius[0], this._cachedRadius[0], Math.PI, (3 * Math.PI) / 2);\n context.closePath();\n }\n _clipForChildren(context) {\n if (this._cornerRadius[0] !== 0 || this._cornerRadius[1] !== 0 || this._cornerRadius[2] !== 0 || this._cornerRadius[3] !== 0) {\n this._drawRoundedRect(context, this._thickness);\n context.clip();\n }\n }\n}\n__decorate([\n serialize()\n], Rectangle.prototype, \"thickness\", null);\n__decorate([\n serialize()\n], Rectangle.prototype, \"cornerRadius\", null);\n__decorate([\n serialize()\n], Rectangle.prototype, \"cornerRadiusX\", null);\n__decorate([\n serialize()\n], Rectangle.prototype, \"cornerRadiusY\", null);\n__decorate([\n serialize()\n], Rectangle.prototype, \"cornerRadiusZ\", null);\n__decorate([\n serialize()\n], Rectangle.prototype, \"cornerRadiusW\", null);\nRegisterClass(\"BABYLON.GUI.Rectangle\", Rectangle);\n//# sourceMappingURL=rectangle.js.map","import { __decorate } from \"@babylonjs/core/tslib.es6.js\";\nimport { Container } from \"./container.js\";\nimport { Control } from \"./control.js\";\nimport { RegisterClass } from \"@babylonjs/core/Misc/typeStore.js\";\nimport { serialize } from \"@babylonjs/core/Misc/decorators.js\";\nimport { Logger } from \"@babylonjs/core/Misc/logger.js\";\n/**\n * Class used to create a 2D stack panel container\n */\nexport class StackPanel extends Container {\n /** Gets or sets a boolean indicating if the stack panel is vertical or horizontal*/\n get isVertical() {\n return this._isVertical;\n }\n set isVertical(value) {\n if (this._isVertical === value) {\n return;\n }\n this._isVertical = value;\n this._markAsDirty();\n }\n /**\n * Gets or sets the spacing (in pixels) between each child.\n */\n get spacing() {\n return this._spacing;\n }\n set spacing(value) {\n if (this._spacing === value) {\n return;\n }\n this._spacing = value;\n this._markAsDirty();\n }\n /**\n * Gets or sets panel width.\n * This value should not be set when in horizontal mode as it will be computed automatically\n */\n set width(value) {\n if (!this._doNotTrackManualChanges) {\n this._manualWidth = true;\n }\n if (this._width.toString(this._host) === value) {\n return;\n }\n if (this._width.fromString(value)) {\n this._markAsDirty();\n }\n }\n get width() {\n return this._width.toString(this._host);\n }\n /**\n * Gets or sets panel height.\n * This value should not be set when in vertical mode as it will be computed automatically\n */\n set height(value) {\n if (!this._doNotTrackManualChanges) {\n this._manualHeight = true;\n }\n if (this._height.toString(this._host) === value) {\n return;\n }\n if (this._height.fromString(value)) {\n this._markAsDirty();\n }\n }\n get height() {\n return this._height.toString(this._host);\n }\n /**\n * Creates a new StackPanel\n * @param name defines control name\n */\n constructor(name) {\n super(name);\n this.name = name;\n this._isVertical = true;\n this._manualWidth = false;\n this._manualHeight = false;\n this._doNotTrackManualChanges = false;\n this._spacing = 0;\n /**\n * Gets or sets a boolean indicating that layout warnings should be ignored\n */\n this.ignoreLayoutWarnings = false;\n }\n _getTypeName() {\n return \"StackPanel\";\n }\n /**\n * @internal\n */\n _preMeasure(parentMeasure, context) {\n for (const child of this._children) {\n if (this._isVertical) {\n child.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP;\n }\n else {\n child.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;\n }\n }\n super._preMeasure(parentMeasure, context);\n }\n _additionalProcessing(parentMeasure, context) {\n super._additionalProcessing(parentMeasure, context);\n this._measureForChildren.copyFrom(parentMeasure);\n this._measureForChildren.left = this._currentMeasure.left;\n this._measureForChildren.top = this._currentMeasure.top;\n if (!this.isVertical || this._manualWidth) {\n this._measureForChildren.width = this._currentMeasure.width;\n }\n if (this.isVertical || this._manualHeight) {\n this._measureForChildren.height = this._currentMeasure.height;\n }\n }\n _postMeasure() {\n let stackWidth = 0;\n let stackHeight = 0;\n const childrenCount = this._children.length;\n for (let index = 0; index < childrenCount; index++) {\n const child = this._children[index];\n if (!child.isVisible || child.notRenderable) {\n continue;\n }\n if (this._isVertical) {\n if (child.top !== stackHeight + \"px\") {\n child.top = stackHeight + \"px\";\n this._rebuildLayout = true;\n child._top.ignoreAdaptiveScaling = true;\n }\n if (!this.ignoreLayoutWarnings && !child.isDimensionFullyDefined(\"height\")) {\n Logger.Warn(`Control (Name:${child.name}, UniqueId:${child.uniqueId}) is using height in percentage mode inside a vertical StackPanel`, 1);\n }\n else {\n stackHeight += child._currentMeasure.height + child._paddingTopInPixels + child._paddingBottomInPixels + (index < childrenCount - 1 ? this._spacing : 0);\n }\n }\n else {\n if (child.left !== stackWidth + \"px\") {\n child.left = stackWidth + \"px\";\n this._rebuildLayout = true;\n child._left.ignoreAdaptiveScaling = true;\n }\n if (!this.ignoreLayoutWarnings && !child.isDimensionFullyDefined(\"width\")) {\n Logger.Warn(`Control (Name:${child.name}, UniqueId:${child.uniqueId}) is using width in percentage mode inside a horizontal StackPanel`, 1);\n }\n else {\n stackWidth += child._currentMeasure.width + child._paddingLeftInPixels + child._paddingRightInPixels + (index < childrenCount - 1 ? this._spacing : 0);\n }\n }\n }\n stackWidth += this._paddingLeftInPixels + this._paddingRightInPixels;\n stackHeight += this._paddingTopInPixels + this._paddingBottomInPixels;\n this._doNotTrackManualChanges = true;\n // Let stack panel width or height default to stackHeight and stackWidth if dimensions are not specified.\n // User can now define their own height and width for stack panel.\n let panelWidthChanged = false;\n let panelHeightChanged = false;\n if ((!this._manualHeight || this.adaptHeightToChildren) && this._isVertical) {\n // do not specify height if strictly defined by user\n const previousHeight = this.height;\n this.height = stackHeight + \"px\";\n panelHeightChanged = previousHeight !== this.height || !this._height.ignoreAdaptiveScaling;\n }\n if ((!this._manualWidth || this.adaptWidthToChildren) && !this._isVertical) {\n // do not specify width if strictly defined by user\n const previousWidth = this.width;\n this.width = stackWidth + \"px\";\n panelWidthChanged = previousWidth !== this.width || !this._width.ignoreAdaptiveScaling;\n }\n if (panelHeightChanged) {\n this._height.ignoreAdaptiveScaling = true;\n }\n if (panelWidthChanged) {\n this._width.ignoreAdaptiveScaling = true;\n }\n this._doNotTrackManualChanges = false;\n if (panelWidthChanged || panelHeightChanged) {\n this._rebuildLayout = true;\n }\n super._postMeasure();\n }\n _getManualDim(dim) {\n if (dim === \"width\") {\n return this._manualWidth;\n }\n else {\n return this._manualHeight;\n }\n }\n isDimensionFullyDefined(dim) {\n if (dim === \"height\" ? this.isVertical : !this.isVertical && !this._getManualDim(dim)) {\n for (const child of this._children) {\n if (!child.isDimensionFullyDefined(dim)) {\n return false;\n }\n }\n return true;\n }\n return this.getDimension(dim).isPixel || this._getAdaptDimTo(dim);\n }\n /**\n * Serializes the current control\n * @param serializationObject defined the JSON serialized object\n */\n serialize(serializationObject) {\n super.serialize(serializationObject);\n serializationObject.manualWidth = this._manualWidth;\n serializationObject.manualHeight = this._manualHeight;\n }\n /**\n * @internal\n */\n _parseFromContent(serializedObject, host) {\n this._manualWidth = serializedObject.manualWidth;\n this._manualHeight = serializedObject.manualHeight;\n super._parseFromContent(serializedObject, host);\n }\n}\n__decorate([\n serialize()\n], StackPanel.prototype, \"ignoreLayoutWarnings\", void 0);\n__decorate([\n serialize()\n], StackPanel.prototype, \"isVertical\", null);\n__decorate([\n serialize()\n], StackPanel.prototype, \"spacing\", null);\n__decorate([\n serialize()\n], StackPanel.prototype, \"width\", null);\n__decorate([\n serialize()\n], StackPanel.prototype, \"height\", null);\nRegisterClass(\"BABYLON.GUI.StackPanel\", StackPanel);\n//# sourceMappingURL=stackPanel.js.map","import { __decorate } from \"@babylonjs/core/tslib.es6.js\";\nimport { Observable } from \"@babylonjs/core/Misc/observable.js\";\nimport { ValueAndUnit } from \"../valueAndUnit.js\";\nimport { Control } from \"./control.js\";\nimport { RegisterClass } from \"@babylonjs/core/Misc/typeStore.js\";\nimport { serialize } from \"@babylonjs/core/Misc/decorators.js\";\nimport { EngineStore } from \"@babylonjs/core/Engines/engineStore.js\";\n/**\n * Enum that determines the text-wrapping mode to use.\n */\nexport var TextWrapping;\n(function (TextWrapping) {\n /**\n * Clip the text when it's larger than Control.width; this is the default mode.\n */\n TextWrapping[TextWrapping[\"Clip\"] = 0] = \"Clip\";\n /**\n * Wrap the text word-wise, i.e. try to add line-breaks at word boundary to fit within Control.width.\n */\n TextWrapping[TextWrapping[\"WordWrap\"] = 1] = \"WordWrap\";\n /**\n * Ellipsize the text, i.e. shrink with trailing … when text is larger than Control.width.\n */\n TextWrapping[TextWrapping[\"Ellipsis\"] = 2] = \"Ellipsis\";\n /**\n * 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 … .\n */\n TextWrapping[TextWrapping[\"WordWrapEllipsis\"] = 3] = \"WordWrapEllipsis\";\n})(TextWrapping || (TextWrapping = {}));\n/**\n * Class used to create text block control\n */\nexport class TextBlock extends Control {\n /**\n * Return the line list (you may need to use the onLinesReadyObservable to make sure the list is ready)\n */\n get lines() {\n return this._lines;\n }\n /**\n * Gets or sets a boolean indicating that the TextBlock will be resized to fit its content\n\n */\n get resizeToFit() {\n return this._resizeToFit;\n }\n /**\n * Gets or sets a boolean indicating that the TextBlock will be resized to fit its content\n\n */\n set resizeToFit(value) {\n if (this._resizeToFit === value) {\n return;\n }\n this._resizeToFit = value;\n if (this._resizeToFit) {\n this._width.ignoreAdaptiveScaling = true;\n this._height.ignoreAdaptiveScaling = true;\n }\n this._markAsDirty();\n }\n /**\n * Gets or sets a boolean indicating if text must be wrapped\n */\n get textWrapping() {\n return this._textWrapping;\n }\n /**\n * Gets or sets a boolean indicating if text must be wrapped\n */\n set textWrapping(value) {\n if (this._textWrapping === value) {\n return;\n }\n this._textWrapping = +value;\n this._markAsDirty();\n }\n /**\n * Gets or sets text to display\n */\n get text() {\n return this._text;\n }\n /**\n * Gets or sets text to display\n */\n set text(value) {\n if (this._text === value) {\n return;\n }\n this._text = value + \"\"; // Making sure it is a text\n this._markAsDirty();\n this.onTextChangedObservable.notifyObservers(this);\n }\n /**\n * Gets or sets text horizontal alignment (BABYLON.GUI.Control.HORIZONTAL_ALIGNMENT_CENTER by default)\n */\n get textHorizontalAlignment() {\n return this._textHorizontalAlignment;\n }\n /**\n * Gets or sets text horizontal alignment (BABYLON.GUI.Control.HORIZONTAL_ALIGNMENT_CENTER by default)\n */\n set textHorizontalAlignment(value) {\n if (this._textHorizontalAlignment === value) {\n return;\n }\n this._textHorizontalAlignment = value;\n this._markAsDirty();\n }\n /**\n * Gets or sets text vertical alignment (BABYLON.GUI.Control.VERTICAL_ALIGNMENT_CENTER by default)\n */\n get textVerticalAlignment() {\n return this._textVerticalAlignment;\n }\n /**\n * Gets or sets text vertical alignment (BABYLON.GUI.Control.VERTICAL_ALIGNMENT_CENTER by default)\n */\n set textVerticalAlignment(value) {\n if (this._textVerticalAlignment === value) {\n return;\n }\n this._textVerticalAlignment = value;\n this._markAsDirty();\n }\n /**\n * Gets or sets line spacing value\n */\n set lineSpacing(value) {\n if (this._lineSpacing.fromString(value)) {\n this._markAsDirty();\n }\n }\n /**\n * Gets or sets line spacing value\n */\n get lineSpacing() {\n return this._lineSpacing.toString(this._host);\n }\n /**\n * Gets or sets outlineWidth of the text to display\n */\n get outlineWidth() {\n return this._outlineWidth;\n }\n /**\n * Gets or sets outlineWidth of the text to display\n */\n set outlineWidth(value) {\n if (this._outlineWidth === value) {\n return;\n }\n this._outlineWidth = value;\n this._markAsDirty();\n }\n /**\n * Gets or sets a boolean indicating that text must have underline\n */\n get underline() {\n return this._underline;\n }\n /**\n * Gets or sets a boolean indicating that text must have underline\n */\n set underline(value) {\n if (this._underline === value) {\n return;\n }\n this._underline = value;\n this._markAsDirty();\n }\n /**\n * Gets or sets an boolean indicating that text must be crossed out\n */\n get lineThrough() {\n return this._lineThrough;\n }\n /**\n * Gets or sets an boolean indicating that text must be crossed out\n */\n set lineThrough(value) {\n if (this._lineThrough === value) {\n return;\n }\n this._lineThrough = value;\n this._markAsDirty();\n }\n /**\n * If the outline should be applied to the underline/strike-through too. Has different behavior in Edge/Chrome vs Firefox.\n */\n get applyOutlineToUnderline() {\n return this._applyOutlineToUnderline;\n }\n set applyOutlineToUnderline(value) {\n if (this._applyOutlineToUnderline === value) {\n return;\n }\n this._applyOutlineToUnderline = value;\n this._markAsDirty();\n }\n /**\n * Gets or sets outlineColor of the text to display\n */\n get outlineColor() {\n return this._outlineColor;\n }\n /**\n * Gets or sets outlineColor of the text to display\n */\n set outlineColor(value) {\n if (this._outlineColor === value) {\n return;\n }\n this._outlineColor = value;\n this._markAsDirty();\n }\n /**\n * Gets or sets word divider\n */\n get wordDivider() {\n return this._wordDivider;\n }\n /**\n * Gets or sets word divider\n */\n set wordDivider(value) {\n if (this._wordDivider === value) {\n return;\n }\n this._wordDivider = value;\n this._markAsDirty();\n }\n /**\n * By default, if a text block has text wrapping other than Clip, its width\n * is not resized even if resizeToFit = true. This parameter forces the width\n * to be resized.\n */\n get forceResizeWidth() {\n return this._forceResizeWidth;\n }\n set forceResizeWidth(value) {\n if (this._forceResizeWidth === value) {\n return;\n }\n this._forceResizeWidth = value;\n this._markAsDirty();\n }\n /**\n * Creates a new TextBlock object\n * @param name defines the name of the control\n * @param text defines the text to display (empty string by default)\n */\n constructor(\n /**\n * Defines the name of the control\n */\n name, text = \"\") {\n super(name);\n this.name = name;\n this._text = \"\";\n this._textWrapping = TextWrapping.Clip;\n this._textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_CENTER;\n this._textVerticalAlignment = Control.VERTICAL_ALIGNMENT_CENTER;\n this._resizeToFit = false;\n this._lineSpacing = new ValueAndUnit(0);\n this._outlineWidth = 0;\n this._outlineColor = \"white\";\n this._underline = false;\n this._lineThrough = false;\n this._wordDivider = \" \";\n this._forceResizeWidth = false;\n this._applyOutlineToUnderline = false;\n /**\n * An event triggered after the text is changed\n */\n this.onTextChangedObservable = new Observable();\n /**\n * An event triggered after the text was broken up into lines\n */\n this.onLinesReadyObservable = new Observable();\n this._linesTemp = [];\n this.text = text;\n }\n _getTypeName() {\n return \"TextBlock\";\n }\n _processMeasures(parentMeasure, context) {\n if (!this._fontOffset || this.isDirty) {\n this._fontOffset = Control._GetFontOffset(context.font);\n }\n super._processMeasures(parentMeasure, context);\n // Prepare lines\n this._lines = this._breakLines(this._currentMeasure.width, this._currentMeasure.height, context);\n this.onLinesReadyObservable.notifyObservers(this);\n let maxLineWidth = 0;\n for (let i = 0; i < this._lines.length; i++) {\n const line = this._lines[i];\n if (line.width > maxLineWidth) {\n maxLineWidth = line.width;\n }\n }\n if (this._resizeToFit) {\n if (this._textWrapping === TextWrapping.Clip || this._forceResizeWidth) {\n const newWidth = Math.ceil(this._paddingLeftInPixels) + Math.ceil(this._paddingRightInPixels) + Math.ceil(maxLineWidth);\n if (newWidth !== this._width.getValueInPixel(this._host, this._tempParentMeasure.width)) {\n this._width.updateInPlace(newWidth, ValueAndUnit.UNITMODE_PIXEL);\n this._rebuildLayout = true;\n }\n }\n let newHeight = (this._paddingTopInPixels + this._paddingBottomInPixels + this._fontOffset.height * this._lines.length) | 0;\n if (this._lines.length > 0 && this._lineSpacing.internalValue !== 0) {\n let lineSpacing = 0;\n if (this._lineSpacing.isPixel) {\n lineSpacing = this._lineSpacing.getValue(this._host);\n }\n else {\n lineSpacing = this._lineSpacing.getValue(this._host) * this._height.getValueInPixel(this._host, this._cachedParentMeasure.height);\n }\n newHeight += (this._lines.length - 1) * lineSpacing;\n }\n if (newHeight !== this._height.internalValue) {\n this._height.updateInPlace(newHeight, ValueAndUnit.UNITMODE_PIXEL);\n this._rebuildLayout = true;\n }\n }\n }\n _drawText(text, textWidth, y, context) {\n const width = this._currentMeasure.width;\n let x = 0;\n switch (this._textHorizontalAlignment) {\n case Control.HORIZONTAL_ALIGNMENT_LEFT:\n x = 0;\n break;\n case Control.HORIZONTAL_ALIGNMENT_RIGHT:\n x = width - textWidth;\n break;\n case Control.HORIZONTAL_ALIGNMENT_CENTER:\n x = (width - textWidth) / 2;\n break;\n }\n if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {\n context.shadowColor = this.shadowColor;\n context.shadowBlur = this.shadowBlur;\n context.shadowOffsetX = this.shadowOffsetX;\n context.shadowOffsetY = this.shadowOffsetY;\n }\n if (this.outlineWidth) {\n context.strokeText(text, this._currentMeasure.left + x, y);\n }\n context.fillText(text, this._currentMeasure.left + x, y);\n if (this._underline) {\n this._drawLine(this._currentMeasure.left + x, y + 3, this._currentMeasure.left + x + textWidth, y + 3, context);\n }\n if (this._lineThrough) {\n this._drawLine(this._currentMeasure.left + x, y - this.fontSizeInPixels / 3, this._currentMeasure.left + x + textWidth, y - this.fontSizeInPixels / 3, context);\n }\n }\n _drawLine(xFrom, yFrom, xTo, yTo, context) {\n context.beginPath();\n context.lineWidth = Math.round(this.fontSizeInPixels * 0.05);\n context.moveTo(xFrom, yFrom);\n context.lineTo(xTo, yTo);\n if (this.outlineWidth && this.applyOutlineToUnderline) {\n context.stroke();\n context.fill();\n }\n else {\n const currentStroke = context.strokeStyle;\n context.strokeStyle = context.fillStyle;\n context.stroke();\n context.strokeStyle = currentStroke;\n }\n context.closePath();\n }\n /**\n * @internal\n */\n _draw(context) {\n context.save();\n this._applyStates(context);\n // Render lines\n this._renderLines(context);\n context.restore();\n }\n _applyStates(context) {\n super._applyStates(context);\n if (this.outlineWidth) {\n context.lineWidth = this.outlineWidth;\n context.strokeStyle = this.outlineColor;\n context.lineJoin = \"miter\";\n context.miterLimit = 2;\n }\n }\n _breakLines(refWidth, refHeight, context) {\n this._linesTemp.length = 0;\n const _lines = this.text.split(\"\\n\");\n if (this._textWrapping === TextWrapping.Ellipsis) {\n for (const _line of _lines) {\n this._linesTemp.push(this._parseLineEllipsis(_line, refWidth, context));\n }\n }\n else if (this._textWrapping === TextWrapping.WordWrap) {\n for (const _line of _lines) {\n this._linesTemp.push(...this._parseLineWordWrap(_line, refWidth, context));\n }\n }\n else if (this._textWrapping === TextWrapping.WordWrapEllipsis) {\n for (const _line of _lines) {\n this._linesTemp.push(...this._parseLineWordWrapEllipsis(_line, refWidth, refHeight, context));\n }\n }\n else {\n for (const _line of _lines) {\n this._linesTemp.push(this._parseLine(_line, context));\n }\n }\n return this._linesTemp;\n }\n _parseLine(line = \"\", context) {\n return { text: line, width: this._getTextMetricsWidth(context.measureText(line)) };\n }\n //Calculate how many characters approximately we need to remove\n _getCharsToRemove(lineWidth, width, lineLength) {\n const diff = lineWidth > width ? lineWidth - width : 0;\n // This isn't exact unless the font is monospaced\n const charWidth = lineWidth / lineLength;\n const removeChars = Math.max(Math.floor(diff / charWidth), 1);\n return removeChars;\n }\n _parseLineEllipsis(line = \"\", width, context) {\n let lineWidth = this._getTextMetricsWidth(context.measureText(line));\n let removeChars = this._getCharsToRemove(lineWidth, width, line.length);\n // unicode support. split('') does not work with unicode!\n // make sure Array.from is available\n const characters = Array.from && Array.from(line);\n if (!characters) {\n // no array.from, use the old method\n while (line.length > 2 && lineWidth > width) {\n line = line.slice(0, -removeChars);\n lineWidth = this._getTextMetricsWidth(context.measureText(line + \"…\"));\n removeChars = this._getCharsToRemove(lineWidth, width, line.length);\n }\n // Add on the end\n line += \"…\";\n }\n else {\n while (characters.length && lineWidth > width) {\n characters.splice(characters.length - removeChars, removeChars);\n line = `${characters.join(\"\")}…`;\n lineWidth = this._getTextMetricsWidth(context.measureText(line));\n removeChars = this._getCharsToRemove(lineWidth, width, line.length);\n }\n }\n return { text: line, width: lineWidth };\n }\n _getTextMetricsWidth(textMetrics) {\n if (textMetrics.actualBoundingBoxLeft !== undefined) {\n return Math.abs(textMetrics.actualBoundingBoxLeft) + Math.abs(textMetrics.actualBoundingBoxRight);\n }\n return textMetrics.width;\n }\n _parseLineWordWrap(line = \"\", width, context) {\n const lines = [];\n const words = this.wordSplittingFunction ? this.wordSplittingFunction(line) : line.split(this._wordDivider);\n let lineWidth = this._getTextMetricsWidth(context.measureText(line));\n for (let n = 0; n < words.length; n++) {\n const testLine = n > 0 ? line + this._wordDivider + words[n] : words[0];\n const testWidth = this._getTextMetricsWidth(context.measureText(testLine));\n if (testWidth > width && n > 0) {\n lines.push({ text: line, width: lineWidth });\n line = words[n];\n lineWidth = this._getTextMetricsWidth(context.measureText(line));\n }\n else {\n lineWidth = testWidth;\n line = testLine;\n }\n }\n lines.push({ text: line, width: lineWidth });\n return lines;\n }\n _parseLineWordWrapEllipsis(line = \"\", width, height, context) {\n const lines = this._parseLineWordWrap(line, width, context);\n for (let n = 1; n <= lines.length; n++) {\n const currentHeight = this._computeHeightForLinesOf(n);\n if (currentHeight > height && n > 1) {\n const lastLine = lines[n - 2];\n const currentLine = lines[n - 1];\n lines[n - 2] = this._parseLineEllipsis(lastLine.text + this._wordDivider + currentLine.text, width, context);\n const linesToRemove = lines.length - n + 1;\n for (let i = 0; i < linesToRemove; i++) {\n lines.pop();\n }\n return lines;\n }\n }\n return lines;\n }\n _renderLines(context) {\n if (!this._fontOffset || !this._lines) {\n return;\n }\n const height = this._currentMeasure.height;\n let rootY = 0;\n switch (this._textVerticalAlignment) {\n case Control.VERTICAL_ALIGNMENT_TOP:\n rootY = this._fontOffset.ascent;\n break;\n case Control.VERTICAL_ALIGNMENT_BOTTOM:\n rootY = height - this._fontOffset.height * (this._lines.length - 1) - this._fontOffset.descent;\n break;\n case Control.VERTICAL_ALIGNMENT_CENTER:\n rootY = this._fontOffset.ascent + (height - this._fontOffset.height * this._lines.length) / 2;\n break;\n }\n rootY += this._currentMeasure.top;\n for (let i = 0; i < this._lines.length; i++) {\n const line = this._lines[i];\n if (i !== 0 && this._lineSpacing.internalValue !== 0) {\n if (this._lineSpacing.isPixel) {\n rootY += this._lineSpacing.getValue(this._host);\n }\n else {\n rootY = rootY + this._lineSpacing.getValue(this._host) * this._height.getValueInPixel(this._host, this._cachedParentMeasure.height);\n }\n }\n this._drawText(line.text, line.width, rootY, context);\n rootY += this._fontOffset.height;\n }\n }\n _computeHeightForLinesOf(lineCount) {\n let newHeight = this._paddingTopInPixels + this._paddingBottomInPixels + this._fontOffset.height * lineCount;\n if (lineCount > 0 && this._lineSpacing.internalValue !== 0) {\n let lineSpacing = 0;\n if (this._lineSpacing.isPixel) {\n lineSpacing = this._lineSpacing.getValue(this._host);\n }\n else {\n lineSpacing = this._lineSpacing.getValue(this._host) * this._height.getValueInPixel(this._host, this._cachedParentMeasure.height);\n }\n newHeight += (lineCount - 1) * lineSpacing;\n }\n return newHeight;\n }\n isDimensionFullyDefined(dim) {\n if (this.resizeToFit) {\n return true;\n }\n return super.isDimensionFullyDefined(dim);\n }\n /**\n * Given a width constraint applied on the text block, find the expected height\n * @returns expected height\n */\n computeExpectedHeight() {\n var _a;\n if (this.text && this.widthInPixels) {\n // Should abstract platform instead of using LastCreatedEngine\n const context = (_a = EngineStore.LastCreatedEngine) === null || _a === void 0 ? void 0 : _a.createCanvas(0, 0).getContext(\"2d\");\n if (context) {\n this._applyStates(context);\n if (!this._fontOffset) {\n this._fontOffset = Control._GetFontOffset(context.font);\n }\n const lines = this._lines\n ? this._lines\n : this._breakLines(this.widthInPixels - this._paddingLeftInPixels - this._paddingRightInPixels, this.heightInPixels - this._paddingTopInPixels - this._paddingBottomInPixels, context);\n return this._computeHeightForLinesOf(lines.length);\n }\n }\n return 0;\n }\n dispose() {\n super.dispose();\n this.onTextChangedObservable.clear();\n }\n}\n__decorate([\n serialize()\n], TextBlock.prototype, \"resizeToFit\", null);\n__decorate([\n serialize()\n], TextBlock.prototype, \"textWrapping\", null);\n__decorate([\n serialize()\n], TextBlock.prototype, \"text\", null);\n__decorate([\n serialize()\n], TextBlock.prototype, \"textHorizontalAlignment\", null);\n__decorate([\n serialize()\n], TextBlock.prototype, \"textVerticalAlignment\", null);\n__decorate([\n serialize()\n], TextBlock.prototype, \"lineSpacing\", null);\n__decorate([\n serialize()\n], TextBlock.prototype, \"outlineWidth\", null);\n__decorate([\n serialize()\n], TextBlock.prototype, \"underline\", null);\n__decorate([\n serialize()\n], TextBlock.prototype, \"lineThrough\", null);\n__decorate([\n serialize()\n], TextBlock.prototype, \"applyOutlineToUnderline\", null);\n__decorate([\n serialize()\n], TextBlock.prototype, \"outlineColor\", null);\n__decorate([\n serialize()\n], TextBlock.prototype, \"wordDivider\", null);\n__decorate([\n serialize()\n], TextBlock.prototype, \"forceResizeWidth\", null);\nRegisterClass(\"BABYLON.GUI.TextBlock\", TextBlock);\n//# sourceMappingURL=textBlock.js.map","import { Rectangle } from \"./rectangle.js\";\nimport { Control } from \"./control.js\";\nimport { TextBlock } from \"./textBlock.js\";\nimport { Image } from \"./image.js\";\nimport { RegisterClass } from \"@babylonjs/core/Misc/typeStore.js\";\n/**\n * Class used to create 2D buttons\n */\nexport class Button extends Rectangle {\n /**\n * Returns the image part of the button (if any)\n */\n get image() {\n return this._image;\n }\n /**\n * Returns the TextBlock part of the button (if any)\n */\n get textBlock() {\n return this._textBlock;\n }\n /**\n * Creates a new Button\n * @param name defines the name of the button\n */\n constructor(name) {\n super(name);\n this.name = name;\n /**\n * Gets or sets a boolean indicating that the button will let internal controls handle picking instead of doing it directly using its bounding info\n */\n this.delegatePickingToChildren = false;\n this.thickness = 1;\n this.isPointerBlocker = true;\n let alphaStore = null;\n this.pointerEnterAnimation = () => {\n alphaStore = this.alpha;\n this.alpha -= 0.1;\n };\n this.pointerOutAnimation = () => {\n if (alphaStore !== null) {\n this.alpha = alphaStore;\n }\n };\n this.pointerDownAnimation = () => {\n this.scaleX -= 0.05;\n this.scaleY -= 0.05;\n };\n this.pointerUpAnimation = () => {\n this.scaleX += 0.05;\n this.scaleY += 0.05;\n };\n }\n _getTypeName() {\n return \"Button\";\n }\n // While being a container, the button behaves like a control.\n /**\n * @internal\n */\n _processPicking(x, y, pi, type, pointerId, buttonIndex, deltaX, deltaY) {\n if (!this._isEnabled || !this.isHitTestVisible || !this.isVisible || this.notRenderable) {\n return false;\n }\n if (!super.contains(x, y)) {\n return false;\n }\n if (this.delegatePickingToChildren) {\n let contains = false;\n for (let index = this._children.length - 1; index >= 0; index--) {\n const child = this._children[index];\n if (child.isEnabled && child.isHitTestVisible && child.isVisible && !child.notRenderable && child.contains(x, y)) {\n contains = true;\n break;\n }\n }\n if (!contains) {\n return false;\n }\n }\n this._processObservables(type, x, y, pi, pointerId, buttonIndex, deltaX, deltaY);\n return true;\n }\n /**\n * @internal\n */\n _onPointerEnter(target, pi) {\n if (!super._onPointerEnter(target, pi)) {\n return false;\n }\n if (!this.isReadOnly && this.pointerEnterAnimation) {\n this.pointerEnterAnimation();\n }\n return true;\n }\n /**\n * @internal\n */\n _onPointerOut(target, pi, force = false) {\n if (!this.isReadOnly && this.pointerOutAnimation) {\n this.pointerOutAnimation();\n }\n super._onPointerOut(target, pi, force);\n }\n /**\n * @internal\n */\n _onPointerDown(target, coordinates, pointerId, buttonIndex, pi) {\n if (!super._onPointerDown(target, coordinates, pointerId, buttonIndex, pi)) {\n return false;\n }\n if (!this.isReadOnly && this.pointerDownAnimation) {\n this.pointerDownAnimation();\n }\n return true;\n }\n _getRectangleFill(context) {\n if (this.isEnabled) {\n return this._getBackgroundColor(context);\n }\n else {\n return this._disabledColor;\n }\n }\n /**\n * @internal\n */\n _onPointerUp(target, coordinates, pointerId, buttonIndex, notifyClick, pi) {\n if (!this.isReadOnly && this.pointerUpAnimation) {\n this.pointerUpAnimation();\n }\n super._onPointerUp(target, coordinates, pointerId, buttonIndex, notifyClick, pi);\n }\n /**\n * Serializes the current button\n * @param serializationObject defines the JSON serialized object\n */\n serialize(serializationObject) {\n super.serialize(serializationObject);\n if (this._textBlock) {\n serializationObject.textBlockName = this._textBlock.name;\n }\n if (this._image) {\n serializationObject.imageName = this._image.name;\n }\n }\n /**\n * @internal\n */\n _parseFromContent(serializedObject, host) {\n super._parseFromContent(serializedObject, host);\n if (serializedObject.textBlockName) {\n this._textBlock = this.getChildByName(serializedObject.textBlockName);\n }\n if (serializedObject.imageName) {\n this._image = this.getChildByName(serializedObject.imageName);\n }\n }\n // Statics\n /**\n * Creates a new button made with an image and a text\n * @param name defines the name of the button\n * @param text defines the text of the button\n * @param imageUrl defines the url of the image\n * @returns a new Button\n */\n static CreateImageButton(name, text, imageUrl) {\n const result = new this(name);\n // Adding text\n const textBlock = new TextBlock(name + \"_button\", text);\n textBlock.textWrapping = true;\n textBlock.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_CENTER;\n textBlock.paddingLeft = \"20%\";\n result.addControl(textBlock);\n // Adding image\n const iconImage = new Image(name + \"_icon\", imageUrl);\n iconImage.width = \"20%\";\n iconImage.stretch = Image.STRETCH_UNIFORM;\n iconImage.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;\n result.addControl(iconImage);\n // Store\n result._image = iconImage;\n result._textBlock = textBlock;\n return result;\n }\n /**\n * Creates a new button made with an image\n * @param name defines the name of the button\n * @param imageUrl defines the url of the image\n * @returns a new Button\n */\n static CreateImageOnlyButton(name, imageUrl) {\n const result = new this(name);\n // Adding image\n const iconImage = new Image(name + \"_icon\", imageUrl);\n iconImage.stretch = Image.STRETCH_FILL;\n iconImage.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;\n result.addControl(iconImage);\n // Store\n result._image = iconImage;\n return result;\n }\n /**\n * Creates a new button made with a text\n * @param name defines the name of the button\n * @param text defines the text of the button\n * @returns a new Button\n */\n static CreateSimpleButton(name, text) {\n const result = new this(name);\n // Adding text\n const textBlock = new TextBlock(name + \"_button\", text);\n textBlock.textWrapping = true;\n textBlock.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_CENTER;\n result.addControl(textBlock);\n // Store\n result._textBlock = textBlock;\n return result;\n }\n /**\n * Creates a new button made with an image and a centered text\n * @param name defines the name of the button\n * @param text defines the text of the button\n * @param imageUrl defines the url of the image\n * @returns a new Button\n */\n static CreateImageWithCenterTextButton(name, text, imageUrl) {\n const result = new this(name);\n // Adding image\n const iconImage = new Image(name + \"_icon\", imageUrl);\n iconImage.stretch = Image.STRETCH_FILL;\n result.addControl(iconImage);\n // Adding text\n const textBlock = new TextBlock(name + \"_button\", text);\n textBlock.textWrapping = true;\n textBlock.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_CENTER;\n result.addControl(textBlock);\n // Store\n result._image = iconImage;\n result._textBlock = textBlock;\n return result;\n }\n}\nRegisterClass(\"BABYLON.GUI.Button\", Button);\n//# sourceMappingURL=button.js.map","import { __decorate } from \"@babylonjs/core/tslib.es6.js\";\nimport { Observable } from \"@babylonjs/core/Misc/observable.js\";\nimport { Control } from \"./control.js\";\nimport { StackPanel } from \"./stackPanel.js\";\nimport { TextBlock } from \"./textBlock.js\";\nimport { RegisterClass } from \"@babylonjs/core/Misc/typeStore.js\";\nimport { serialize } from \"@babylonjs/core/Misc/decorators.js\";\n/**\n * Class used to represent a 2D checkbox\n */\nexport class Checkbox extends Control {\n /** Gets or sets border thickness */\n get thickness() {\n return this._thickness;\n }\n set thickness(value) {\n if (this._thickness === value) {\n return;\n }\n this._thickness = value;\n this._markAsDirty();\n }\n /** Gets or sets a value indicating the ratio between overall size and check size */\n get checkSizeRatio() {\n return this._checkSizeRatio;\n }\n set checkSizeRatio(value) {\n value = Math.max(Math.min(1, value), 0);\n if (this._checkSizeRatio === value) {\n return;\n }\n this._checkSizeRatio = value;\n this._markAsDirty();\n }\n /** Gets or sets background color */\n get background() {\n return this._background;\n }\n set background(value) {\n if (this._background === value) {\n return;\n }\n this._background = value;\n this._markAsDirty();\n }\n /** Gets or sets a boolean indicating if the checkbox is checked or not */\n get isChecked() {\n return this._isChecked;\n }\n set isChecked(value) {\n if (this._isChecked === value) {\n return;\n }\n this._isChecked = value;\n this._markAsDirty();\n this.onIsCheckedChangedObservable.notifyObservers(value);\n }\n /**\n * Creates a new CheckBox\n * @param name defines the control name\n */\n constructor(name) {\n super(name);\n this.name = name;\n this._isChecked = false;\n this._background = \"black\";\n this._checkSizeRatio = 0.8;\n this._thickness = 1;\n /**\n * Observable raised when isChecked property changes\n */\n this.onIsCheckedChangedObservable = new Observable();\n this.isPointerBlocker = true;\n }\n _getTypeName() {\n return \"Checkbox\";\n }\n /**\n * @internal\n */\n _draw(context) {\n context.save();\n this._applyStates(context);\n const actualWidth = this._currentMeasure.width - this._thickness;\n const actualHeight = this._currentMeasure.height - this._thickness;\n if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {\n context.shadowColor = this.shadowColor;\n context.shadowBlur = this.shadowBlur;\n context.shadowOffsetX = this.shadowOffsetX;\n context.shadowOffsetY = this.shadowOffsetY;\n }\n context.fillStyle = this._isEnabled ? this._background : this._disabledColor;\n context.fillRect(this._currentMeasure.left + this._thickness / 2, this._currentMeasure.top + this._thickness / 2, actualWidth, actualHeight);\n if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {\n context.shadowBlur = 0;\n context.shadowOffsetX = 0;\n context.shadowOffsetY = 0;\n }\n if (this._isChecked) {\n context.fillStyle = this._isEnabled ? this.color : this._disabledColorItem;\n const offsetWidth = actualWidth * this._checkSizeRatio;\n const offsetHeight = actualHeight * this._checkSizeRatio;\n context.fillRect(this._currentMeasure.left + this._thickness / 2 + (actualWidth - offsetWidth) / 2, this._currentMeasure.top + this._thickness / 2 + (actualHeight - offsetHeight) / 2, offsetWidth, offsetHeight);\n }\n context.strokeStyle = this.color;\n context.lineWidth = this._thickness;\n context.strokeRect(this._currentMeasure.left + this._thickness / 2, this._currentMeasure.top + this._thickness / 2, actualWidth, actualHeight);\n context.restore();\n }\n // Events\n /**\n * @internal\n */\n _onPointerDown(target, coordinates, pointerId, buttonIndex, pi) {\n if (!super._onPointerDown(target, coordinates, pointerId, buttonIndex, pi)) {\n return false;\n }\n if (!this.isReadOnly) {\n this.isChecked = !this.isChecked;\n }\n return true;\n }\n /**\n * Utility function to easily create a checkbox with a header\n * @param title defines the label to use for the header\n * @param onValueChanged defines the callback to call when value changes\n * @returns a StackPanel containing the checkbox and a textBlock\n */\n static AddCheckBoxWithHeader(title, onValueChanged) {\n const panel = new StackPanel();\n panel.isVertical = false;\n panel.height = \"30px\";\n const checkbox = new Checkbox();\n checkbox.width = \"20px\";\n checkbox.height = \"20px\";\n checkbox.isChecked = true;\n checkbox.color = \"green\";\n checkbox.onIsCheckedChangedObservable.add(onValueChanged);\n panel.addControl(checkbox);\n const header = new TextBlock();\n header.text = title;\n header.width = \"180px\";\n header.paddingLeft = \"5px\";\n header.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;\n header.color = \"white\";\n panel.addControl(header);\n return panel;\n }\n}\n__decorate([\n serialize()\n], Checkbox.prototype, \"thickness\", null);\n__decorate([\n serialize()\n], Checkbox.prototype, \"checkSizeRatio\", null);\n__decorate([\n serialize()\n], Checkbox.prototype, \"background\", null);\n__decorate([\n serialize()\n], Checkbox.prototype, \"isChecked\", null);\nRegisterClass(\"BABYLON.GUI.Checkbox\", Checkbox);\n//# sourceMappingURL=checkbox.js.map","/** @internal */\nexport class TextWrapper {\n get text() {\n return this._characters ? this._characters.join(\"\") : this._text;\n }\n set text(txt) {\n this._text = txt;\n this._characters = Array.from && Array.from(txt);\n }\n get length() {\n return this._characters ? this._characters.length : this._text.length;\n }\n removePart(idxStart, idxEnd, insertTxt) {\n this._text = this._text.slice(0, idxStart) + (insertTxt ? insertTxt : \"\") + this._text.slice(idxEnd);\n if (this._characters) {\n const newCharacters = insertTxt ? Array.from(insertTxt) : [];\n this._characters.splice(idxStart, idxEnd - idxStart, ...newCharacters);\n }\n }\n charAt(idx) {\n return this._characters ? this._characters[idx] : this._text.charAt(idx);\n }\n substr(from, length) {\n if (this._characters) {\n if (isNaN(from)) {\n from = 0;\n }\n else if (from >= 0) {\n from = Math.min(from, this._characters.length);\n }\n else {\n from = this._characters.length + Math.max(from, -this._characters.length);\n }\n if (length === undefined) {\n length = this._characters.length - from;\n }\n else if (isNaN(length)) {\n length = 0;\n }\n else if (length < 0) {\n length = 0;\n }\n const temp = [];\n while (--length >= 0) {\n temp[length] = this._characters[from + length];\n }\n return temp.join(\"\");\n }\n return this._text.substr(from, length);\n }\n substring(from, to) {\n if (this._characters) {\n if (isNaN(from)) {\n from = 0;\n }\n else if (from > this._characters.length) {\n from = this._characters.length;\n }\n else if (from < 0) {\n from = 0;\n }\n if (to === undefined) {\n to = this._characters.length;\n }\n else if (isNaN(to)) {\n to = 0;\n }\n else if (to > this._characters.length) {\n to = this._characters.length;\n }\n else if (to < 0) {\n to = 0;\n }\n const temp = [];\n let idx = 0;\n while (from < to) {\n temp[idx++] = this._characters[from++];\n }\n return temp.join(\"\");\n }\n return this._text.substring(from, to);\n }\n isWord(index) {\n const rWord = /\\w/g;\n return this._characters ? this._characters[index].search(rWord) !== -1 : this._text.search(rWord) !== -1;\n }\n}\n//# sourceMappingURL=textWrapper.js.map","import { __decorate } from \"@babylonjs/core/tslib.es6.js\";\nimport { Observable } from \"@babylonjs/core/Misc/observable.js\";\nimport { ClipboardEventTypes } from \"@babylonjs/core/Events/clipboardEvents.js\";\nimport { PointerEventTypes } from \"@babylonjs/core/Events/pointerEvents.js\";\nimport { Control } from \"./control.js\";\nimport { ValueAndUnit } from \"../valueAndUnit.js\";\nimport { RegisterClass } from \"@babylonjs/core/Misc/typeStore.js\";\nimport { TextWrapper } from \"./textWrapper.js\";\nimport { serialize } from \"@babylonjs/core/Misc/decorators.js\";\n/**\n * Class used to create input text control\n */\nexport class InputText extends Control {\n /** Gets or sets the maximum width allowed by the control */\n get maxWidth() {\n return this._maxWidth.toString(this._host);\n }\n /** Gets the maximum width allowed by the control in pixels */\n get maxWidthInPixels() {\n return this._maxWidth.getValueInPixel(this._host, this._cachedParentMeasure.width);\n }\n set maxWidth(value) {\n if (this._maxWidth.toString(this._host) === value) {\n return;\n }\n if (this._maxWidth.fromString(value)) {\n this._markAsDirty();\n }\n }\n /** Gets or sets the text highlighter transparency; default: 0.4 */\n get highligherOpacity() {\n return this._highligherOpacity;\n }\n set highligherOpacity(value) {\n if (this._highligherOpacity === value) {\n return;\n }\n this._highligherOpacity = value;\n this._markAsDirty();\n }\n /** Gets or sets a boolean indicating whether to select complete text by default on input focus */\n get onFocusSelectAll() {\n return this._onFocusSelectAll;\n }\n set onFocusSelectAll(value) {\n if (this._onFocusSelectAll === value) {\n return;\n }\n this._onFocusSelectAll = value;\n this._markAsDirty();\n }\n /** Gets or sets the text hightlight color */\n get textHighlightColor() {\n return this._textHighlightColor;\n }\n set textHighlightColor(value) {\n if (this._textHighlightColor === value) {\n return;\n }\n this._textHighlightColor = value;\n this._markAsDirty();\n }\n /** Gets or sets control margin */\n get margin() {\n return this._margin.toString(this._host);\n }\n /** Gets control margin in pixels */\n get marginInPixels() {\n return this._margin.getValueInPixel(this._host, this._cachedParentMeasure.width);\n }\n set margin(value) {\n if (this._margin.toString(this._host) === value) {\n return;\n }\n if (this._margin.fromString(value)) {\n this._markAsDirty();\n }\n }\n /** Gets or sets a boolean indicating if the control can auto stretch its width to adapt to the text */\n get autoStretchWidth() {\n return this._autoStretchWidth;\n }\n set autoStretchWidth(value) {\n if (this._autoStretchWidth === value) {\n return;\n }\n this._autoStretchWidth = value;\n this._markAsDirty();\n }\n /** Gets or sets border thickness */\n get thickness() {\n return this._thickness;\n }\n set thickness(value) {\n if (this._thickness === value) {\n return;\n }\n this._thickness = value;\n this._markAsDirty();\n }\n /** Gets or sets the background color when focused */\n get focusedBackground() {\n return this._focusedBackground;\n }\n set focusedBackground(value) {\n if (this._focusedBackground === value) {\n return;\n }\n this._focusedBackground = value;\n this._markAsDirty();\n }\n /** Gets or sets the background color when focused */\n get focusedColor() {\n return this._focusedColor;\n }\n set focusedColor(value) {\n if (this._focusedColor === value) {\n return;\n }\n this._focusedColor = value;\n this._markAsDirty();\n }\n /** Gets or sets the background color */\n get background() {\n return this._background;\n }\n set background(value) {\n if (this._background === value) {\n return;\n }\n this._background = value;\n this._markAsDirty();\n }\n /** Gets or sets the placeholder color */\n get placeholderColor() {\n return this._placeholderColor;\n }\n set placeholderColor(value) {\n if (this._placeholderColor === value) {\n return;\n }\n this._placeholderColor = value;\n this._markAsDirty();\n }\n /** Gets or sets the text displayed when the control is empty */\n get placeholderText() {\n return this._placeholderText;\n }\n set placeholderText(value) {\n if (this._placeholderText === value) {\n return;\n }\n this._placeholderText = value;\n this._markAsDirty();\n }\n /** Gets or sets the dead key. 0 to disable. */\n get deadKey() {\n return this._deadKey;\n }\n set deadKey(flag) {\n this._deadKey = flag;\n }\n /** Gets or sets the highlight text */\n get highlightedText() {\n return this._highlightedText;\n }\n set highlightedText(text) {\n if (this._highlightedText === text) {\n return;\n }\n this._highlightedText = text;\n this._markAsDirty();\n }\n /** Gets or sets if the current key should be added */\n get addKey() {\n return this._addKey;\n }\n set addKey(flag) {\n this._addKey = flag;\n }\n /** Gets or sets the value of the current key being entered */\n get currentKey() {\n return this._currentKey;\n }\n set currentKey(key) {\n this._currentKey = key;\n }\n /** Gets or sets the text displayed in the control */\n get text() {\n return this._textWrapper.text;\n }\n set text(value) {\n const valueAsString = value.toString(); // Forcing convertion\n if (!this._textWrapper) {\n this._textWrapper = new TextWrapper();\n }\n if (this._textWrapper.text === valueAsString) {\n return;\n }\n this._textWrapper.text = valueAsString;\n this._textHasChanged();\n }\n _textHasChanged() {\n this._markAsDirty();\n this.onTextChangedObservable.notifyObservers(this);\n }\n /** Gets or sets control width */\n get width() {\n return this._width.toString(this._host);\n }\n set width(value) {\n if (this._width.toString(this._host) === value) {\n return;\n }\n if (this._width.fromString(value)) {\n this._markAsDirty();\n }\n this.autoStretchWidth = false;\n }\n /**\n * Creates a new InputText\n * @param name defines the control name\n * @param text defines the text of the control\n */\n constructor(name, text = \"\") {\n super(name);\n this.name = name;\n this._placeholderText = \"\";\n this._background = \"#222222\";\n this._focusedBackground = \"#000000\";\n this._focusedColor = \"white\";\n this._placeholderColor = \"gray\";\n this._thickness = 1;\n this._margin = new ValueAndUnit(10, ValueAndUnit.UNITMODE_PIXEL);\n this._autoStretchWidth = true;\n this._maxWidth = new ValueAndUnit(1, ValueAndUnit.UNITMODE_PERCENTAGE, false);\n this._isFocused = false;\n this._blinkIsEven = false;\n this._cursorOffset = 0;\n this._deadKey = false;\n this._addKey = true;\n this._currentKey = \"\";\n this._isTextHighlightOn = false;\n this._textHighlightColor = \"#d5e0ff\";\n this._highligherOpacity = 0.4;\n this._highlightedText = \"\";\n this._startHighlightIndex = 0;\n this._endHighlightIndex = 0;\n this._cursorIndex = -1;\n this._onFocusSelectAll = false;\n this._isPointerDown = false;\n /** Gets or sets a string representing the message displayed on mobile when the control gets the focus */\n this.promptMessage = \"Please enter text:\";\n /** Force disable prompt on mobile device */\n this.disableMobilePrompt = false;\n /** Observable raised when the text changes */\n this.onTextChangedObservable = new Observable();\n /** Observable raised just before an entered character is to be added */\n this.onBeforeKeyAddObservable = new Observable();\n /** Observable raised when the control gets the focus */\n this.onFocusObservable = new Observable();\n /** Observable raised when the control loses the focus */\n this.onBlurObservable = new Observable();\n /**Observable raised when the text is highlighted */\n this.onTextHighlightObservable = new Observable();\n /**Observable raised when copy event is triggered */\n this.onTextCopyObservable = new Observable();\n /** Observable raised when cut event is triggered */\n this.onTextCutObservable = new Observable();\n /** Observable raised when paste event is triggered */\n this.onTextPasteObservable = new Observable();\n /** Observable raised when a key event was processed */\n this.onKeyboardEventProcessedObservable = new Observable();\n this.text = text;\n this.isPointerBlocker = true;\n }\n /** @internal */\n onBlur() {\n this._isFocused = false;\n this._scrollLeft = null;\n this._cursorOffset = 0;\n clearTimeout(this._blinkTimeout);\n this._markAsDirty();\n this.onBlurObservable.notifyObservers(this);\n this._host.unRegisterClipboardEvents();\n if (this._onClipboardObserver) {\n this._host.onClipboardObservable.remove(this._onClipboardObserver);\n }\n const scene = this._host.getScene();\n if (this._onPointerDblTapObserver && scene) {\n scene.onPointerObservable.remove(this._onPointerDblTapObserver);\n }\n }\n /** @internal */\n onFocus() {\n if (!this._isEnabled) {\n return;\n }\n this._scrollLeft = null;\n this._isFocused = true;\n this._blinkIsEven = false;\n this._cursorOffset = 0;\n this._markAsDirty();\n this.onFocusObservable.notifyObservers(this);\n if (this._focusedBy === \"touch\" && !this.disableMobilePrompt) {\n const value = prompt(this.promptMessage);\n if (value !== null) {\n this.text = value;\n }\n this._host.focusedControl = null;\n return;\n }\n this._host.registerClipboardEvents();\n this._onClipboardObserver = this._host.onClipboardObservable.add((clipboardInfo) => {\n // process clipboard event, can be configured.\n switch (clipboardInfo.type) {\n case ClipboardEventTypes.COPY:\n this._onCopyText(clipboardInfo.event);\n this.onTextCopyObservable.notifyObservers(this);\n break;\n case ClipboardEventTypes.CUT:\n this._onCutText(clipboardInfo.event);\n this.onTextCutObservable.notifyObservers(this);\n break;\n case ClipboardEventTypes.PASTE:\n this._onPasteText(clipboardInfo.event);\n this.onTextPasteObservable.notifyObservers(this);\n break;\n default:\n return;\n }\n });\n const scene = this._host.getScene();\n if (scene) {\n //register the pointer double tap event\n this._onPointerDblTapObserver = scene.onPointerObservable.add((pointerInfo) => {\n if (!this._isFocused) {\n return;\n }\n if (pointerInfo.type === PointerEventTypes.POINTERDOUBLETAP) {\n this._processDblClick(pointerInfo);\n }\n });\n }\n if (this._onFocusSelectAll) {\n this._selectAllText();\n }\n }\n /**\n * Function to focus an inputText programmatically\n */\n focus() {\n this._host.moveFocusToControl(this);\n }\n /**\n * Function to unfocus an inputText programmatically\n */\n blur() {\n this._host.focusedControl = null;\n }\n _getTypeName() {\n return \"InputText\";\n }\n /**\n * Function called to get the list of controls that should not steal the focus from this control\n * @returns an array of controls\n */\n keepsFocusWith() {\n if (!this._connectedVirtualKeyboard) {\n return null;\n }\n return [this._connectedVirtualKeyboard];\n }\n /**\n * @internal\n */\n processKey(keyCode, key, evt) {\n var _a;\n if (this.isReadOnly) {\n return;\n }\n //return if clipboard event keys (i.e -ctr/cmd + c,v,x)\n if (evt && (evt.ctrlKey || evt.metaKey) && (keyCode === 67 || keyCode === 86 || keyCode === 88)) {\n return;\n }\n //select all\n if (evt && (evt.ctrlKey || evt.metaKey) && keyCode === 65) {\n this._selectAllText();\n evt.preventDefault();\n return;\n }\n // Specific cases\n switch (keyCode) {\n case 32: //SPACE\n key = \" \"; //ie11 key for space is \"Spacebar\"\n break;\n case 191: //SLASH\n if (evt) {\n evt.preventDefault();\n }\n break;\n case 8: // BACKSPACE\n if (this._textWrapper.text && this._textWrapper.length > 0) {\n //delete the highlighted text\n if (this.isTextHighlightOn) {\n this._textWrapper.removePart(this._startHighlightIndex, this._endHighlightIndex);\n this._textHasChanged();\n this.isTextHighlightOn = false;\n this._cursorOffset = this._textWrapper.length - this._startHighlightIndex;\n this._blinkIsEven = false;\n if (evt) {\n evt.preventDefault();\n }\n return;\n }\n //delete single character\n if (this._cursorOffset === 0) {\n this.text = this._textWrapper.substr(0, this._textWrapper.length - 1);\n }\n else {\n const deletePosition = this._textWrapper.length - this._cursorOffset;\n if (deletePosition > 0) {\n this._textWrapper.removePart(deletePosition - 1, deletePosition);\n this._textHasChanged();\n }\n }\n }\n if (evt) {\n evt.preventDefault();\n }\n return;\n case 46: // DELETE\n if (this.isTextHighlightOn) {\n this._textWrapper.removePart(this._startHighlightIndex, this._endHighlightIndex);\n this._textHasChanged();\n this.isTextHighlightOn = false;\n this._cursorOffset = this._textWrapper.length - this._startHighlightIndex;\n if (evt) {\n evt.preventDefault();\n }\n return;\n }\n if (this._textWrapper.text && this._textWrapper.length > 0 && this._cursorOffset > 0) {\n const deletePosition = this._textWrapper.length - this._cursorOffset;\n this._textWrapper.removePart(deletePosition, deletePosition + 1);\n this._textHasChanged();\n this._cursorOffset--;\n }\n if (evt) {\n evt.preventDefault();\n }\n return;\n case 13: // RETURN\n this._host.focusedControl = null;\n this.isTextHighlightOn = false;\n return;\n case 35: // END\n this._cursorOffset = 0;\n this._blinkIsEven = false;\n this.isTextHighlightOn = false;\n this._markAsDirty();\n return;\n case 36: // HOME\n this._cursorOffset = this._textWrapper.length;\n this._blinkIsEven = false;\n this.isTextHighlightOn = false;\n this._markAsDirty();\n return;\n case 37: // LEFT\n this._cursorOffset++;\n if (this._cursorOffset > this._textWrapper.length) {\n this._cursorOffset = this._textWrapper.length;\n }\n if (evt && evt.shiftKey) {\n // update the cursor\n this._blinkIsEven = false;\n // shift + ctrl/cmd + <-\n if (evt.ctrlKey || evt.metaKey) {\n if (!this.isTextHighlightOn) {\n if (this._textWrapper.length === this._cursorOffset) {\n return;\n }\n else {\n this._endHighlightIndex = this._textWrapper.length - this._cursorOffset + 1;\n }\n }\n this._startHighlightIndex = 0;\n this._cursorIndex = this._textWrapper.length - this._endHighlightIndex;\n this._cursorOffset = this._textWrapper.length;\n this.isTextHighlightOn = true;\n this._markAsDirty();\n return;\n }\n //store the starting point\n if (!this.isTextHighlightOn) {\n this.isTextHighlightOn = true;\n this._cursorIndex = this._cursorOffset >= this._textWrapper.length ? this._textWrapper.length : this._cursorOffset - 1;\n }\n //if text is already highlighted\n else if (this._cursorIndex === -1) {\n this._cursorIndex = this._textWrapper.length - this._endHighlightIndex;\n this._cursorOffset = this._startHighlightIndex === 0 ? this._textWrapper.length : this._textWrapper.length - this._startHighlightIndex + 1;\n }\n //set the highlight indexes\n if (this._cursorIndex < this._cursorOffset) {\n this._endHighlightIndex = this._textWrapper.length - this._cursorIndex;\n this._startHighlightIndex = this._textWrapper.length - this._cursorOffset;\n }\n else if (this._cursorIndex > this._cursorOffset) {\n this._endHighlightIndex = this._textWrapper.length - this._cursorOffset;\n this._startHighlightIndex = this._textWrapper.length - this._cursorIndex;\n }\n else {\n this.isTextHighlightOn = false;\n }\n this._markAsDirty();\n return;\n }\n if (this.isTextHighlightOn) {\n this._cursorOffset = this._textWrapper.length - this._startHighlightIndex;\n this.isTextHighlightOn = false;\n }\n if (evt && (evt.ctrlKey || evt.metaKey)) {\n this._cursorOffset = this._textWrapper.length;\n evt.preventDefault();\n }\n this._blinkIsEven = false;\n this.isTextHighlightOn = false;\n this._cursorIndex = -1;\n this._markAsDirty();\n return;\n case 39: // RIGHT\n this._cursorOffset--;\n if (this._cursorOffset < 0) {\n this._cursorOffset = 0;\n }\n if (evt && evt.shiftKey) {\n //update the cursor\n this._blinkIsEven = false;\n //shift + ctrl/cmd + ->\n if (evt.ctrlKey || evt.metaKey) {\n if (!this.isTextHighlightOn) {\n if (this._cursorOffset === 0) {\n return;\n }\n else {\n this._startHighlightIndex = this._textWrapper.length - this._cursorOffset - 1;\n }\n }\n this._endHighlightIndex = this._textWrapper.length;\n this.isTextHighlightOn = true;\n this._cursorIndex = this._textWrapper.length - this._startHighlightIndex;\n this._cursorOffset = 0;\n this._markAsDirty();\n return;\n }\n if (!this.isTextHighlightOn) {\n this.isTextHighlightOn = true;\n this._cursorIndex = this._cursorOffset <= 0 ? 0 : this._cursorOffset + 1;\n }\n //if text is already highlighted\n else if (this._cursorIndex === -1) {\n this._cursorIndex = this._textWrapper.length - this._startHighlightIndex;\n this._cursorOffset = this._textWrapper.length === this._endHighlightIndex ? 0 : this._textWrapper.length - this._endHighlightIndex - 1;\n }\n //set the highlight indexes\n if (this._cursorIndex < this._cursorOffset) {\n this._endHighlightIndex = this._textWrapper.length - this._cursorIndex;\n this._startHighlightIndex = this._textWrapper.length - this._cursorOffset;\n }\n else if (this._cursorIndex > this._cursorOffset) {\n this._endHighlightIndex = this._textWrapper.length - this._cursorOffset;\n this._startHighlightIndex = this._textWrapper.length - this._cursorIndex;\n }\n else {\n this.isTextHighlightOn = false;\n }\n this._markAsDirty();\n return;\n }\n if (this.isTextHighlightOn) {\n this._cursorOffset = this._textWrapper.length - this._endHighlightIndex;\n this.isTextHighlightOn = false;\n }\n //ctr + ->\n if (evt && (evt.ctrlKey || evt.metaKey)) {\n this._cursorOffset = 0;\n evt.preventDefault();\n }\n this._blinkIsEven = false;\n this.isTextHighlightOn = false;\n this._cursorIndex = -1;\n this._markAsDirty();\n return;\n }\n if (keyCode === 32) {\n key = (_a = evt === null || evt === void 0 ? void 0 : evt.key) !== null && _a !== void 0 ? _a : \" \";\n }\n this._deadKey = key === \"Dead\";\n // Printable characters\n if (key &&\n (keyCode === -1 || // Direct access\n keyCode === 32 || // Space\n keyCode === 34 || // \" add support for single and double quotes\n keyCode === 39 || // '\n (keyCode > 47 && keyCode < 64) || // Numbers\n (keyCode > 64 && keyCode < 91) || // Letters\n (keyCode > 159 && keyCode < 193) || // Special characters\n (keyCode > 218 && keyCode < 223) || // Special characters\n (keyCode > 95 && keyCode < 112))) {\n // Numpad\n this._currentKey = key;\n this.onBeforeKeyAddObservable.notifyObservers(this);\n key = this._currentKey;\n if (this._addKey && !this._deadKey) {\n if (this.isTextHighlightOn) {\n this._textWrapper.removePart(this._startHighlightIndex, this._endHighlightIndex, key);\n this._textHasChanged();\n this._cursorOffset = this._textWrapper.length - (this._startHighlightIndex + 1);\n this.isTextHighlightOn = false;\n this._blinkIsEven = false;\n this._markAsDirty();\n }\n else if (this._cursorOffset === 0) {\n this.text += this._deadKey && (evt === null || evt === void 0 ? void 0 : evt.key) ? evt.key : key;\n }\n else {\n const insertPosition = this._textWrapper.length - this._cursorOffset;\n this._textWrapper.removePart(insertPosition, insertPosition, key);\n this._textHasChanged();\n }\n }\n }\n }\n /**\n * @internal\n */\n _updateValueFromCursorIndex(offset) {\n //update the cursor\n this._blinkIsEven = false;\n if (this._cursorIndex === -1) {\n this._cursorIndex = offset;\n }\n else {\n if (this._cursorIndex < this._cursorOffset) {\n this._endHighlightIndex = this._textWrapper.length - this._cursorIndex;\n this._startHighlightIndex = this._textWrapper.length - this._cursorOffset;\n }\n else if (this._cursorIndex > this._cursorOffset) {\n this._endHighlightIndex = this._textWrapper.length - this._cursorOffset;\n this._startHighlightIndex = this._textWrapper.length - this._cursorIndex;\n }\n else {\n this.isTextHighlightOn = false;\n this._markAsDirty();\n return;\n }\n }\n this.isTextHighlightOn = true;\n this._markAsDirty();\n }\n /**\n * @internal\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _processDblClick(evt) {\n //pre-find the start and end index of the word under cursor, speeds up the rendering\n this._startHighlightIndex = this._textWrapper.length - this._cursorOffset;\n this._endHighlightIndex = this._startHighlightIndex;\n let moveLeft, moveRight;\n do {\n moveRight = this._endHighlightIndex < this._textWrapper.length && this._textWrapper.isWord(this._endHighlightIndex) ? ++this._endHighlightIndex : 0;\n moveLeft = this._startHighlightIndex > 0 && this._textWrapper.isWord(this._startHighlightIndex - 1) ? --this._startHighlightIndex : 0;\n } while (moveLeft || moveRight);\n this._cursorOffset = this._textWrapper.length - this._startHighlightIndex;\n this.isTextHighlightOn = true;\n this._clickedCoordinate = null;\n this._blinkIsEven = true;\n this._cursorIndex = -1;\n this._markAsDirty();\n }\n /** @internal */\n _selectAllText() {\n this._blinkIsEven = true;\n this.isTextHighlightOn = true;\n this._startHighlightIndex = 0;\n this._endHighlightIndex = this._textWrapper.length;\n this._cursorOffset = this._textWrapper.length;\n this._cursorIndex = -1;\n this._markAsDirty();\n }\n /**\n * Handles the keyboard event\n * @param evt Defines the KeyboardEvent\n */\n processKeyboard(evt) {\n // process pressed key\n this.processKey(evt.keyCode, evt.key, evt);\n this.onKeyboardEventProcessedObservable.notifyObservers(evt);\n }\n /**\n * @internal\n */\n _onCopyText(ev) {\n this.isTextHighlightOn = false;\n //when write permission to clipbaord data is denied\n try {\n ev.clipboardData && ev.clipboardData.setData(\"text/plain\", this._highlightedText);\n }\n catch (_a) { } //pass\n this._host.clipboardData = this._highlightedText;\n }\n /**\n * @internal\n */\n _onCutText(ev) {\n if (!this._highlightedText) {\n return;\n }\n this._textWrapper.removePart(this._startHighlightIndex, this._endHighlightIndex);\n this._textHasChanged();\n this.isTextHighlightOn = false;\n this._cursorOffset = this._textWrapper.length - this._startHighlightIndex;\n //when write permission to clipbaord data is denied\n try {\n ev.clipboardData && ev.clipboardData.setData(\"text/plain\", this._highlightedText);\n }\n catch (_a) { } //pass\n this._host.clipboardData = this._highlightedText;\n this._highlightedText = \"\";\n }\n /**\n * @internal\n */\n _onPasteText(ev) {\n let data = \"\";\n if (ev.clipboardData && ev.clipboardData.types.indexOf(\"text/plain\") !== -1) {\n data = ev.clipboardData.getData(\"text/plain\");\n }\n else {\n //get the cached data; returns blank string by default\n data = this._host.clipboardData;\n }\n const insertPosition = this._textWrapper.length - this._cursorOffset;\n this._textWrapper.removePart(insertPosition, insertPosition, data);\n this._textHasChanged();\n }\n _draw(context) {\n context.save();\n this._applyStates(context);\n if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {\n context.shadowColor = this.shadowColor;\n context.shadowBlur = this.shadowBlur;\n context.shadowOffsetX = this.shadowOffsetX;\n context.shadowOffsetY = this.shadowOffsetY;\n }\n // Background\n if (this._isFocused) {\n if (this._focusedBackground) {\n context.fillStyle = this._isEnabled ? this._focusedBackground : this._disabledColor;\n context.fillRect(this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);\n }\n }\n else if (this._background) {\n context.fillStyle = this._isEnabled ? this._background : this._disabledColor;\n context.fillRect(this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);\n }\n if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {\n context.shadowBlur = 0;\n context.shadowOffsetX = 0;\n context.shadowOffsetY = 0;\n }\n if (!this._fontOffset || this._wasDirty) {\n this._fontOffset = Control._GetFontOffset(context.font);\n }\n // Text\n const clipTextLeft = this._currentMeasure.left + this._margin.getValueInPixel(this._host, this._tempParentMeasure.width);\n if (this.color) {\n context.fillStyle = this.color;\n }\n let text = this._beforeRenderText(this._textWrapper);\n if (!this._isFocused && !this._textWrapper.text && this._placeholderText) {\n text = new TextWrapper();\n text.text = this._placeholderText;\n if (this._placeholderColor) {\n context.fillStyle = this._placeholderColor;\n }\n }\n this._textWidth = context.measureText(text.text).width;\n const marginWidth = this._margin.getValueInPixel(this._host, this._tempParentMeasure.width) * 2;\n if (this._autoStretchWidth) {\n this.width = Math.min(this._maxWidth.getValueInPixel(this._host, this._tempParentMeasure.width), this._textWidth + marginWidth) + \"px\";\n this._autoStretchWidth = true; // setting the width will have reset _autoStretchWidth to false!\n }\n const rootY = this._fontOffset.ascent + (this._currentMeasure.height - this._fontOffset.height) / 2;\n const availableWidth = this._width.getValueInPixel(this._host, this._tempParentMeasure.width) - marginWidth;\n context.save();\n context.beginPath();\n context.rect(clipTextLeft, this._currentMeasure.top + (this._currentMeasure.height - this._fontOffset.height) / 2, availableWidth + 2, this._currentMeasure.height);\n context.clip();\n if (this._isFocused && this._textWidth > availableWidth) {\n const textLeft = clipTextLeft - this._textWidth + availableWidth;\n if (!this._scrollLeft) {\n this._scrollLeft = textLeft;\n }\n }\n else {\n this._scrollLeft = clipTextLeft;\n }\n context.fillText(text.text, this._scrollLeft, this._currentMeasure.top + rootY);\n // Cursor\n if (this._isFocused) {\n // Need to move cursor\n if (this._clickedCoordinate) {\n const rightPosition = this._scrollLeft + this._textWidth;\n const absoluteCursorPosition = rightPosition - this._clickedCoordinate;\n let currentSize = 0;\n this._cursorOffset = 0;\n let previousDist = 0;\n do {\n if (this._cursorOffset) {\n previousDist = Math.abs(absoluteCursorPosition - currentSize);\n }\n this._cursorOffset++;\n currentSize = context.measureText(text.substr(text.length - this._cursorOffset, this._cursorOffset)).width;\n } while (currentSize < absoluteCursorPosition && text.length >= this._cursorOffset);\n // Find closest move\n if (Math.abs(absoluteCursorPosition - currentSize) > previousDist) {\n this._cursorOffset--;\n }\n this._blinkIsEven = false;\n this._clickedCoordinate = null;\n }\n // Render cursor\n if (!this._blinkIsEven) {\n const cursorOffsetText = text.substr(text.length - this._cursorOffset);\n const cursorOffsetWidth = context.measureText(cursorOffsetText).width;\n let cursorLeft = this._scrollLeft + this._textWidth - cursorOffsetWidth;\n if (cursorLeft < clipTextLeft) {\n this._scrollLeft += clipTextLeft - cursorLeft;\n cursorLeft = clipTextLeft;\n this._markAsDirty();\n }\n else if (cursorLeft > clipTextLeft + availableWidth) {\n this._scrollLeft += clipTextLeft + availableWidth - cursorLeft;\n cursorLeft = clipTextLeft + availableWidth;\n this._markAsDirty();\n }\n if (!this.isTextHighlightOn) {\n context.fillRect(cursorLeft, this._currentMeasure.top + (this._currentMeasure.height - this._fontOffset.height) / 2, 2, this._fontOffset.height);\n }\n }\n clearTimeout(this._blinkTimeout);\n this._blinkTimeout = setTimeout(() => {\n this._blinkIsEven = !this._blinkIsEven;\n this._markAsDirty();\n }, 500);\n //show the highlighted text\n if (this.isTextHighlightOn) {\n clearTimeout(this._blinkTimeout);\n const highlightCursorOffsetWidth = context.measureText(text.substring(this._startHighlightIndex)).width;\n let highlightCursorLeft = this._scrollLeft + this._textWidth - highlightCursorOffsetWidth;\n this._highlightedText = text.substring(this._startHighlightIndex, this._endHighlightIndex);\n let width = context.measureText(text.substring(this._startHighlightIndex, this._endHighlightIndex)).width;\n if (highlightCursorLeft < clipTextLeft) {\n width = width - (clipTextLeft - highlightCursorLeft);\n if (!width) {\n // when using left arrow on text.length > availableWidth;\n // assigns the width of the first letter after clipTextLeft\n width = context.measureText(text.charAt(text.length - this._cursorOffset)).width;\n }\n highlightCursorLeft = clipTextLeft;\n }\n //for transparancy\n context.globalAlpha = this._highligherOpacity;\n context.fillStyle = this._textHighlightColor;\n context.fillRect(highlightCursorLeft, this._currentMeasure.top + (this._currentMeasure.height - this._fontOffset.height) / 2, width, this._fontOffset.height);\n context.globalAlpha = 1.0;\n }\n }\n context.restore();\n // Border\n if (this._thickness) {\n if (this._isFocused) {\n if (this.focusedColor) {\n context.strokeStyle = this.focusedColor;\n }\n }\n else {\n if (this.color) {\n context.strokeStyle = this.color;\n }\n }\n context.lineWidth = this._thickness;\n context.strokeRect(this._currentMeasure.left + this._thickness / 2, this._currentMeasure.top + this._thickness / 2, this._currentMeasure.width - this._thickness, this._currentMeasure.height - this._thickness);\n }\n context.restore();\n }\n _onPointerDown(target, coordinates, pointerId, buttonIndex, pi) {\n if (!super._onPointerDown(target, coordinates, pointerId, buttonIndex, pi)) {\n return false;\n }\n if (this.isReadOnly) {\n return true;\n }\n this._clickedCoordinate = coordinates.x;\n this.isTextHighlightOn = false;\n this._highlightedText = \"\";\n this._cursorIndex = -1;\n this._isPointerDown = true;\n this._host._capturingControl[pointerId] = this;\n this._focusedBy = pi.event.pointerType;\n if (this._host.focusedControl === this) {\n // Move cursor\n clearTimeout(this._blinkTimeout);\n this._markAsDirty();\n return true;\n }\n if (!this._isEnabled) {\n return false;\n }\n this._host.focusedControl = this;\n return true;\n }\n _onPointerMove(target, coordinates, pointerId, pi) {\n if (this._host.focusedControl === this && this._isPointerDown && !this.isReadOnly) {\n this._clickedCoordinate = coordinates.x;\n this._markAsDirty();\n this._updateValueFromCursorIndex(this._cursorOffset);\n }\n super._onPointerMove(target, coordinates, pointerId, pi);\n }\n _onPointerUp(target, coordinates, pointerId, buttonIndex, notifyClick) {\n this._isPointerDown = false;\n delete this._host._capturingControl[pointerId];\n super._onPointerUp(target, coordinates, pointerId, buttonIndex, notifyClick);\n }\n _beforeRenderText(textWrapper) {\n return textWrapper;\n }\n /** @internal */\n set isTextHighlightOn(value) {\n if (this._isTextHighlightOn === value) {\n return;\n }\n if (value) {\n this.onTextHighlightObservable.notifyObservers(this);\n }\n this._isTextHighlightOn = value;\n }\n /** @internal */\n get isTextHighlightOn() {\n return this._isTextHighlightOn;\n }\n dispose() {\n super.dispose();\n this.onBlurObservable.clear();\n this.onFocusObservable.clear();\n this.onTextChangedObservable.clear();\n this.onTextCopyObservable.clear();\n this.onTextCutObservable.clear();\n this.onTextPasteObservable.clear();\n this.onTextHighlightObservable.clear();\n this.onKeyboardEventProcessedObservable.clear();\n }\n}\n__decorate([\n serialize()\n], InputText.prototype, \"promptMessage\", void 0);\n__decorate([\n serialize()\n], InputText.prototype, \"disableMobilePrompt\", void 0);\n__decorate([\n serialize()\n], InputText.prototype, \"maxWidth\", null);\n__decorate([\n serialize()\n], InputText.prototype, \"highligherOpacity\", null);\n__decorate([\n serialize()\n], InputText.prototype, \"onFocusSelectAll\", null);\n__decorate([\n serialize()\n], InputText.prototype, \"textHighlightColor\", null);\n__decorate([\n serialize()\n], InputText.prototype, \"margin\", null);\n__decorate([\n serialize()\n], InputText.prototype, \"autoStretchWidth\", null);\n__decorate([\n serialize()\n], InputText.prototype, \"thickness\", null);\n__decorate([\n serialize()\n], InputText.prototype, \"focusedBackground\", null);\n__decorate([\n serialize()\n], InputText.prototype, \"focusedColor\", null);\n__decorate([\n serialize()\n], InputText.prototype, \"background\", null);\n__decorate([\n serialize()\n], InputText.prototype, \"placeholderColor\", null);\n__decorate([\n serialize()\n], InputText.prototype, \"placeholderText\", null);\n__decorate([\n serialize()\n], InputText.prototype, \"deadKey\", null);\n__decorate([\n serialize()\n], InputText.prototype, \"text\", null);\n__decorate([\n serialize()\n], InputText.prototype, \"width\", null);\nRegisterClass(\"BABYLON.GUI.InputText\", InputText);\n//# sourceMappingURL=inputText.js.map","import { __decorate } from \"@babylonjs/core/tslib.es6.js\";\nimport { Observable } from \"@babylonjs/core/Misc/observable.js\";\nimport { Control } from \"./control.js\";\nimport { InputText } from \"./inputText.js\";\nimport { Rectangle } from \"./rectangle.js\";\nimport { Button } from \"./button.js\";\nimport { Grid } from \"./grid.js\";\nimport { TextBlock } from \"../controls/textBlock.js\";\nimport { RegisterClass } from \"@babylonjs/core/Misc/typeStore.js\";\nimport { Color3 } from \"@babylonjs/core/Maths/math.color.js\";\nimport { serialize } from \"@babylonjs/core/Misc/decorators.js\";\nimport { EngineStore } from \"@babylonjs/core/Engines/engineStore.js\";\n/** Class used to create color pickers */\nexport class ColorPicker extends Control {\n /** Gets or sets the color of the color picker */\n get value() {\n return this._value;\n }\n set value(value) {\n if (this._value.equals(value)) {\n return;\n }\n this._value.copyFrom(value);\n this._value.toHSVToRef(this._tmpColor);\n this._h = this._tmpColor.r;\n this._s = Math.max(this._tmpColor.g, 0.00001);\n this._v = Math.max(this._tmpColor.b, 0.00001);\n this._markAsDirty();\n if (this._value.r <= ColorPicker._Epsilon) {\n this._value.r = 0;\n }\n if (this._value.g <= ColorPicker._Epsilon) {\n this._value.g = 0;\n }\n if (this._value.b <= ColorPicker._Epsilon) {\n this._value.b = 0;\n }\n if (this._value.r >= 1.0 - ColorPicker._Epsilon) {\n this._value.r = 1.0;\n }\n if (this._value.g >= 1.0 - ColorPicker._Epsilon) {\n this._value.g = 1.0;\n }\n if (this._value.b >= 1.0 - ColorPicker._Epsilon) {\n this._value.b = 1.0;\n }\n this.onValueChangedObservable.notifyObservers(this._value);\n }\n /**\n * Gets or sets control width\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\n */\n get width() {\n return this._width.toString(this._host);\n }\n set width(value) {\n if (this._width.toString(this._host) === value) {\n return;\n }\n if (this._width.fromString(value)) {\n if (this._width.getValue(this._host) === 0) {\n value = \"1px\";\n this._width.fromString(value);\n }\n this._height.fromString(value);\n this._markAsDirty();\n }\n }\n /**\n * Gets or sets control height\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\n */\n get height() {\n return this._height.toString(this._host);\n }\n /** Gets or sets control height */\n set height(value) {\n if (this._height.toString(this._host) === value) {\n return;\n }\n if (this._height.fromString(value)) {\n if (this._height.getValue(this._host) === 0) {\n value = \"1px\";\n this._height.fromString(value);\n }\n this._width.fromString(value);\n this._markAsDirty();\n }\n }\n /** Gets or sets control size */\n get size() {\n return this.width;\n }\n set size(value) {\n this.width = value;\n }\n /**\n * Creates a new ColorPicker\n * @param name defines the control name\n */\n constructor(name) {\n super(name);\n this.name = name;\n this._value = Color3.Red();\n this._tmpColor = new Color3();\n this._pointerStartedOnSquare = false;\n this._pointerStartedOnWheel = false;\n this._squareLeft = 0;\n this._squareTop = 0;\n this._squareSize = 0;\n this._h = 360;\n this._s = 1;\n this._v = 1;\n this._lastPointerDownId = -1;\n /**\n * Observable raised when the value changes\n */\n this.onValueChangedObservable = new Observable();\n // Events\n this._pointerIsDown = false;\n this.value = new Color3(0.88, 0.1, 0.1);\n this.size = \"200px\";\n this.isPointerBlocker = true;\n }\n _getTypeName() {\n return \"ColorPicker\";\n }\n /**\n * @internal\n */\n _preMeasure(parentMeasure) {\n if (parentMeasure.width < parentMeasure.height) {\n this._currentMeasure.height = parentMeasure.width;\n }\n else {\n this._currentMeasure.width = parentMeasure.height;\n }\n }\n _updateSquareProps() {\n const radius = Math.min(this._currentMeasure.width, this._currentMeasure.height) * 0.5;\n const wheelThickness = radius * 0.2;\n const innerDiameter = (radius - wheelThickness) * 2;\n const squareSize = innerDiameter / Math.sqrt(2);\n const offset = radius - squareSize * 0.5;\n this._squareLeft = this._currentMeasure.left + offset;\n this._squareTop = this._currentMeasure.top + offset;\n this._squareSize = squareSize;\n }\n _drawGradientSquare(hueValue, left, top, width, height, context) {\n const lgh = context.createLinearGradient(left, top, width + left, top);\n lgh.addColorStop(0, \"#fff\");\n lgh.addColorStop(1, \"hsl(\" + hueValue + \", 100%, 50%)\");\n context.fillStyle = lgh;\n context.fillRect(left, top, width, height);\n const lgv = context.createLinearGradient(left, top, left, height + top);\n lgv.addColorStop(0, \"rgba(0,0,0,0)\");\n lgv.addColorStop(1, \"#000\");\n context.fillStyle = lgv;\n context.fillRect(left, top, width, height);\n }\n _drawCircle(centerX, centerY, radius, context) {\n context.beginPath();\n context.arc(centerX, centerY, radius + 1, 0, 2 * Math.PI, false);\n context.lineWidth = 3;\n context.strokeStyle = \"#333333\";\n context.stroke();\n context.beginPath();\n context.arc(centerX, centerY, radius, 0, 2 * Math.PI, false);\n context.lineWidth = 3;\n context.strokeStyle = \"#ffffff\";\n context.stroke();\n }\n _createColorWheelCanvas(radius, thickness) {\n // Shoudl abstract platform instead of using LastCreatedEngine\n const engine = EngineStore.LastCreatedEngine;\n if (!engine) {\n throw new Error(\"Invalid engine. Unable to create a canvas.\");\n }\n const canvas = engine.createCanvas(radius * 2, radius * 2);\n const context = canvas.getContext(\"2d\");\n const image = context.getImageData(0, 0, radius * 2, radius * 2);\n const data = image.data;\n const color = this._tmpColor;\n const maxDistSq = radius * radius;\n const innerRadius = radius - thickness;\n const minDistSq = innerRadius * innerRadius;\n for (let x = -radius; x < radius; x++) {\n for (let y = -radius; y < radius; y++) {\n const distSq = x * x + y * y;\n if (distSq > maxDistSq || distSq < minDistSq) {\n continue;\n }\n const dist = Math.sqrt(distSq);\n const ang = Math.atan2(y, x);\n Color3.HSVtoRGBToRef((ang * 180) / Math.PI + 180, dist / radius, 1, color);\n const index = (x + radius + (y + radius) * 2 * radius) * 4;\n data[index] = color.r * 255;\n data[index + 1] = color.g * 255;\n data[index + 2] = color.b * 255;\n let alphaRatio = (dist - innerRadius) / (radius - innerRadius);\n //apply less alpha to bigger color pickers\n let alphaAmount = 0.2;\n const maxAlpha = 0.2;\n const minAlpha = 0.04;\n const lowerRadius = 50;\n const upperRadius = 150;\n if (radius < lowerRadius) {\n alphaAmount = maxAlpha;\n }\n else if (radius > upperRadius) {\n alphaAmount = minAlpha;\n }\n else {\n alphaAmount = ((minAlpha - maxAlpha) * (radius - lowerRadius)) / (upperRadius - lowerRadius) + maxAlpha;\n }\n alphaRatio = (dist - innerRadius) / (radius - innerRadius);\n if (alphaRatio < alphaAmount) {\n data[index + 3] = 255 * (alphaRatio / alphaAmount);\n }\n else if (alphaRatio > 1 - alphaAmount) {\n data[index + 3] = 255 * (1.0 - (alphaRatio - (1 - alphaAmount)) / alphaAmount);\n }\n else {\n data[index + 3] = 255;\n }\n }\n }\n context.putImageData(image, 0, 0);\n return canvas;\n }\n /**\n * @internal\n */\n _draw(context) {\n context.save();\n this._applyStates(context);\n const radius = Math.min(this._currentMeasure.width, this._currentMeasure.height) * 0.5;\n const wheelThickness = radius * 0.2;\n const left = this._currentMeasure.left;\n const top = this._currentMeasure.top;\n if (!this._colorWheelCanvas || this._colorWheelCanvas.width != radius * 2) {\n this._colorWheelCanvas = this._createColorWheelCanvas(radius, wheelThickness);\n }\n this._updateSquareProps();\n if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {\n context.shadowColor = this.shadowColor;\n context.shadowBlur = this.shadowBlur;\n context.shadowOffsetX = this.shadowOffsetX;\n context.shadowOffsetY = this.shadowOffsetY;\n context.fillRect(this._squareLeft, this._squareTop, this._squareSize, this._squareSize);\n }\n context.drawImage(this._colorWheelCanvas, left, top);\n if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {\n context.shadowBlur = 0;\n context.shadowOffsetX = 0;\n context.shadowOffsetY = 0;\n }\n this._drawGradientSquare(this._h, this._squareLeft, this._squareTop, this._squareSize, this._squareSize, context);\n let cx = this._squareLeft + this._squareSize * this._s;\n let cy = this._squareTop + this._squareSize * (1 - this._v);\n this._drawCircle(cx, cy, radius * 0.04, context);\n const dist = radius - wheelThickness * 0.5;\n cx = left + radius + Math.cos(((this._h - 180) * Math.PI) / 180) * dist;\n cy = top + radius + Math.sin(((this._h - 180) * Math.PI) / 180) * dist;\n this._drawCircle(cx, cy, wheelThickness * 0.35, context);\n context.restore();\n }\n _updateValueFromPointer(x, y) {\n if (this._pointerStartedOnWheel) {\n const radius = Math.min(this._currentMeasure.width, this._currentMeasure.height) * 0.5;\n const centerX = radius + this._currentMeasure.left;\n const centerY = radius + this._currentMeasure.top;\n this._h = (Math.atan2(y - centerY, x - centerX) * 180) / Math.PI + 180;\n }\n else if (this._pointerStartedOnSquare) {\n this._updateSquareProps();\n this._s = (x - this._squareLeft) / this._squareSize;\n this._v = 1 - (y - this._squareTop) / this._squareSize;\n this._s = Math.min(this._s, 1);\n this._s = Math.max(this._s, ColorPicker._Epsilon);\n this._v = Math.min(this._v, 1);\n this._v = Math.max(this._v, ColorPicker._Epsilon);\n }\n Color3.HSVtoRGBToRef(this._h, this._s, this._v, this._tmpColor);\n this.value = this._tmpColor;\n }\n _isPointOnSquare(x, y) {\n this._updateSquareProps();\n const left = this._squareLeft;\n const top = this._squareTop;\n const size = this._squareSize;\n if (x >= left && x <= left + size && y >= top && y <= top + size) {\n return true;\n }\n return false;\n }\n _isPointOnWheel(x, y) {\n const radius = Math.min(this._currentMeasure.width, this._currentMeasure.height) * 0.5;\n const centerX = radius + this._currentMeasure.left;\n const centerY = radius + this._currentMeasure.top;\n const wheelThickness = radius * 0.2;\n const innerRadius = radius - wheelThickness;\n const radiusSq = radius * radius;\n const innerRadiusSq = innerRadius * innerRadius;\n const dx = x - centerX;\n const dy = y - centerY;\n const distSq = dx * dx + dy * dy;\n if (distSq <= radiusSq && distSq >= innerRadiusSq) {\n return true;\n }\n return false;\n }\n _onPointerDown(target, coordinates, pointerId, buttonIndex, pi) {\n if (!super._onPointerDown(target, coordinates, pointerId, buttonIndex, pi)) {\n return false;\n }\n if (this.isReadOnly) {\n return true;\n }\n this._pointerIsDown = true;\n this._pointerStartedOnSquare = false;\n this._pointerStartedOnWheel = false;\n // Invert transform\n this._invertTransformMatrix.transformCoordinates(coordinates.x, coordinates.y, this._transformedPosition);\n const x = this._transformedPosition.x;\n const y = this._transformedPosition.y;\n if (this._isPointOnSquare(x, y)) {\n this._pointerStartedOnSquare = true;\n }\n else if (this._isPointOnWheel(x, y)) {\n this._pointerStartedOnWheel = true;\n }\n this._updateValueFromPointer(x, y);\n this._host._capturingControl[pointerId] = this;\n this._lastPointerDownId = pointerId;\n return true;\n }\n _onPointerMove(target, coordinates, pointerId, pi) {\n // Only listen to pointer move events coming from the last pointer to click on the element (To support dual vr controller interaction)\n if (pointerId != this._lastPointerDownId) {\n return;\n }\n if (!this.isReadOnly) {\n // Invert transform\n this._invertTransformMatrix.transformCoordinates(coordinates.x, coordinates.y, this._transformedPosition);\n const x = this._transformedPosition.x;\n const y = this._transformedPosition.y;\n if (this._pointerIsDown) {\n this._updateValueFromPointer(x, y);\n }\n }\n super._onPointerMove(target, coordinates, pointerId, pi);\n }\n _onPointerUp(target, coordinates, pointerId, buttonIndex, notifyClick, pi) {\n this._pointerIsDown = false;\n delete this._host._capturingControl[pointerId];\n super._onPointerUp(target, coordinates, pointerId, buttonIndex, notifyClick, pi);\n }\n _onCanvasBlur() {\n this._forcePointerUp();\n super._onCanvasBlur();\n }\n /**\n * This function expands the color picker by creating a color picker dialog with manual\n * color value input and the ability to save colors into an array to be used later in\n * subsequent launches of the dialogue.\n * @param advancedTexture defines the AdvancedDynamicTexture the dialog is assigned to\n * @param options defines size for dialog and options for saved colors. Also accepts last color picked as hex string and saved colors array as hex strings.\n * @param options.pickerWidth\n * @param options.pickerHeight\n * @param options.headerHeight\n * @param options.lastColor\n * @param options.swatchLimit\n * @param options.numSwatchesPerLine\n * @param options.savedColors\n * @returns picked color as a hex string and the saved colors array as hex strings.\n */\n static ShowPickerDialogAsync(advancedTexture, options) {\n return new Promise((resolve) => {\n // Default options\n options.pickerWidth = options.pickerWidth || \"640px\";\n options.pickerHeight = options.pickerHeight || \"400px\";\n options.headerHeight = options.headerHeight || \"35px\";\n options.lastColor = options.lastColor || \"#000000\";\n options.swatchLimit = options.swatchLimit || 20;\n options.numSwatchesPerLine = options.numSwatchesPerLine || 10;\n // Window size settings\n const drawerMaxRows = options.swatchLimit / options.numSwatchesPerLine;\n const rawSwatchSize = parseFloat(options.pickerWidth) / options.numSwatchesPerLine;\n const gutterSize = Math.floor(rawSwatchSize * 0.25);\n const colGutters = gutterSize * (options.numSwatchesPerLine + 1);\n const swatchSize = Math.floor((parseFloat(options.pickerWidth) - colGutters) / options.numSwatchesPerLine);\n const drawerMaxSize = swatchSize * drawerMaxRows + gutterSize * (drawerMaxRows + 1);\n const containerSize = (parseInt(options.pickerHeight) + drawerMaxSize + Math.floor(swatchSize * 0.25)).toString() + \"px\";\n // Button Colors\n const buttonColor = \"#c0c0c0\";\n const buttonBackgroundColor = \"#535353\";\n const buttonBackgroundHoverColor = \"#414141\";\n const buttonBackgroundClickColor = \"515151\";\n const buttonDisabledColor = \"#555555\";\n const buttonDisabledBackgroundColor = \"#454545\";\n const currentSwatchesOutlineColor = \"#404040\";\n const luminanceLimitColor = Color3.FromHexString(\"#dddddd\");\n const luminanceLimit = luminanceLimitColor.r + luminanceLimitColor.g + luminanceLimitColor.b;\n const iconColorDark = \"#aaaaaa\";\n const iconColorLight = \"#ffffff\";\n // Button settings\n let buttonFontSize;\n let butEdit;\n // Input Text Colors\n const inputFieldLabels = [\"R\", \"G\", \"B\"];\n const inputTextBackgroundColor = \"#454545\";\n const inputTextColor = \"#f0f0f0\";\n // This int is used for naming swatches and serves as the index for calling them from the list\n let swatchNumber;\n // Menu Panel options. We need to know if the swatchDrawer exists so we can create it if needed.\n let swatchDrawer;\n let editSwatchMode = false;\n // Color InputText fields that will be updated upon value change\n let butSave;\n let lastVal;\n let activeField;\n // Dialog menu container which will contain both the main dialogue window and the swatch drawer which opens once a color is saved.\n const dialogContainer = new Grid();\n dialogContainer.name = \"Dialog Container\";\n dialogContainer.width = options.pickerWidth;\n if (options.savedColors) {\n dialogContainer.height = containerSize;\n const topRow = parseInt(options.pickerHeight) / parseInt(containerSize);\n dialogContainer.addRowDefinition(topRow, false);\n dialogContainer.addRowDefinition(1.0 - topRow, false);\n }\n else {\n dialogContainer.height = options.pickerHeight;\n dialogContainer.addRowDefinition(1.0, false);\n }\n advancedTexture.addControl(dialogContainer);\n // Swatch drawer which contains all saved color buttons\n if (options.savedColors) {\n swatchDrawer = new Grid();\n swatchDrawer.name = \"Swatch Drawer\";\n swatchDrawer.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP;\n swatchDrawer.background = buttonBackgroundColor;\n swatchDrawer.width = options.pickerWidth;\n const initialRows = options.savedColors.length / options.numSwatchesPerLine;\n let gutterCount;\n if (initialRows == 0) {\n gutterCount = 0;\n }\n else {\n gutterCount = initialRows + 1;\n }\n swatchDrawer.height = (swatchSize * initialRows + gutterCount * gutterSize).toString() + \"px\";\n swatchDrawer.top = Math.floor(swatchSize * 0.25).toString() + \"px\";\n for (let i = 0; i < Math.ceil(options.savedColors.length / options.numSwatchesPerLine) * 2 + 1; i++) {\n if (i % 2 != 0) {\n swatchDrawer.addRowDefinition(swatchSize, true);\n }\n else {\n swatchDrawer.addRowDefinition(gutterSize, true);\n }\n }\n for (let i = 0; i < options.numSwatchesPerLine * 2 + 1; i++) {\n if (i % 2 != 0) {\n swatchDrawer.addColumnDefinition(swatchSize, true);\n }\n else {\n swatchDrawer.addColumnDefinition(gutterSize, true);\n }\n }\n dialogContainer.addControl(swatchDrawer, 1, 0);\n }\n // Picker container\n const pickerPanel = new Grid();\n pickerPanel.name = \"Picker Panel\";\n pickerPanel.height = options.pickerHeight;\n const panelHead = parseInt(options.headerHeight) / parseInt(options.pickerHeight);\n const pickerPanelRows = [panelHead, 1.0 - panelHead];\n pickerPanel.addRowDefinition(pickerPanelRows[0], false);\n pickerPanel.addRowDefinition(pickerPanelRows[1], false);\n dialogContainer.addControl(pickerPanel, 0, 0);\n // Picker container header\n const header = new Rectangle();\n header.name = \"Dialogue Header Bar\";\n header.background = \"#cccccc\";\n header.thickness = 0;\n pickerPanel.addControl(header, 0, 0);\n // Header close button\n const closeButton = Button.CreateSimpleButton(\"closeButton\", \"a\");\n closeButton.fontFamily = \"coreglyphs\";\n const headerColor3 = Color3.FromHexString(header.background);\n const closeIconColor = new Color3(1.0 - headerColor3.r, 1.0 - headerColor3.g, 1.0 - headerColor3.b);\n closeButton.color = closeIconColor.toHexString();\n closeButton.fontSize = Math.floor(parseInt(options.headerHeight) * 0.6);\n closeButton.textBlock.textVerticalAlignment = Control.VERTICAL_ALIGNMENT_CENTER;\n closeButton.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_RIGHT;\n closeButton.height = closeButton.width = options.headerHeight;\n closeButton.background = header.background;\n closeButton.thickness = 0;\n closeButton.pointerDownAnimation = () => { };\n closeButton.pointerUpAnimation = () => {\n closeButton.background = header.background;\n };\n closeButton.pointerEnterAnimation = () => {\n closeButton.color = header.background;\n closeButton.background = \"red\";\n };\n closeButton.pointerOutAnimation = () => {\n closeButton.color = closeIconColor.toHexString();\n closeButton.background = header.background;\n };\n closeButton.onPointerClickObservable.add(() => {\n closePicker(currentSwatch.background);\n });\n pickerPanel.addControl(closeButton, 0, 0);\n // Dialog container body\n const dialogBody = new Grid();\n dialogBody.name = \"Dialogue Body\";\n dialogBody.background = buttonBackgroundColor;\n const dialogBodyCols = [0.4375, 0.5625];\n dialogBody.addRowDefinition(1.0, false);\n dialogBody.addColumnDefinition(dialogBodyCols[0], false);\n dialogBody.addColumnDefinition(dialogBodyCols[1], false);\n pickerPanel.addControl(dialogBody, 1, 0);\n // Picker grid\n const pickerGrid = new Grid();\n pickerGrid.name = \"Picker Grid\";\n pickerGrid.addRowDefinition(0.85, false);\n pickerGrid.addRowDefinition(0.15, false);\n dialogBody.addControl(pickerGrid, 0, 0);\n // Picker control\n const picker = new ColorPicker();\n picker.name = \"GUI Color Picker\";\n if (options.pickerHeight < options.pickerWidth) {\n picker.width = 0.89;\n }\n else {\n picker.height = 0.89;\n }\n picker.value = Color3.FromHexString(options.lastColor);\n picker.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_CENTER;\n picker.verticalAlignment = Control.VERTICAL_ALIGNMENT_CENTER;\n picker.onPointerDownObservable.add(() => {\n activeField = picker.name;\n lastVal = \"\";\n editSwatches(false);\n });\n picker.onValueChangedObservable.add(function (value) {\n // value is a color3\n if (activeField == picker.name) {\n updateValues(value, picker.name);\n }\n });\n pickerGrid.addControl(picker, 0, 0);\n // Picker body right quarant\n const pickerBodyRight = new Grid();\n pickerBodyRight.name = \"Dialogue Right Half\";\n pickerBodyRight.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;\n const pickerBodyRightRows = [0.514, 0.486];\n pickerBodyRight.addRowDefinition(pickerBodyRightRows[0], false);\n pickerBodyRight.addRowDefinition(pickerBodyRightRows[1], false);\n dialogBody.addControl(pickerBodyRight, 1, 1);\n // Picker container swatches and buttons\n const pickerSwatchesButtons = new Grid();\n pickerSwatchesButtons.name = \"Swatches and Buttons\";\n const pickerButtonsCol = [0.417, 0.583];\n pickerSwatchesButtons.addRowDefinition(1.0, false);\n pickerSwatchesButtons.addColumnDefinition(pickerButtonsCol[0], false);\n pickerSwatchesButtons.addColumnDefinition(pickerButtonsCol[1], false);\n pickerBodyRight.addControl(pickerSwatchesButtons, 0, 0);\n // Picker Swatches quadrant\n const pickerSwatches = new Grid();\n pickerSwatches.name = \"New and Current Swatches\";\n const pickeSwatchesRows = [0.04, 0.16, 0.64, 0.16];\n pickerSwatches.addRowDefinition(pickeSwatchesRows[0], false);\n pickerSwatches.addRowDefinition(pickeSwatchesRows[1], false);\n pickerSwatches.addRowDefinition(pickeSwatchesRows[2], false);\n pickerSwatches.addRowDefinition(pickeSwatchesRows[3], false);\n pickerSwatchesButtons.addControl(pickerSwatches, 0, 0);\n // Active swatches\n const activeSwatches = new Grid();\n activeSwatches.name = \"Active Swatches\";\n activeSwatches.width = 0.67;\n activeSwatches.addRowDefinition(0.5, false);\n activeSwatches.addRowDefinition(0.5, false);\n pickerSwatches.addControl(activeSwatches, 2, 0);\n const labelWidth = Math.floor(parseInt(options.pickerWidth) * dialogBodyCols[1] * pickerButtonsCol[0] * 0.11);\n const labelHeight = Math.floor(parseInt(options.pickerHeight) * pickerPanelRows[1] * pickerBodyRightRows[0] * pickeSwatchesRows[1] * 0.5);\n let labelTextSize;\n if (options.pickerWidth > options.pickerHeight) {\n labelTextSize = labelHeight;\n }\n else {\n labelTextSize = labelWidth;\n }\n // New color swatch and previous color button\n const newText = new TextBlock();\n newText.text = \"new\";\n newText.name = \"New Color Label\";\n newText.color = buttonColor;\n newText.fontSize = labelTextSize;\n pickerSwatches.addControl(newText, 1, 0);\n const newSwatch = new Rectangle();\n newSwatch.name = \"New Color Swatch\";\n newSwatch.background = options.lastColor;\n newSwatch.thickness = 0;\n activeSwatches.addControl(newSwatch, 0, 0);\n const currentSwatch = Button.CreateSimpleButton(\"currentSwatch\", \"\");\n currentSwatch.background = options.lastColor;\n currentSwatch.thickness = 0;\n currentSwatch.onPointerClickObservable.add(() => {\n const revertColor = Color3.FromHexString(currentSwatch.background);\n updateValues(revertColor, currentSwatch.name);\n editSwatches(false);\n });\n currentSwatch.pointerDownAnimation = () => { };\n currentSwatch.pointerUpAnimation = () => { };\n currentSwatch.pointerEnterAnimation = () => { };\n currentSwatch.pointerOutAnimation = () => { };\n activeSwatches.addControl(currentSwatch, 1, 0);\n const swatchOutline = new Rectangle();\n swatchOutline.name = \"Swatch Outline\";\n swatchOutline.width = 0.67;\n swatchOutline.thickness = 2;\n swatchOutline.color = currentSwatchesOutlineColor;\n swatchOutline.isHitTestVisible = false;\n pickerSwatches.addControl(swatchOutline, 2, 0);\n const currentText = new TextBlock();\n currentText.name = \"Current Color Label\";\n currentText.text = \"current\";\n currentText.color = buttonColor;\n currentText.fontSize = labelTextSize;\n pickerSwatches.addControl(currentText, 3, 0);\n // Buttons grid\n const buttonGrid = new Grid();\n buttonGrid.name = \"Button Grid\";\n buttonGrid.height = 0.8;\n const buttonGridRows = 1 / 3;\n buttonGrid.addRowDefinition(buttonGridRows, false);\n buttonGrid.addRowDefinition(buttonGridRows, false);\n buttonGrid.addRowDefinition(buttonGridRows, false);\n pickerSwatchesButtons.addControl(buttonGrid, 0, 1);\n // Determine pixel width and height for all buttons from overall panel dimensions\n const buttonWidth = Math.floor(parseInt(options.pickerWidth) * dialogBodyCols[1] * pickerButtonsCol[1] * 0.67).toString() + \"px\";\n const buttonHeight = Math.floor(parseInt(options.pickerHeight) * pickerPanelRows[1] * pickerBodyRightRows[0] * (parseFloat(buttonGrid.height.toString()) / 100) * buttonGridRows * 0.7).toString() + \"px\";\n // Determine button type size\n if (parseFloat(buttonWidth) > parseFloat(buttonHeight)) {\n buttonFontSize = Math.floor(parseFloat(buttonHeight) * 0.45);\n }\n else {\n buttonFontSize = Math.floor(parseFloat(buttonWidth) * 0.11);\n }\n // Panel Buttons\n const butOK = Button.CreateSimpleButton(\"butOK\", \"OK\");\n butOK.width = buttonWidth;\n butOK.height = buttonHeight;\n butOK.verticalAlignment = Control.VERTICAL_ALIGNMENT_CENTER;\n butOK.thickness = 2;\n butOK.color = buttonColor;\n butOK.fontSize = buttonFontSize;\n butOK.background = buttonBackgroundColor;\n butOK.onPointerEnterObservable.add(() => {\n butOK.background = buttonBackgroundHoverColor;\n });\n butOK.onPointerOutObservable.add(() => {\n butOK.background = buttonBackgroundColor;\n });\n butOK.pointerDownAnimation = () => {\n butOK.background = buttonBackgroundClickColor;\n };\n butOK.pointerUpAnimation = () => {\n butOK.background = buttonBackgroundHoverColor;\n };\n butOK.onPointerClickObservable.add(() => {\n editSwatches(false);\n closePicker(newSwatch.background);\n });\n buttonGrid.addControl(butOK, 0, 0);\n const butCancel = Button.CreateSimpleButton(\"butCancel\", \"Cancel\");\n butCancel.width = buttonWidth;\n butCancel.height = buttonHeight;\n butCancel.verticalAlignment = Control.VERTICAL_ALIGNMENT_CENTER;\n butCancel.thickness = 2;\n butCancel.color = buttonColor;\n butCancel.fontSize = buttonFontSize;\n butCancel.background = buttonBackgroundColor;\n butCancel.onPointerEnterObservable.add(() => {\n butCancel.background = buttonBackgroundHoverColor;\n });\n butCancel.onPointerOutObservable.add(() => {\n butCancel.background = buttonBackgroundColor;\n });\n butCancel.pointerDownAnimation = () => {\n butCancel.background = buttonBackgroundClickColor;\n };\n butCancel.pointerUpAnimation = () => {\n butCancel.background = buttonBackgroundHoverColor;\n };\n butCancel.onPointerClickObservable.add(() => {\n editSwatches(false);\n closePicker(currentSwatch.background);\n });\n buttonGrid.addControl(butCancel, 1, 0);\n if (options.savedColors) {\n butSave = Button.CreateSimpleButton(\"butSave\", \"Save\");\n butSave.width = buttonWidth;\n butSave.height = buttonHeight;\n butSave.verticalAlignment = Control.VERTICAL_ALIGNMENT_CENTER;\n butSave.thickness = 2;\n butSave.fontSize = buttonFontSize;\n if (options.savedColors.length < options.swatchLimit) {\n butSave.color = buttonColor;\n butSave.background = buttonBackgroundColor;\n }\n else {\n disableButton(butSave, true);\n }\n butSave.onPointerEnterObservable.add(() => {\n if (options.savedColors) {\n if (options.savedColors.length < options.swatchLimit) {\n butSave.background = buttonBackgroundHoverColor;\n }\n }\n });\n butSave.onPointerOutObservable.add(() => {\n if (options.savedColors) {\n if (options.savedColors.length < options.swatchLimit) {\n butSave.background = buttonBackgroundColor;\n }\n }\n });\n butSave.pointerDownAnimation = () => {\n if (options.savedColors) {\n if (options.savedColors.length < options.swatchLimit) {\n butSave.background = buttonBackgroundClickColor;\n }\n }\n };\n butSave.pointerUpAnimation = () => {\n if (options.savedColors) {\n if (options.savedColors.length < options.swatchLimit) {\n butSave.background = buttonBackgroundHoverColor;\n }\n }\n };\n butSave.onPointerClickObservable.add(() => {\n if (options.savedColors) {\n if (options.savedColors.length == 0) {\n setEditButtonVisibility(true);\n }\n if (options.savedColors.length < options.swatchLimit) {\n updateSwatches(newSwatch.background, butSave);\n }\n editSwatches(false);\n }\n });\n if (options.savedColors.length > 0) {\n setEditButtonVisibility(true);\n }\n buttonGrid.addControl(butSave, 2, 0);\n }\n // Picker color values input\n const pickerColorValues = new Grid();\n pickerColorValues.name = \"Dialog Lower Right\";\n pickerColorValues.addRowDefinition(0.02, false);\n pickerColorValues.addRowDefinition(0.63, false);\n pickerColorValues.addRowDefinition(0.21, false);\n pickerColorValues.addRowDefinition(0.14, false);\n pickerBodyRight.addControl(pickerColorValues, 1, 0);\n // RGB values text boxes\n const currentColor = Color3.FromHexString(options.lastColor);\n const rgbValuesQuadrant = new Grid();\n rgbValuesQuadrant.name = \"RGB Values\";\n rgbValuesQuadrant.width = 0.82;\n rgbValuesQuadrant.verticalAlignment = Control.VERTICAL_ALIGNMENT_CENTER;\n rgbValuesQuadrant.addRowDefinition(1 / 3, false);\n rgbValuesQuadrant.addRowDefinition(1 / 3, false);\n rgbValuesQuadrant.addRowDefinition(1 / 3, false);\n rgbValuesQuadrant.addColumnDefinition(0.1, false);\n rgbValuesQuadrant.addColumnDefinition(0.2, false);\n rgbValuesQuadrant.addColumnDefinition(0.7, false);\n pickerColorValues.addControl(rgbValuesQuadrant, 1, 0);\n for (let i = 0; i < inputFieldLabels.length; i++) {\n const labelText = new TextBlock();\n labelText.text = inputFieldLabels[i];\n labelText.color = buttonColor;\n labelText.fontSize = buttonFontSize;\n rgbValuesQuadrant.addControl(labelText, i, 0);\n }\n // Input fields for RGB values\n const rValInt = new InputText();\n rValInt.width = 0.83;\n rValInt.height = 0.72;\n rValInt.name = \"rIntField\";\n rValInt.fontSize = buttonFontSize;\n rValInt.text = (currentColor.r * 255).toString();\n rValInt.color = inputTextColor;\n rValInt.background = inputTextBackgroundColor;\n rValInt.onFocusObservable.add(() => {\n activeField = rValInt.name;\n lastVal = rValInt.text;\n editSwatches(false);\n });\n rValInt.onBlurObservable.add(() => {\n if (rValInt.text == \"\") {\n rValInt.text = \"0\";\n }\n updateInt(rValInt, \"r\");\n if (activeField == rValInt.name) {\n activeField = \"\";\n }\n });\n rValInt.onTextChangedObservable.add(() => {\n if (activeField == rValInt.name) {\n updateInt(rValInt, \"r\");\n }\n });\n rgbValuesQuadrant.addControl(rValInt, 0, 1);\n const gValInt = new InputText();\n gValInt.width = 0.83;\n gValInt.height = 0.72;\n gValInt.name = \"gIntField\";\n gValInt.fontSize = buttonFontSize;\n gValInt.text = (currentColor.g * 255).toString();\n gValInt.color = inputTextColor;\n gValInt.background = inputTextBackgroundColor;\n gValInt.onFocusObservable.add(() => {\n activeField = gValInt.name;\n lastVal = gValInt.text;\n editSwatches(false);\n });\n gValInt.onBlurObservable.add(() => {\n if (gValInt.text == \"\") {\n gValInt.text = \"0\";\n }\n updateInt(gValInt, \"g\");\n if (activeField == gValInt.name) {\n activeField = \"\";\n }\n });\n gValInt.onTextChangedObservable.add(() => {\n if (activeField == gValInt.name) {\n updateInt(gValInt, \"g\");\n }\n });\n rgbValuesQuadrant.addControl(gValInt, 1, 1);\n const bValInt = new InputText();\n bValInt.width = 0.83;\n bValInt.height = 0.72;\n bValInt.name = \"bIntField\";\n bValInt.fontSize = buttonFontSize;\n bValInt.text = (currentColor.b * 255).toString();\n bValInt.color = inputTextColor;\n bValInt.background = inputTextBackgroundColor;\n bValInt.onFocusObservable.add(() => {\n activeField = bValInt.name;\n lastVal = bValInt.text;\n editSwatches(false);\n });\n bValInt.onBlurObservable.add(() => {\n if (bValInt.text == \"\") {\n bValInt.text = \"0\";\n }\n updateInt(bValInt, \"b\");\n if (activeField == bValInt.name) {\n activeField = \"\";\n }\n });\n bValInt.onTextChangedObservable.add(() => {\n if (activeField == bValInt.name) {\n updateInt(bValInt, \"b\");\n }\n });\n rgbValuesQuadrant.addControl(bValInt, 2, 1);\n const rValDec = new InputText();\n rValDec.width = 0.95;\n rValDec.height = 0.72;\n rValDec.name = \"rDecField\";\n rValDec.fontSize = buttonFontSize;\n rValDec.text = currentColor.r.toString();\n rValDec.color = inputTextColor;\n rValDec.background = inputTextBackgroundColor;\n rValDec.onFocusObservable.add(() => {\n activeField = rValDec.name;\n lastVal = rValDec.text;\n editSwatches(false);\n });\n rValDec.onBlurObservable.add(() => {\n if (parseFloat(rValDec.text) == 0 || rValDec.text == \"\") {\n rValDec.text = \"0\";\n updateFloat(rValDec, \"r\");\n }\n if (activeField == rValDec.name) {\n activeField = \"\";\n }\n });\n rValDec.onTextChangedObservable.add(() => {\n if (activeField == rValDec.name) {\n updateFloat(rValDec, \"r\");\n }\n });\n rgbValuesQuadrant.addControl(rValDec, 0, 2);\n const gValDec = new InputText();\n gValDec.width = 0.95;\n gValDec.height = 0.72;\n gValDec.name = \"gDecField\";\n gValDec.fontSize = buttonFontSize;\n gValDec.text = currentColor.g.toString();\n gValDec.color = inputTextColor;\n gValDec.background = inputTextBackgroundColor;\n gValDec.onFocusObservable.add(() => {\n activeField = gValDec.name;\n lastVal = gValDec.text;\n editSwatches(false);\n });\n gValDec.onBlurObservable.add(() => {\n if (parseFloat(gValDec.text) == 0 || gValDec.text == \"\") {\n gValDec.text = \"0\";\n updateFloat(gValDec, \"g\");\n }\n if (activeField == gValDec.name) {\n activeField = \"\";\n }\n });\n gValDec.onTextChangedObservable.add(() => {\n if (activeField == gValDec.name) {\n updateFloat(gValDec, \"g\");\n }\n });\n rgbValuesQuadrant.addControl(gValDec, 1, 2);\n const bValDec = new InputText();\n bValDec.width = 0.95;\n bValDec.height = 0.72;\n bValDec.name = \"bDecField\";\n bValDec.fontSize = buttonFontSize;\n bValDec.text = currentColor.b.toString();\n bValDec.color = inputTextColor;\n bValDec.background = inputTextBackgroundColor;\n bValDec.onFocusObservable.add(() => {\n activeField = bValDec.name;\n lastVal = bValDec.text;\n editSwatches(false);\n });\n bValDec.onBlurObservable.add(() => {\n if (parseFloat(bValDec.text) == 0 || bValDec.text == \"\") {\n bValDec.text = \"0\";\n updateFloat(bValDec, \"b\");\n }\n if (activeField == bValDec.name) {\n activeField = \"\";\n }\n });\n bValDec.onTextChangedObservable.add(() => {\n if (activeField == bValDec.name) {\n updateFloat(bValDec, \"b\");\n }\n });\n rgbValuesQuadrant.addControl(bValDec, 2, 2);\n // Hex value input\n const hexValueQuadrant = new Grid();\n hexValueQuadrant.name = \"Hex Value\";\n hexValueQuadrant.width = 0.82;\n hexValueQuadrant.addRowDefinition(1.0, false);\n hexValueQuadrant.addColumnDefinition(0.1, false);\n hexValueQuadrant.addColumnDefinition(0.9, false);\n pickerColorValues.addControl(hexValueQuadrant, 2, 0);\n const labelText = new TextBlock();\n labelText.text = \"#\";\n labelText.color = buttonColor;\n labelText.fontSize = buttonFontSize;\n hexValueQuadrant.addControl(labelText, 0, 0);\n const hexVal = new InputText();\n hexVal.width = 0.96;\n hexVal.height = 0.72;\n hexVal.name = \"hexField\";\n hexVal.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_CENTER;\n hexVal.fontSize = buttonFontSize;\n const minusPound = options.lastColor.split(\"#\");\n hexVal.text = minusPound[1];\n hexVal.color = inputTextColor;\n hexVal.background = inputTextBackgroundColor;\n hexVal.onFocusObservable.add(() => {\n activeField = hexVal.name;\n lastVal = hexVal.text;\n editSwatches(false);\n });\n hexVal.onBlurObservable.add(() => {\n if (hexVal.text.length == 3) {\n const val = hexVal.text.split(\"\");\n hexVal.text = val[0] + val[0] + val[1] + val[1] + val[2] + val[2];\n }\n if (hexVal.text == \"\") {\n hexVal.text = \"000000\";\n updateValues(Color3.FromHexString(hexVal.text), \"b\");\n }\n if (activeField == hexVal.name) {\n activeField = \"\";\n }\n });\n hexVal.onTextChangedObservable.add(() => {\n let newHexValue = hexVal.text;\n const checkHex = /[^0-9A-F]/i.test(newHexValue);\n if ((hexVal.text.length > 6 || checkHex) && activeField == hexVal.name) {\n hexVal.text = lastVal;\n }\n else {\n if (hexVal.text.length < 6) {\n const leadingZero = 6 - hexVal.text.length;\n for (let i = 0; i < leadingZero; i++) {\n newHexValue = \"0\" + newHexValue;\n }\n }\n if (hexVal.text.length == 3) {\n const val = hexVal.text.split(\"\");\n newHexValue = val[0] + val[0] + val[1] + val[1] + val[2] + val[2];\n }\n newHexValue = \"#\" + newHexValue;\n if (activeField == hexVal.name) {\n lastVal = hexVal.text;\n updateValues(Color3.FromHexString(newHexValue), hexVal.name);\n }\n }\n });\n hexValueQuadrant.addControl(hexVal, 0, 1);\n if (options.savedColors && options.savedColors.length > 0) {\n updateSwatches(\"\", butSave);\n }\n /**\n * Will update all values for InputText and ColorPicker controls based on the BABYLON.Color3 passed to this function.\n * Each InputText control and the ColorPicker control will be tested to see if they are the activeField and if they\n * are will receive no update. This is to prevent the input from the user being overwritten.\n * @param value\n * @param inputField\n */\n function updateValues(value, inputField) {\n activeField = inputField;\n const pickedColor = value.toHexString();\n newSwatch.background = pickedColor;\n if (rValInt.name != activeField) {\n rValInt.text = Math.floor(value.r * 255).toString();\n }\n if (gValInt.name != activeField) {\n gValInt.text = Math.floor(value.g * 255).toString();\n }\n if (bValInt.name != activeField) {\n bValInt.text = Math.floor(value.b * 255).toString();\n }\n if (rValDec.name != activeField) {\n rValDec.text = value.r.toString();\n }\n if (gValDec.name != activeField) {\n gValDec.text = value.g.toString();\n }\n if (bValDec.name != activeField) {\n bValDec.text = value.b.toString();\n }\n if (hexVal.name != activeField) {\n const minusPound = pickedColor.split(\"#\");\n hexVal.text = minusPound[1];\n }\n if (picker.name != activeField) {\n picker.value = value;\n }\n }\n // When the user enters an integer for R, G, or B we check to make sure it is a valid number and replace if not.\n function updateInt(field, channel) {\n let newValue = field.text;\n const checkVal = /[^0-9]/g.test(newValue);\n if (checkVal) {\n field.text = lastVal;\n return;\n }\n else {\n if (newValue != \"\") {\n if (Math.floor(parseInt(newValue)) < 0) {\n newValue = \"0\";\n }\n else if (Math.floor(parseInt(newValue)) > 255) {\n newValue = \"255\";\n }\n else if (isNaN(parseInt(newValue))) {\n newValue = \"0\";\n }\n }\n if (activeField == field.name) {\n lastVal = newValue;\n }\n }\n if (newValue != \"\") {\n newValue = parseInt(newValue).toString();\n field.text = newValue;\n const newSwatchRGB = Color3.FromHexString(newSwatch.background);\n if (activeField == field.name) {\n if (channel == \"r\") {\n updateValues(new Color3(parseInt(newValue) / 255, newSwatchRGB.g, newSwatchRGB.b), field.name);\n }\n else if (channel == \"g\") {\n updateValues(new Color3(newSwatchRGB.r, parseInt(newValue) / 255, newSwatchRGB.b), field.name);\n }\n else {\n updateValues(new Color3(newSwatchRGB.r, newSwatchRGB.g, parseInt(newValue) / 255), field.name);\n }\n }\n }\n }\n // When the user enters a float for R, G, or B we check to make sure it is a valid number and replace if not.\n function updateFloat(field, channel) {\n let newValue = field.text;\n const checkVal = /[^0-9.]/g.test(newValue);\n if (checkVal) {\n field.text = lastVal;\n return;\n }\n else {\n if (newValue != \"\" && newValue != \".\" && parseFloat(newValue) != 0) {\n if (parseFloat(newValue) < 0.0) {\n newValue = \"0.0\";\n }\n else if (parseFloat(newValue) > 1.0) {\n newValue = \"1.0\";\n }\n else if (isNaN(parseFloat(newValue))) {\n newValue = \"0.0\";\n }\n }\n if (activeField == field.name) {\n lastVal = newValue;\n }\n }\n if (newValue != \"\" && newValue != \".\" && parseFloat(newValue) != 0) {\n newValue = parseFloat(newValue).toString();\n field.text = newValue;\n }\n else {\n newValue = \"0.0\";\n }\n const newSwatchRGB = Color3.FromHexString(newSwatch.background);\n if (activeField == field.name) {\n if (channel == \"r\") {\n updateValues(new Color3(parseFloat(newValue), newSwatchRGB.g, newSwatchRGB.b), field.name);\n }\n else if (channel == \"g\") {\n updateValues(new Color3(newSwatchRGB.r, parseFloat(newValue), newSwatchRGB.b), field.name);\n }\n else {\n updateValues(new Color3(newSwatchRGB.r, newSwatchRGB.g, parseFloat(newValue)), field.name);\n }\n }\n }\n // Removes the current index from the savedColors array. Drawer can then be regenerated.\n function deleteSwatch(index) {\n if (options.savedColors) {\n options.savedColors.splice(index, 1);\n }\n if (options.savedColors && options.savedColors.length == 0) {\n setEditButtonVisibility(false);\n editSwatchMode = false;\n }\n }\n // Creates and styles an individual swatch when updateSwatches is called.\n function createSwatch() {\n if (options.savedColors && options.savedColors[swatchNumber]) {\n let icon;\n if (editSwatchMode) {\n icon = \"b\";\n }\n else {\n icon = \"\";\n }\n const swatch = Button.CreateSimpleButton(\"Swatch_\" + swatchNumber, icon);\n swatch.fontFamily = \"coreglyphs\";\n const swatchColor = Color3.FromHexString(options.savedColors[swatchNumber]);\n const swatchLuminence = swatchColor.r + swatchColor.g + swatchColor.b;\n // Set color of outline and textBlock based on luminance of the color swatch so feedback always visible\n if (swatchLuminence > luminanceLimit) {\n swatch.color = iconColorDark;\n }\n else {\n swatch.color = iconColorLight;\n }\n swatch.fontSize = Math.floor(swatchSize * 0.7);\n swatch.textBlock.verticalAlignment = Control.VERTICAL_ALIGNMENT_CENTER;\n swatch.height = swatch.width = swatchSize.toString() + \"px\";\n swatch.background = options.savedColors[swatchNumber];\n swatch.thickness = 2;\n const metadata = swatchNumber;\n swatch.pointerDownAnimation = () => {\n swatch.thickness = 4;\n };\n swatch.pointerUpAnimation = () => {\n swatch.thickness = 3;\n };\n swatch.pointerEnterAnimation = () => {\n swatch.thickness = 3;\n };\n swatch.pointerOutAnimation = () => {\n swatch.thickness = 2;\n };\n swatch.onPointerClickObservable.add(() => {\n if (!editSwatchMode) {\n if (options.savedColors) {\n updateValues(Color3.FromHexString(options.savedColors[metadata]), swatch.name);\n }\n }\n else {\n deleteSwatch(metadata);\n updateSwatches(\"\", butSave);\n }\n });\n return swatch;\n }\n else {\n return null;\n }\n }\n // Mode switch to render button text and close symbols on swatch controls\n function editSwatches(mode) {\n if (mode !== undefined) {\n editSwatchMode = mode;\n }\n let thisButton;\n if (editSwatchMode) {\n for (let i = 0; i < swatchDrawer.children.length; i++) {\n thisButton = swatchDrawer.children[i];\n thisButton.textBlock.text = \"b\";\n }\n if (butEdit !== undefined) {\n butEdit.textBlock.text = \"Done\";\n }\n }\n else {\n for (let i = 0; i < swatchDrawer.children.length; i++) {\n thisButton = swatchDrawer.children[i];\n thisButton.textBlock.text = \"\";\n }\n if (butEdit !== undefined) {\n butEdit.textBlock.text = \"Edit\";\n }\n }\n }\n /**\n * When Save Color button is pressed this function will first create a swatch drawer if one is not already\n * made. Then all controls are removed from the drawer and we step through the savedColors array and\n * creates one swatch per color. It will also set the height of the drawer control based on how many\n * saved colors there are and how many can be stored per row.\n * @param color\n * @param button\n */\n function updateSwatches(color, button) {\n if (options.savedColors) {\n if (color != \"\") {\n options.savedColors.push(color);\n }\n swatchNumber = 0;\n swatchDrawer.clearControls();\n const rowCount = Math.ceil(options.savedColors.length / options.numSwatchesPerLine);\n let gutterCount;\n if (rowCount == 0) {\n gutterCount = 0;\n }\n else {\n gutterCount = rowCount + 1;\n }\n if (swatchDrawer.rowCount != rowCount + gutterCount) {\n const currentRows = swatchDrawer.rowCount;\n for (let i = 0; i < currentRows; i++) {\n swatchDrawer.removeRowDefinition(0);\n }\n for (let i = 0; i < rowCount + gutterCount; i++) {\n if (i % 2) {\n swatchDrawer.addRowDefinition(swatchSize, true);\n }\n else {\n swatchDrawer.addRowDefinition(gutterSize, true);\n }\n }\n }\n swatchDrawer.height = (swatchSize * rowCount + gutterCount * gutterSize).toString() + \"px\";\n for (let y = 1, thisRow = 1; y < rowCount + gutterCount; y += 2, thisRow++) {\n // Determine number of buttons to create per row based on the button limit per row and number of saved colors\n let totalButtonsThisRow;\n if (options.savedColors.length > thisRow * options.numSwatchesPerLine) {\n totalButtonsThisRow = options.numSwatchesPerLine;\n }\n else {\n totalButtonsThisRow = options.savedColors.length - (thisRow - 1) * options.numSwatchesPerLine;\n }\n const buttonIterations = Math.min(Math.max(totalButtonsThisRow, 0), options.numSwatchesPerLine);\n for (let x = 0, w = 1; x < buttonIterations; x++) {\n if (x > options.numSwatchesPerLine) {\n continue;\n }\n const swatch = createSwatch();\n if (swatch != null) {\n swatchDrawer.addControl(swatch, y, w);\n w += 2;\n swatchNumber++;\n }\n else {\n continue;\n }\n }\n }\n if (options.savedColors.length >= options.swatchLimit) {\n disableButton(button, true);\n }\n else {\n disableButton(button, false);\n }\n }\n }\n // Shows or hides edit swatches button depending on if there are saved swatches\n function setEditButtonVisibility(enableButton) {\n if (enableButton) {\n butEdit = Button.CreateSimpleButton(\"butEdit\", \"Edit\");\n butEdit.width = buttonWidth;\n butEdit.height = buttonHeight;\n butEdit.left = Math.floor(parseInt(buttonWidth) * 0.1).toString() + \"px\";\n butEdit.top = (parseFloat(butEdit.left) * -1).toString() + \"px\";\n butEdit.verticalAlignment = Control.VERTICAL_ALIGNMENT_BOTTOM;\n butEdit.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;\n butEdit.thickness = 2;\n butEdit.color = buttonColor;\n butEdit.fontSize = buttonFontSize;\n butEdit.background = buttonBackgroundColor;\n butEdit.onPointerEnterObservable.add(() => {\n butEdit.background = buttonBackgroundHoverColor;\n });\n butEdit.onPointerOutObservable.add(() => {\n butEdit.background = buttonBackgroundColor;\n });\n butEdit.pointerDownAnimation = () => {\n butEdit.background = buttonBackgroundClickColor;\n };\n butEdit.pointerUpAnimation = () => {\n butEdit.background = buttonBackgroundHoverColor;\n };\n butEdit.onPointerClickObservable.add(() => {\n if (editSwatchMode) {\n editSwatchMode = false;\n }\n else {\n editSwatchMode = true;\n }\n editSwatches();\n });\n pickerGrid.addControl(butEdit, 1, 0);\n }\n else {\n pickerGrid.removeControl(butEdit);\n }\n }\n // Called when the user hits the limit of saved colors in the drawer.\n function disableButton(button, disabled) {\n if (disabled) {\n button.color = buttonDisabledColor;\n button.background = buttonDisabledBackgroundColor;\n }\n else {\n button.color = buttonColor;\n button.background = buttonBackgroundColor;\n }\n }\n // Passes last chosen color back to scene and kills dialog by removing from AdvancedDynamicTexture\n function closePicker(color) {\n if (options.savedColors && options.savedColors.length > 0) {\n resolve({\n savedColors: options.savedColors,\n pickedColor: color,\n });\n }\n else {\n resolve({\n pickedColor: color,\n });\n }\n advancedTexture.removeControl(dialogContainer);\n }\n });\n }\n}\nColorPicker._Epsilon = 0.000001;\n__decorate([\n serialize()\n], ColorPicker.prototype, \"value\", null);\n__decorate([\n serialize()\n], ColorPicker.prototype, \"width\", null);\n__decorate([\n serialize()\n], ColorPicker.prototype, \"height\", null);\n__decorate([\n serialize()\n], ColorPicker.prototype, \"size\", null);\nRegisterClass(\"BABYLON.GUI.ColorPicker\", ColorPicker);\n//# sourceMappingURL=colorpicker.js.map","import { __decorate } from \"@babylonjs/core/tslib.es6.js\";\nimport { Container } from \"./container.js\";\nimport { Control } from \"./control.js\";\nimport { RegisterClass } from \"@babylonjs/core/Misc/typeStore.js\";\nimport { serialize } from \"@babylonjs/core/Misc/decorators.js\";\n/** Class used to create 2D ellipse containers */\nexport class Ellipse extends Container {\n /** Gets or sets border thickness */\n get thickness() {\n return this._thickness;\n }\n set thickness(value) {\n if (this._thickness === value) {\n return;\n }\n this._thickness = value;\n this._markAsDirty();\n }\n /**\n * Creates a new Ellipse\n * @param name defines the control name\n */\n constructor(name) {\n super(name);\n this.name = name;\n this._thickness = 1;\n }\n _getTypeName() {\n return \"Ellipse\";\n }\n _localDraw(context) {\n context.save();\n if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {\n context.shadowColor = this.shadowColor;\n context.shadowBlur = this.shadowBlur;\n context.shadowOffsetX = this.shadowOffsetX;\n context.shadowOffsetY = this.shadowOffsetY;\n }\n Control.drawEllipse(this._currentMeasure.left + this._currentMeasure.width / 2, this._currentMeasure.top + this._currentMeasure.height / 2, this._currentMeasure.width / 2 - this._thickness / 2, this._currentMeasure.height / 2 - this._thickness / 2, context);\n if (this._backgroundGradient || this._background) {\n context.fillStyle = this._getBackgroundColor(context);\n context.fill();\n }\n if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {\n context.shadowBlur = 0;\n context.shadowOffsetX = 0;\n context.shadowOffsetY = 0;\n }\n if (this._thickness) {\n if (this.color) {\n context.strokeStyle = this.color;\n }\n context.lineWidth = this._thickness;\n context.stroke();\n }\n context.restore();\n }\n _additionalProcessing(parentMeasure, context) {\n super._additionalProcessing(parentMeasure, context);\n this._measureForChildren.width -= 2 * this._thickness;\n this._measureForChildren.height -= 2 * this._thickness;\n this._measureForChildren.left += this._thickness;\n this._measureForChildren.top += this._thickness;\n }\n _clipForChildren(context) {\n Control.drawEllipse(this._currentMeasure.left + this._currentMeasure.width / 2, this._currentMeasure.top + this._currentMeasure.height / 2, this._currentMeasure.width / 2, this._currentMeasure.height / 2, context);\n context.clip();\n }\n _renderHighlightSpecific(context) {\n Control.drawEllipse(this._currentMeasure.left + this._currentMeasure.width / 2, this._currentMeasure.top + this._currentMeasure.height / 2, this._currentMeasure.width / 2 - this._highlightLineWidth / 2, this._currentMeasure.height / 2 - this._highlightLineWidth / 2, context);\n context.stroke();\n }\n}\n__decorate([\n serialize()\n], Ellipse.prototype, \"thickness\", null);\nRegisterClass(\"BABYLON.GUI.Ellipse\", Ellipse);\n//# sourceMappingURL=ellipse.js.map","import { Button } from \"./button.js\";\nimport { RegisterClass } from \"@babylonjs/core/Misc/typeStore.js\";\nimport { Observable } from \"@babylonjs/core/Misc/observable.js\";\n/**\n * Class used to create a focusable button that can easily handle keyboard events\n * @since 5.0.0\n */\nexport class FocusableButton extends Button {\n constructor(name) {\n super(name);\n this.name = name;\n /** Highlight color when button is focused */\n this.focusedColor = null;\n this._isFocused = false;\n this._unfocusedColor = null;\n /** Observable raised when the control gets the focus */\n this.onFocusObservable = new Observable();\n /** Observable raised when the control loses the focus */\n this.onBlurObservable = new Observable();\n /** Observable raised when a key event was processed */\n this.onKeyboardEventProcessedObservable = new Observable();\n this._unfocusedColor = this.color;\n }\n /** @internal */\n onBlur() {\n if (this._isFocused) {\n this._isFocused = false;\n if (this.focusedColor && this._unfocusedColor != null) {\n // Set color back to saved unfocused color\n this.color = this._unfocusedColor;\n }\n this.onBlurObservable.notifyObservers(this);\n }\n }\n /** @internal */\n onFocus() {\n this._isFocused = true;\n if (this.focusedColor) {\n // Save the unfocused color\n this._unfocusedColor = this.color;\n this.color = this.focusedColor;\n }\n this.onFocusObservable.notifyObservers(this);\n }\n /**\n * Function called to get the list of controls that should not steal the focus from this control\n * @returns an array of controls\n */\n keepsFocusWith() {\n return null;\n }\n /**\n * Function to focus a button programmatically\n */\n focus() {\n this._host.moveFocusToControl(this);\n }\n /**\n * Function to unfocus a button programmatically\n */\n blur() {\n this._host.focusedControl = null;\n }\n /**\n * Handles the keyboard event\n * @param evt Defines the KeyboardEvent\n */\n processKeyboard(evt) {\n this.onKeyboardEventProcessedObservable.notifyObservers(evt, -1, this);\n }\n /**\n * @internal\n */\n _onPointerDown(target, coordinates, pointerId, buttonIndex, pi) {\n if (!this.isReadOnly) {\n // Clicking on button should focus\n this.focus();\n }\n return super._onPointerDown(target, coordinates, pointerId, buttonIndex, pi);\n }\n /** @internal */\n displose() {\n super.dispose();\n this.onBlurObservable.clear();\n this.onFocusObservable.clear();\n this.onKeyboardEventProcessedObservable.clear();\n }\n}\nRegisterClass(\"BABYLON.GUI.FocusableButton\", FocusableButton);\n//# sourceMappingURL=focusableButton.js.map","import { __decorate } from \"@babylonjs/core/tslib.es6.js\";\nimport { Observable } from \"@babylonjs/core/Misc/observable.js\";\nimport { Control } from \"./control.js\";\nimport { ValueAndUnit } from \"../valueAndUnit.js\";\nimport { RegisterClass } from \"@babylonjs/core/Misc/typeStore.js\";\nimport { InputText } from \"./inputText.js\";\nimport { serialize } from \"@babylonjs/core/Misc/decorators.js\";\n/**\n * Class used to create input text control\n */\nexport class InputTextArea extends InputText {\n /**\n * Gets or sets outlineWidth of the text to display\n */\n get outlineWidth() {\n return this._outlineWidth;\n }\n /**\n * Gets or sets outlineWidth of the text to display\n */\n set outlineWidth(value) {\n if (this._outlineWidth === value) {\n return;\n }\n this._outlineWidth = value;\n this._markAsDirty();\n }\n /**\n * Gets or sets outlineColor of the text to display\n */\n get outlineColor() {\n return this._outlineColor;\n }\n /**\n * Gets or sets outlineColor of the text to display\n */\n set outlineColor(value) {\n if (this._outlineColor === value) {\n return;\n }\n this._outlineColor = value;\n this._markAsDirty();\n }\n /** Gets or sets a boolean indicating if the control can auto stretch its height to adapt to the text */\n get autoStretchHeight() {\n return this._autoStretchHeight;\n }\n set autoStretchHeight(value) {\n if (this._autoStretchHeight === value) {\n return;\n }\n this._autoStretchHeight = value;\n this._markAsDirty();\n }\n set height(value) {\n this.fixedRatioMasterIsWidth = false;\n if (this._height.toString(this._host) === value) {\n return;\n }\n if (this._height.fromString(value)) {\n this._markAsDirty();\n }\n this._autoStretchHeight = false;\n }\n get maxHeight() {\n return this._maxHeight.toString(this._host);\n }\n /** Gets the maximum width allowed by the control in pixels */\n get maxHeightInPixels() {\n return this._maxHeight.getValueInPixel(this._host, this._cachedParentMeasure.height);\n }\n set maxHeight(value) {\n if (this._maxHeight.toString(this._host) === value) {\n return;\n }\n if (this._maxHeight.fromString(value)) {\n this._markAsDirty();\n }\n }\n /**\n * Creates a new InputTextArea\n * @param name defines the control name\n * @param text defines the text of the control\n */\n constructor(name, text = \"\") {\n super(name);\n this.name = name;\n this._textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;\n this._textVerticalAlignment = Control.VERTICAL_ALIGNMENT_TOP;\n this._prevText = this.text;\n this._lineSpacing = new ValueAndUnit(0);\n this._outlineWidth = 0;\n this._outlineColor = \"white\";\n this._maxHeight = new ValueAndUnit(1, ValueAndUnit.UNITMODE_PERCENTAGE, false);\n /**\n * An event triggered after the text was broken up into lines\n */\n this.onLinesReadyObservable = new Observable();\n this.text = text;\n this.isPointerBlocker = true;\n this.onLinesReadyObservable.add(() => this._updateCursorPosition());\n this._highlightCursorInfo = {\n initialStartIndex: -1,\n initialRelativeStartIndex: -1,\n initialLineIndex: -1,\n };\n this._cursorInfo = {\n globalStartIndex: 0,\n globalEndIndex: 0,\n relativeEndIndex: 0,\n relativeStartIndex: 0,\n currentLineIndex: 0,\n };\n }\n _getTypeName() {\n return \"InputTextArea\";\n }\n /**\n * Handles the keyboard event\n * @param evt Defines the KeyboardEvent\n */\n processKeyboard(evt) {\n if (this.isReadOnly) {\n return;\n }\n // process pressed key\n this.alternativeProcessKey(evt.code, evt.key, evt);\n this.onKeyboardEventProcessedObservable.notifyObservers(evt);\n }\n /**\n * Process the last keyboard input\n *\n * @param code The ascii input number\n * @param key The key string representation\n * @param evt The keyboard event emits with input\n * @internal\n */\n alternativeProcessKey(code, key, evt) {\n //return if clipboard event keys (i.e -ctr/cmd + c,v,x)\n if (evt && (evt.ctrlKey || evt.metaKey) && (code === \"KeyC\" || code === \"KeyV\" || code === \"KeyX\")) {\n return;\n }\n // Specific cases\n switch (code) {\n case \"KeyA\": // A - select all\n if (evt && (evt.ctrlKey || evt.metaKey)) {\n this._selectAllText();\n evt.preventDefault();\n return;\n }\n break;\n case \"Period\": //SLASH\n if (evt && evt.shiftKey) {\n evt.preventDefault();\n }\n break;\n case \"Backspace\": // BACKSPACE\n if (!this._isTextHighlightOn && this._cursorInfo.globalStartIndex > 0) {\n this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;\n this._cursorInfo.globalStartIndex--;\n }\n this._prevText = this._textWrapper.text;\n this._textWrapper.removePart(this._cursorInfo.globalStartIndex, this._cursorInfo.globalEndIndex);\n this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;\n if (evt) {\n evt.preventDefault();\n }\n this._blinkIsEven = false;\n this._isTextHighlightOn = false;\n this._textHasChanged();\n break;\n case \"Delete\": // DELETE\n if (!this._isTextHighlightOn && this._cursorInfo.globalEndIndex < this.text.length) {\n this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex + 1;\n }\n this._prevText = this._textWrapper.text;\n this._textWrapper.removePart(this._cursorInfo.globalStartIndex, this._cursorInfo.globalEndIndex);\n this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;\n if (evt) {\n evt.preventDefault();\n }\n this._blinkIsEven = false;\n this._isTextHighlightOn = false;\n this._textHasChanged();\n break;\n case \"Enter\": // RETURN\n this._prevText = this._textWrapper.text;\n this._textWrapper.removePart(this._cursorInfo.globalStartIndex, this._cursorInfo.globalEndIndex, \"\\n\");\n this._cursorInfo.globalStartIndex++;\n this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;\n this._blinkIsEven = false;\n this._isTextHighlightOn = false;\n this._textHasChanged();\n return;\n case \"End\": // END\n this._cursorInfo.globalStartIndex = this.text.length;\n this._blinkIsEven = false;\n this._isTextHighlightOn = false;\n this._markAsDirty();\n return;\n case \"Home\": // HOME\n this._cursorInfo.globalStartIndex = 0;\n this._blinkIsEven = false;\n this._isTextHighlightOn = false;\n this._markAsDirty();\n return;\n case \"ArrowLeft\": // LEFT\n this._markAsDirty();\n if (evt && evt.shiftKey) {\n // shift + ctrl/cmd + <-\n if (evt.ctrlKey || evt.metaKey) {\n // Go to line's start by substract the relativeStartIndex to the globalStartIndex\n this._cursorInfo.globalStartIndex -= this._cursorInfo.relativeStartIndex;\n this._cursorInfo.globalEndIndex = this._highlightCursorInfo.initialStartIndex;\n }\n // store the starting point\n if (!this._isTextHighlightOn) {\n this._highlightCursorInfo.initialLineIndex = this._cursorInfo.currentLineIndex;\n this._highlightCursorInfo.initialStartIndex = this._cursorInfo.globalStartIndex;\n this._highlightCursorInfo.initialRelativeStartIndex = this._cursorInfo.relativeStartIndex;\n this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;\n this._cursorInfo.globalStartIndex--;\n this._isTextHighlightOn = true;\n }\n else {\n if (this._cursorInfo.globalEndIndex > this._highlightCursorInfo.initialStartIndex) {\n this._cursorInfo.globalEndIndex--;\n }\n else {\n this._cursorInfo.globalStartIndex--;\n }\n }\n this._blinkIsEven = true;\n evt.preventDefault();\n return;\n }\n if (this._isTextHighlightOn) {\n this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;\n }\n else if (evt && (evt.ctrlKey || evt.metaKey)) {\n // ctr + <-\n this._cursorInfo.globalStartIndex -= this._cursorInfo.relativeStartIndex;\n evt.preventDefault();\n }\n else if (this._cursorInfo.globalStartIndex > 0) {\n this._cursorInfo.globalStartIndex--;\n }\n // update the cursor\n this._blinkIsEven = false;\n this._isTextHighlightOn = false;\n return;\n case \"ArrowRight\": // RIGHT\n this._markAsDirty();\n if (evt && evt.shiftKey) {\n // shift + ctrl/cmd + ->\n if (evt.ctrlKey || evt.metaKey) {\n const rightDelta = this._lines[this._cursorInfo.currentLineIndex].text.length - this._cursorInfo.relativeEndIndex - 1;\n this._cursorInfo.globalEndIndex += rightDelta;\n this._cursorInfo.globalStartIndex = this._highlightCursorInfo.initialStartIndex;\n }\n // store the starting point\n if (!this._isTextHighlightOn) {\n this._highlightCursorInfo.initialLineIndex = this._cursorInfo.currentLineIndex;\n this._highlightCursorInfo.initialStartIndex = this._cursorInfo.globalStartIndex;\n this._highlightCursorInfo.initialRelativeStartIndex = this._cursorInfo.relativeStartIndex;\n this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;\n this._cursorInfo.globalEndIndex++;\n this._isTextHighlightOn = true;\n }\n else {\n if (this._cursorInfo.globalStartIndex < this._highlightCursorInfo.initialStartIndex) {\n this._cursorInfo.globalStartIndex++;\n }\n else {\n this._cursorInfo.globalEndIndex++;\n }\n }\n this._blinkIsEven = true;\n evt.preventDefault();\n return;\n }\n if (this._isTextHighlightOn) {\n this._cursorInfo.globalStartIndex = this._cursorInfo.globalEndIndex;\n }\n else if (evt && (evt.ctrlKey || evt.metaKey)) {\n //ctr + ->\n const rightDelta = this._lines[this._cursorInfo.currentLineIndex].text.length - this._cursorInfo.relativeEndIndex;\n this._cursorInfo.globalStartIndex += rightDelta;\n }\n else if (this._cursorInfo.globalStartIndex < this.text.length) {\n this._cursorInfo.globalStartIndex++;\n }\n // update the cursor\n this._blinkIsEven = false;\n this._isTextHighlightOn = false;\n return;\n case \"ArrowUp\": // UP\n // update the cursor\n this._blinkIsEven = false;\n if (evt) {\n if (evt.shiftKey) {\n if (!this._isTextHighlightOn) {\n this._highlightCursorInfo.initialLineIndex = this._cursorInfo.currentLineIndex;\n this._highlightCursorInfo.initialStartIndex = this._cursorInfo.globalStartIndex;\n this._highlightCursorInfo.initialRelativeStartIndex = this._cursorInfo.relativeStartIndex;\n }\n this._isTextHighlightOn = true;\n this._blinkIsEven = true;\n }\n else {\n this._isTextHighlightOn = false;\n }\n evt.preventDefault();\n }\n if (this._cursorInfo.currentLineIndex === 0) {\n // First line\n this._cursorInfo.globalStartIndex = 0;\n }\n else {\n const currentLine = this._lines[this._cursorInfo.currentLineIndex];\n const upperLine = this._lines[this._cursorInfo.currentLineIndex - 1];\n let tmpIndex = 0;\n let relativeIndex = 0;\n if (!this._isTextHighlightOn || this._cursorInfo.currentLineIndex < this._highlightCursorInfo.initialLineIndex) {\n tmpIndex = this._cursorInfo.globalStartIndex;\n relativeIndex = this._cursorInfo.relativeStartIndex;\n }\n else {\n tmpIndex = this._cursorInfo.globalEndIndex;\n relativeIndex = this._cursorInfo.relativeEndIndex;\n }\n const currentText = currentLine.text.substr(0, relativeIndex);\n const currentWidth = this._contextForBreakLines.measureText(currentText).width;\n let upperWidth = 0;\n let previousWidth = 0;\n tmpIndex -= relativeIndex; // Start of current line\n tmpIndex -= upperLine.text.length + upperLine.lineEnding.length; // Start of upper line\n let upperLineRelativeIndex = 0;\n while (upperWidth < currentWidth && upperLineRelativeIndex < upperLine.text.length) {\n tmpIndex++;\n upperLineRelativeIndex++;\n previousWidth = Math.abs(currentWidth - upperWidth);\n upperWidth = this._contextForBreakLines.measureText(upperLine.text.substr(0, upperLineRelativeIndex)).width;\n }\n // Find closest move\n if (Math.abs(currentWidth - upperWidth) > previousWidth && upperLineRelativeIndex > 0) {\n tmpIndex--;\n }\n if (!this._isTextHighlightOn) {\n this._cursorInfo.globalStartIndex = tmpIndex;\n }\n else if (this._cursorInfo.currentLineIndex <= this._highlightCursorInfo.initialLineIndex) {\n this._cursorInfo.globalStartIndex = tmpIndex;\n this._cursorInfo.globalEndIndex = this._highlightCursorInfo.initialStartIndex;\n this._cursorInfo.relativeEndIndex = this._highlightCursorInfo.initialRelativeStartIndex;\n }\n else {\n this._cursorInfo.globalEndIndex = tmpIndex;\n }\n }\n this._markAsDirty();\n return;\n case \"ArrowDown\": // DOWN\n // update the cursor\n this._blinkIsEven = false;\n if (evt) {\n if (evt.shiftKey) {\n if (!this._isTextHighlightOn) {\n this._highlightCursorInfo.initialLineIndex = this._cursorInfo.currentLineIndex;\n this._highlightCursorInfo.initialStartIndex = this._cursorInfo.globalStartIndex;\n this._highlightCursorInfo.initialRelativeStartIndex = this._cursorInfo.relativeStartIndex;\n }\n this._isTextHighlightOn = true;\n this._blinkIsEven = true;\n }\n else {\n this._isTextHighlightOn = false;\n }\n evt.preventDefault();\n }\n if (this._cursorInfo.currentLineIndex === this._lines.length - 1) {\n // Last line\n this._cursorInfo.globalStartIndex = this.text.length;\n }\n else {\n const currentLine = this._lines[this._cursorInfo.currentLineIndex];\n const underLine = this._lines[this._cursorInfo.currentLineIndex + 1];\n let tmpIndex = 0;\n let relativeIndex = 0;\n if (!this._isTextHighlightOn || this._cursorInfo.currentLineIndex < this._highlightCursorInfo.initialLineIndex) {\n tmpIndex = this._cursorInfo.globalStartIndex;\n relativeIndex = this._cursorInfo.relativeStartIndex;\n }\n else {\n tmpIndex = this._cursorInfo.globalEndIndex;\n relativeIndex = this._cursorInfo.relativeEndIndex;\n }\n const currentText = currentLine.text.substr(0, relativeIndex);\n const currentWidth = this._contextForBreakLines.measureText(currentText).width;\n let underWidth = 0;\n let previousWidth = 0;\n tmpIndex += currentLine.text.length - relativeIndex + currentLine.lineEnding.length; // Start of current line\n let underLineRelativeIndex = 0;\n while (underWidth < currentWidth && underLineRelativeIndex < underLine.text.length) {\n tmpIndex++;\n underLineRelativeIndex++;\n previousWidth = Math.abs(currentWidth - underWidth);\n underWidth = this._contextForBreakLines.measureText(underLine.text.substr(0, underLineRelativeIndex)).width;\n }\n // Find closest move\n if (Math.abs(currentWidth - underWidth) > previousWidth && underLineRelativeIndex > 0) {\n tmpIndex--;\n }\n if (!this._isTextHighlightOn) {\n this._cursorInfo.globalStartIndex = tmpIndex;\n }\n else if (this._cursorInfo.currentLineIndex < this._highlightCursorInfo.initialLineIndex) {\n this._cursorInfo.globalStartIndex = tmpIndex;\n if (this._cursorInfo.globalStartIndex > this._cursorInfo.globalEndIndex) {\n this._cursorInfo.globalEndIndex += this._cursorInfo.globalStartIndex;\n this._cursorInfo.globalStartIndex = this._cursorInfo.globalEndIndex - this._cursorInfo.globalStartIndex;\n this._cursorInfo.globalEndIndex -= this._cursorInfo.globalStartIndex;\n }\n }\n else {\n this._cursorInfo.globalEndIndex = tmpIndex;\n this._cursorInfo.globalStartIndex = this._highlightCursorInfo.initialStartIndex;\n }\n }\n this._markAsDirty();\n return;\n }\n // Printable characters\n if ((key === null || key === void 0 ? void 0 : key.length) === 1) {\n evt === null || evt === void 0 ? void 0 : evt.preventDefault();\n this._currentKey = key;\n this.onBeforeKeyAddObservable.notifyObservers(this);\n key = this._currentKey;\n if (this._addKey) {\n this._isTextHighlightOn = false;\n this._blinkIsEven = false;\n this._prevText = this._textWrapper.text;\n this._textWrapper.removePart(this._cursorInfo.globalStartIndex, this._cursorInfo.globalEndIndex, key);\n this._cursorInfo.globalStartIndex += key.length;\n this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;\n this._textHasChanged();\n }\n }\n }\n _parseLineWordWrap(line = \"\", width, context) {\n const lines = [];\n const words = line.split(\" \");\n let lineWidth = 0;\n for (let n = 0; n < words.length; n++) {\n const testLine = n > 0 ? line + \" \" + words[n] : words[0];\n const metrics = context.measureText(testLine);\n const testWidth = metrics.width;\n if (testWidth > width) {\n if (n > 0) {\n // Avoid first word duplication if of too long\n lineWidth = context.measureText(line).width;\n lines.push({ text: line, width: lineWidth, lineEnding: \" \" });\n }\n line = words[n];\n let flushedLine = \"\";\n line.split(\"\").map((char) => {\n if (context.measureText(flushedLine + char).width > width) {\n lines.push({ text: flushedLine, width: context.measureText(flushedLine).width, lineEnding: \"\" });\n flushedLine = \"\";\n }\n flushedLine += char;\n });\n line = flushedLine;\n // Measure remaining characters\n lineWidth = context.measureText(line).width;\n }\n else {\n lineWidth = testWidth;\n line = testLine;\n }\n }\n lines.push({ text: line, width: lineWidth, lineEnding: \" \" });\n return lines;\n }\n _breakLines(refWidth, context) {\n const lines = [];\n const _lines = (this.text || this.placeholderText).split(\"\\n\");\n if (this.clipContent) {\n for (const _line of _lines) {\n lines.push(...this._parseLineWordWrap(_line, refWidth, context));\n }\n }\n else {\n for (const _line of _lines) {\n lines.push(this._parseLine(_line, context));\n }\n }\n lines[lines.length - 1].lineEnding = \"\\n\";\n return lines;\n }\n _parseLine(line = \"\", context) {\n return { text: line, width: context.measureText(line).width, lineEnding: \" \" };\n }\n /**\n * Processing of child right before the parent measurement update\n *\n * @param parentMeasure The parent measure\n * @param context The rendering canvas\n * @internal\n */\n _preMeasure(parentMeasure, context) {\n if (!this._fontOffset || this._wasDirty) {\n this._fontOffset = Control._GetFontOffset(context.font);\n }\n let text = this._beforeRenderText(this._textWrapper).text;\n // placeholder conditions and color setting\n if (!this.text && this._placeholderText) {\n text = this._placeholderText;\n }\n // measures the textlength -> this.measure.width\n this._textWidth = context.measureText(text).width;\n // we double up the margin width\n const marginWidth = this._margin.getValueInPixel(this._host, parentMeasure.width) * 2;\n if (this._autoStretchWidth) {\n const tmpLines = text.split(\"\\n\");\n const longerString = tmpLines.reduce((acc, val) => {\n const valueLength = context.measureText(val).width;\n const accLength = context.measureText(acc).width;\n return valueLength > accLength ? val : acc;\n }, \"\");\n const longerStringWidth = context.measureText(longerString).width;\n this.width = Math.min(this._maxWidth.getValueInPixel(this._host, parentMeasure.width), longerStringWidth + marginWidth) + \"px\";\n this.autoStretchWidth = true;\n }\n this._availableWidth = this._width.getValueInPixel(this._host, parentMeasure.width) - marginWidth;\n // Prepare lines\n this._lines = this._breakLines(this._availableWidth, context);\n // can we find a cleaner implementation here?\n this._contextForBreakLines = context;\n if (this._autoStretchHeight) {\n const textHeight = this._lines.length * this._fontOffset.height;\n const totalHeight = textHeight + this._margin.getValueInPixel(this._host, parentMeasure.height) * 2;\n this.height = Math.min(this._maxHeight.getValueInPixel(this._host, parentMeasure.height), totalHeight) + \"px\";\n this._autoStretchHeight = true;\n }\n this._availableHeight = this._height.getValueInPixel(this._host, parentMeasure.height) - marginWidth;\n if (this._isFocused) {\n this._cursorInfo.currentLineIndex = 0;\n let lineLength = this._lines[this._cursorInfo.currentLineIndex].text.length + this._lines[this._cursorInfo.currentLineIndex].lineEnding.length;\n let tmpLength = 0;\n while (tmpLength + lineLength <= this._cursorInfo.globalStartIndex) {\n tmpLength += lineLength;\n if (this._cursorInfo.currentLineIndex < this._lines.length - 1) {\n this._cursorInfo.currentLineIndex++;\n lineLength = this._lines[this._cursorInfo.currentLineIndex].text.length + this._lines[this._cursorInfo.currentLineIndex].lineEnding.length;\n }\n }\n }\n }\n _textHasChanged() {\n if (!this._prevText && this._textWrapper.text && this.placeholderText) {\n this._cursorInfo.currentLineIndex = 0;\n this._cursorInfo.globalStartIndex = 1;\n this._cursorInfo.globalEndIndex = 1;\n this._cursorInfo.relativeStartIndex = 1;\n this._cursorInfo.relativeEndIndex = 1;\n }\n super._textHasChanged();\n }\n _computeScroll() {\n this._clipTextLeft = this._currentMeasure.left + this._margin.getValueInPixel(this._host, this._cachedParentMeasure.width);\n this._clipTextTop = this._currentMeasure.top + this._margin.getValueInPixel(this._host, this._cachedParentMeasure.height);\n if (this._isFocused && this._lines[this._cursorInfo.currentLineIndex].width > this._availableWidth) {\n const textLeft = this._clipTextLeft - this._lines[this._cursorInfo.currentLineIndex].width + this._availableWidth;\n if (!this._scrollLeft) {\n this._scrollLeft = textLeft;\n }\n }\n else {\n this._scrollLeft = this._clipTextLeft;\n }\n if (this._isFocused && !this._autoStretchHeight) {\n const selectedHeight = (this._cursorInfo.currentLineIndex + 1) * this._fontOffset.height;\n const textTop = this._clipTextTop - selectedHeight;\n if (!this._scrollTop) {\n this._scrollTop = textTop;\n }\n }\n else {\n this._scrollTop = this._clipTextTop;\n }\n }\n /**\n * Processing of child after the parent measurement update\n *\n * @internal\n */\n _additionalProcessing() {\n // Flush the highlighted text each frame\n this.highlightedText = \"\";\n this.onLinesReadyObservable.notifyObservers(this);\n }\n _drawText(text, textWidth, y, context) {\n const width = this._currentMeasure.width;\n let x = this._scrollLeft;\n switch (this._textHorizontalAlignment) {\n case Control.HORIZONTAL_ALIGNMENT_LEFT:\n x += 0;\n break;\n case Control.HORIZONTAL_ALIGNMENT_RIGHT:\n x += width - textWidth;\n break;\n case Control.HORIZONTAL_ALIGNMENT_CENTER:\n x += (width - textWidth) / 2;\n break;\n }\n if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {\n context.shadowColor = this.shadowColor;\n context.shadowBlur = this.shadowBlur;\n context.shadowOffsetX = this.shadowOffsetX;\n context.shadowOffsetY = this.shadowOffsetY;\n }\n if (this.outlineWidth) {\n context.strokeText(text, this._currentMeasure.left + x, y);\n }\n context.fillText(text, x, y);\n }\n /**\n * Copy the text in the clipboard\n *\n * @param ev The clipboard event\n * @internal\n */\n _onCopyText(ev) {\n this._isTextHighlightOn = false;\n //when write permission to clipbaord data is denied\n try {\n ev.clipboardData && ev.clipboardData.setData(\"text/plain\", this._highlightedText);\n }\n catch (_a) { } //pass\n this._host.clipboardData = this._highlightedText;\n }\n /**\n * Cut the text and copy it in the clipboard\n *\n * @param ev The clipboard event\n * @internal\n */\n _onCutText(ev) {\n if (!this._highlightedText) {\n return;\n }\n //when write permission to clipbaord data is denied\n try {\n ev.clipboardData && ev.clipboardData.setData(\"text/plain\", this._highlightedText);\n }\n catch (_a) { } //pass\n this._host.clipboardData = this._highlightedText;\n this._prevText = this._textWrapper.text;\n this._textWrapper.removePart(this._cursorInfo.globalStartIndex, this._cursorInfo.globalEndIndex);\n this._textHasChanged();\n }\n /**\n * Paste the copied text from the clipboard\n *\n * @param ev The clipboard event\n * @internal\n */\n _onPasteText(ev) {\n let data = \"\";\n if (ev.clipboardData && ev.clipboardData.types.indexOf(\"text/plain\") !== -1) {\n data = ev.clipboardData.getData(\"text/plain\");\n }\n else {\n //get the cached data; returns blank string by default\n data = this._host.clipboardData;\n }\n this._isTextHighlightOn = false;\n this._prevText = this._textWrapper.text;\n this._textWrapper.removePart(this._cursorInfo.globalStartIndex, this._cursorInfo.globalEndIndex, data);\n const deltaIndex = data.length - (this._cursorInfo.globalEndIndex - this._cursorInfo.globalStartIndex);\n this._cursorInfo.globalStartIndex += deltaIndex;\n this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;\n this._textHasChanged();\n }\n _draw(context) {\n var _a, _b;\n this._computeScroll();\n this._scrollLeft = (_a = this._scrollLeft) !== null && _a !== void 0 ? _a : 0;\n this._scrollTop = (_b = this._scrollTop) !== null && _b !== void 0 ? _b : 0;\n context.save();\n this._applyStates(context);\n if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {\n context.shadowColor = this.shadowColor;\n context.shadowBlur = this.shadowBlur;\n context.shadowOffsetX = this.shadowOffsetX;\n context.shadowOffsetY = this.shadowOffsetY;\n }\n // Background\n if (this._isFocused) {\n if (this._focusedBackground) {\n context.fillStyle = this._isEnabled ? this._focusedBackground : this._disabledColor;\n context.fillRect(this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);\n }\n }\n else if (this._background) {\n context.fillStyle = this._isEnabled ? this._background : this._disabledColor;\n context.fillRect(this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);\n }\n if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {\n context.shadowBlur = 0;\n context.shadowOffsetX = 0;\n context.shadowOffsetY = 0;\n }\n // sets the color of the rectangle (border if background available)\n if (this.color) {\n context.fillStyle = this.color;\n }\n const height = this._currentMeasure.height;\n const width = this._currentMeasure.width;\n let rootY = 0;\n switch (this._textVerticalAlignment) {\n case Control.VERTICAL_ALIGNMENT_TOP:\n rootY = this._fontOffset.ascent;\n break;\n case Control.VERTICAL_ALIGNMENT_BOTTOM:\n rootY = height - this._fontOffset.height * (this._lines.length - 1) - this._fontOffset.descent;\n break;\n case Control.VERTICAL_ALIGNMENT_CENTER:\n rootY = this._fontOffset.ascent + (height - this._fontOffset.height * this._lines.length) / 2;\n break;\n }\n context.save();\n context.beginPath();\n context.fillStyle = this.fontStyle;\n if (!this._textWrapper.text && this.placeholderText) {\n context.fillStyle = this._placeholderColor;\n }\n // here we define the visible reactangle to clip it in next line\n context.rect(this._clipTextLeft, this._clipTextTop, this._availableWidth + 2, this._availableHeight + 2);\n context.clip();\n // Text\n rootY += this._scrollTop;\n for (let i = 0; i < this._lines.length; i++) {\n const line = this._lines[i];\n if (i !== 0 && this._lineSpacing.internalValue !== 0) {\n if (this._lineSpacing.isPixel) {\n rootY += this._lineSpacing.getValue(this._host);\n }\n else {\n rootY = rootY + this._lineSpacing.getValue(this._host) * this._height.getValueInPixel(this._host, this._cachedParentMeasure.height);\n }\n }\n this._drawText(line.text, line.width, rootY, context);\n rootY += this._fontOffset.height;\n }\n context.restore();\n // Cursor\n if (this._isFocused) {\n // Render cursor\n if (!this._blinkIsEven || this._isTextHighlightOn) {\n let cursorLeft = this._scrollLeft + context.measureText(this._lines[this._cursorInfo.currentLineIndex].text.substr(0, this._cursorInfo.relativeStartIndex)).width;\n if (cursorLeft < this._clipTextLeft) {\n this._scrollLeft += this._clipTextLeft - cursorLeft;\n cursorLeft = this._clipTextLeft;\n this._markAsDirty();\n }\n else if (cursorLeft > this._clipTextLeft + this._availableWidth) {\n this._scrollLeft += this._clipTextLeft + this._availableWidth - cursorLeft;\n cursorLeft = this._clipTextLeft + this._availableWidth;\n this._markAsDirty();\n }\n let cursorTop = this._scrollTop + this._cursorInfo.currentLineIndex * this._fontOffset.height; //cursorTop distance from top to cursor start\n if (cursorTop < this._clipTextTop) {\n this._scrollTop += this._clipTextTop - cursorTop;\n cursorTop = this._clipTextTop;\n this._markAsDirty();\n }\n else if (cursorTop + this._fontOffset.height > this._clipTextTop + this._availableHeight) {\n this._scrollTop += this._clipTextTop + this._availableHeight - cursorTop - this._fontOffset.height;\n cursorTop = this._clipTextTop + this._availableHeight - this._fontOffset.height;\n this._markAsDirty();\n }\n if (!this._isTextHighlightOn) {\n context.fillRect(cursorLeft, cursorTop, 2, this._fontOffset.height);\n }\n }\n this._resetBlinking();\n //show the highlighted text\n if (this._isTextHighlightOn) {\n clearTimeout(this._blinkTimeout);\n this._highlightedText = this.text.substring(this._cursorInfo.globalStartIndex, this._cursorInfo.globalEndIndex);\n context.globalAlpha = this._highligherOpacity;\n context.fillStyle = this._textHighlightColor;\n const startLineIndex = Math.min(this._cursorInfo.currentLineIndex, this._highlightCursorInfo.initialLineIndex);\n const endLineIndex = Math.max(this._cursorInfo.currentLineIndex, this._highlightCursorInfo.initialLineIndex);\n let highlightRootY = this._scrollTop + startLineIndex * this._fontOffset.height;\n for (let i = startLineIndex; i <= endLineIndex; i++) {\n const line = this._lines[i];\n let highlightRootX = this._scrollLeft;\n switch (this._textHorizontalAlignment) {\n case Control.HORIZONTAL_ALIGNMENT_LEFT:\n highlightRootX += 0;\n break;\n case Control.HORIZONTAL_ALIGNMENT_RIGHT:\n highlightRootX += width - line.width;\n break;\n case Control.HORIZONTAL_ALIGNMENT_CENTER:\n highlightRootX += (width - line.width) / 2;\n break;\n }\n const begin = i === startLineIndex ? this._cursorInfo.relativeStartIndex : 0;\n const end = i === endLineIndex ? this._cursorInfo.relativeEndIndex : line.text.length;\n const leftOffsetWidth = context.measureText(line.text.substr(0, begin)).width;\n const selectedText = line.text.substring(begin, end);\n const hightlightWidth = context.measureText(selectedText).width;\n context.fillRect(highlightRootX + leftOffsetWidth, highlightRootY, hightlightWidth, this._fontOffset.height);\n highlightRootY += this._fontOffset.height;\n }\n if (this._cursorInfo.globalEndIndex === this._cursorInfo.globalStartIndex) {\n this._resetBlinking();\n }\n }\n }\n context.restore();\n // Border\n if (this._thickness) {\n if (this._isFocused) {\n if (this.focusedColor) {\n context.strokeStyle = this.focusedColor;\n }\n }\n else {\n if (this.color) {\n context.strokeStyle = this.color;\n }\n }\n context.lineWidth = this._thickness;\n context.strokeRect(this._currentMeasure.left + this._thickness / 2, this._currentMeasure.top + this._thickness / 2, this._currentMeasure.width - this._thickness, this._currentMeasure.height - this._thickness);\n }\n }\n _resetBlinking() {\n clearTimeout(this._blinkTimeout);\n this._blinkTimeout = setTimeout(() => {\n this._blinkIsEven = !this._blinkIsEven;\n this._markAsDirty();\n }, 500);\n }\n _applyStates(context) {\n super._applyStates(context);\n if (this.outlineWidth) {\n context.lineWidth = this.outlineWidth;\n context.strokeStyle = this.outlineColor;\n }\n }\n _onPointerDown(target, coordinates, pointerId, buttonIndex, pi) {\n if (!super._onPointerDown(target, coordinates, pointerId, buttonIndex, pi)) {\n return false;\n }\n if (this.isReadOnly) {\n return true;\n }\n this._clickedCoordinateX = coordinates.x;\n this._clickedCoordinateY = coordinates.y;\n this._isTextHighlightOn = false;\n this._highlightedText = \"\";\n this._isPointerDown = true;\n this._host._capturingControl[pointerId] = this;\n if (this._host.focusedControl === this) {\n // Move cursor\n clearTimeout(this._blinkTimeout);\n this._markAsDirty();\n return true;\n }\n if (!this._isEnabled) {\n return false;\n }\n this._host.focusedControl = this;\n return true;\n }\n // for textselection\n _onPointerMove(target, coordinates, pointerId, pi) {\n // Avoid Chromium-like beahavior when this event is fired right after onPointerDown\n if (pi.event.movementX === 0 && pi.event.movementY === 0) {\n return;\n }\n if (this._host.focusedControl === this && this._isPointerDown && !this.isReadOnly) {\n this._clickedCoordinateX = coordinates.x;\n this._clickedCoordinateY = coordinates.y;\n if (!this._isTextHighlightOn) {\n this._highlightCursorInfo.initialLineIndex = this._cursorInfo.currentLineIndex;\n this._highlightCursorInfo.initialStartIndex = this._cursorInfo.globalStartIndex;\n this._highlightCursorInfo.initialRelativeStartIndex = this._cursorInfo.relativeStartIndex;\n this._isTextHighlightOn = true;\n }\n this._markAsDirty();\n }\n super._onPointerMove(target, coordinates, pointerId, pi);\n }\n /**\n * Apply the correct position of cursor according to current modification\n */\n _updateCursorPosition() {\n var _a;\n if (!this._isFocused) {\n return;\n }\n if (!this._textWrapper.text && this.placeholderText) {\n this._cursorInfo.currentLineIndex = 0;\n this._cursorInfo.globalStartIndex = 0;\n this._cursorInfo.globalEndIndex = 0;\n this._cursorInfo.relativeStartIndex = 0;\n this._cursorInfo.relativeEndIndex = 0;\n }\n else {\n if (this._clickedCoordinateX && this._clickedCoordinateY) {\n if (!this._isTextHighlightOn) {\n this._cursorInfo = {\n globalStartIndex: 0,\n globalEndIndex: 0,\n relativeStartIndex: 0,\n relativeEndIndex: 0,\n currentLineIndex: 0,\n };\n }\n let globalIndex = 0;\n let relativeIndex = 0;\n const lastClickedCoordinateY = this._clickedCoordinateY - this._scrollTop;\n const relativeCoordinateY = Math.floor(lastClickedCoordinateY / this._fontOffset.height);\n this._cursorInfo.currentLineIndex = Math.min(Math.max(relativeCoordinateY, 0), this._lines.length - 1);\n let currentSize = 0;\n const relativeXPosition = this._clickedCoordinateX - ((_a = this._scrollLeft) !== null && _a !== void 0 ? _a : 0);\n let previousDist = 0;\n for (let index = 0; index < this._cursorInfo.currentLineIndex; index++) {\n const line = this._lines[index];\n globalIndex += line.text.length + line.lineEnding.length;\n }\n while (currentSize < relativeXPosition && this._lines[this._cursorInfo.currentLineIndex].text.length > relativeIndex) {\n relativeIndex++;\n previousDist = Math.abs(relativeXPosition - currentSize);\n currentSize = this._contextForBreakLines.measureText(this._lines[this._cursorInfo.currentLineIndex].text.substr(0, relativeIndex)).width;\n }\n // Find closest move\n if (Math.abs(relativeXPosition - currentSize) > previousDist && relativeIndex > 0) {\n relativeIndex--;\n }\n globalIndex += relativeIndex;\n if (!this._isTextHighlightOn) {\n this._cursorInfo.globalStartIndex = globalIndex;\n this._cursorInfo.relativeStartIndex = relativeIndex;\n this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;\n this._cursorInfo.relativeEndIndex = this._cursorInfo.relativeStartIndex;\n }\n else {\n if (globalIndex < this._highlightCursorInfo.initialStartIndex) {\n this._cursorInfo.globalStartIndex = globalIndex;\n this._cursorInfo.relativeStartIndex = relativeIndex;\n this._cursorInfo.globalEndIndex = this._highlightCursorInfo.initialStartIndex;\n this._cursorInfo.relativeEndIndex = this._highlightCursorInfo.initialRelativeStartIndex;\n }\n else {\n this._cursorInfo.globalStartIndex = this._highlightCursorInfo.initialStartIndex;\n this._cursorInfo.relativeStartIndex = this._highlightCursorInfo.initialRelativeStartIndex;\n this._cursorInfo.globalEndIndex = globalIndex;\n this._cursorInfo.relativeEndIndex = relativeIndex;\n }\n }\n // Avoid the caret during highlighting\n this._blinkIsEven = this._isTextHighlightOn;\n this._clickedCoordinateX = null;\n this._clickedCoordinateY = null;\n }\n else {\n // Standard behavior same as Current line is at least above the initial highlight index\n this._cursorInfo.relativeStartIndex = 0;\n this._cursorInfo.currentLineIndex = 0;\n let lineLength = this._lines[this._cursorInfo.currentLineIndex].text.length + this._lines[this._cursorInfo.currentLineIndex].lineEnding.length;\n let tmpLength = 0;\n while (tmpLength + lineLength <= this._cursorInfo.globalStartIndex) {\n tmpLength += lineLength;\n if (this._cursorInfo.currentLineIndex < this._lines.length - 1) {\n this._cursorInfo.currentLineIndex++;\n lineLength = this._lines[this._cursorInfo.currentLineIndex].text.length + this._lines[this._cursorInfo.currentLineIndex].lineEnding.length;\n }\n }\n this._cursorInfo.relativeStartIndex = this._cursorInfo.globalStartIndex - tmpLength;\n if (this._highlightCursorInfo.initialStartIndex !== -1 && this._cursorInfo.globalStartIndex >= this._highlightCursorInfo.initialStartIndex) {\n // Current line is at least below the initial highlight index\n while (tmpLength + lineLength <= this._cursorInfo.globalEndIndex) {\n tmpLength += lineLength;\n if (this._cursorInfo.currentLineIndex < this._lines.length - 1) {\n this._cursorInfo.currentLineIndex++;\n lineLength = this._lines[this._cursorInfo.currentLineIndex].text.length + this._lines[this._cursorInfo.currentLineIndex].lineEnding.length;\n }\n }\n this._cursorInfo.relativeEndIndex = this._cursorInfo.globalEndIndex - tmpLength;\n }\n else if (!this._isTextHighlightOn) {\n this._cursorInfo.relativeEndIndex = this._cursorInfo.relativeStartIndex;\n this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;\n }\n }\n }\n }\n /**\n * Update all values of cursor information based on cursorIndex value\n *\n * @param offset The index to take care of\n * @internal\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _updateValueFromCursorIndex(offset) {\n // Override to avoid parent behavior during _onPointerMove\n }\n /**\n * Select the word immediatly under the cursor on double click\n *\n * @param _evt Pointer informations of double click\n * @internal\n */\n _processDblClick(_evt) {\n //pre-find the start and end index of the word under cursor, speeds up the rendering\n let moveLeft, moveRight;\n do {\n moveLeft = this._cursorInfo.globalStartIndex > 0 && this._textWrapper.isWord(this._cursorInfo.globalStartIndex - 1) ? --this._cursorInfo.globalStartIndex : 0;\n moveRight =\n this._cursorInfo.globalEndIndex < this._textWrapper.length && this._textWrapper.isWord(this._cursorInfo.globalEndIndex) ? ++this._cursorInfo.globalEndIndex : 0;\n } while (moveLeft || moveRight);\n this._highlightCursorInfo.initialLineIndex = this._cursorInfo.currentLineIndex;\n this._highlightCursorInfo.initialStartIndex = this._cursorInfo.globalStartIndex;\n this.onTextHighlightObservable.notifyObservers(this);\n this._isTextHighlightOn = true;\n this._blinkIsEven = true;\n this._markAsDirty();\n }\n /** @internal */\n _selectAllText() {\n this._isTextHighlightOn = true;\n this._blinkIsEven = true;\n this._highlightCursorInfo = {\n initialStartIndex: 0,\n initialRelativeStartIndex: 0,\n initialLineIndex: 0,\n };\n this._cursorInfo = {\n globalStartIndex: 0,\n globalEndIndex: this._textWrapper.length,\n relativeEndIndex: this._lines[this._lines.length - 1].text.length,\n relativeStartIndex: 0,\n currentLineIndex: this._lines.length - 1,\n };\n this._markAsDirty();\n }\n dispose() {\n super.dispose();\n this.onLinesReadyObservable.clear();\n }\n}\n__decorate([\n serialize()\n], InputTextArea.prototype, \"autoStretchHeight\", null);\n__decorate([\n serialize()\n], InputTextArea.prototype, \"maxHeight\", null);\nRegisterClass(\"BABYLON.GUI.InputTextArea\", InputTextArea);\n//# sourceMappingURL=inputTextArea.js.map","import { InputText } from \"./inputText.js\";\nimport { RegisterClass } from \"@babylonjs/core/Misc/typeStore.js\";\nimport { TextWrapper } from \"./textWrapper.js\";\n/**\n * Class used to create a password control\n */\nexport class InputPassword extends InputText {\n _getTypeName() {\n return \"InputPassword\";\n }\n _beforeRenderText(textWrapper) {\n const pwdTextWrapper = new TextWrapper();\n let txt = \"\";\n for (let i = 0; i < textWrapper.length; i++) {\n txt += \"\\u2022\";\n }\n pwdTextWrapper.text = txt;\n return pwdTextWrapper;\n }\n}\nRegisterClass(\"BABYLON.GUI.InputPassword\", InputPassword);\n//# sourceMappingURL=inputPassword.js.map","import { __decorate } from \"@babylonjs/core/tslib.es6.js\";\nimport { Vector3, Matrix } from \"@babylonjs/core/Maths/math.vector.js\";\nimport { Tools } from \"@babylonjs/core/Misc/tools.js\";\nimport { Control } from \"./control.js\";\nimport { ValueAndUnit } from \"../valueAndUnit.js\";\nimport { RegisterClass } from \"@babylonjs/core/Misc/typeStore.js\";\nimport { serialize } from \"@babylonjs/core/Misc/decorators.js\";\n/** Class used to render 2D lines */\nexport class Line extends Control {\n /** Gets or sets the dash pattern */\n get dash() {\n return this._dash;\n }\n set dash(value) {\n if (this._dash === value) {\n return;\n }\n this._dash = value;\n this._markAsDirty();\n }\n /** Gets or sets the control connected with the line end */\n get connectedControl() {\n return this._connectedControl;\n }\n set connectedControl(value) {\n if (this._connectedControl === value) {\n return;\n }\n if (this._connectedControlDirtyObserver && this._connectedControl) {\n this._connectedControl.onDirtyObservable.remove(this._connectedControlDirtyObserver);\n this._connectedControlDirtyObserver = null;\n }\n if (value) {\n this._connectedControlDirtyObserver = value.onDirtyObservable.add(() => this._markAsDirty());\n }\n this._connectedControl = value;\n this._markAsDirty();\n }\n /** Gets or sets start coordinates on X axis */\n get x1() {\n return this._x1.toString(this._host);\n }\n set x1(value) {\n if (this._x1.toString(this._host) === value) {\n return;\n }\n if (this._x1.fromString(value)) {\n this._markAsDirty();\n }\n }\n /** Gets or sets start coordinates on Y axis */\n get y1() {\n return this._y1.toString(this._host);\n }\n set y1(value) {\n if (this._y1.toString(this._host) === value) {\n return;\n }\n if (this._y1.fromString(value)) {\n this._markAsDirty();\n }\n }\n /** Gets or sets end coordinates on X axis */\n get x2() {\n return this._x2.toString(this._host);\n }\n set x2(value) {\n if (this._x2.toString(this._host) === value) {\n return;\n }\n if (this._x2.fromString(value)) {\n this._markAsDirty();\n }\n }\n /** Gets or sets end coordinates on Y axis */\n get y2() {\n return this._y2.toString(this._host);\n }\n set y2(value) {\n if (this._y2.toString(this._host) === value) {\n return;\n }\n if (this._y2.fromString(value)) {\n this._markAsDirty();\n }\n }\n /** Gets or sets line width */\n get lineWidth() {\n return this._lineWidth;\n }\n set lineWidth(value) {\n if (this._lineWidth === value) {\n return;\n }\n this._lineWidth = value;\n this._markAsDirty();\n }\n /** Gets or sets horizontal alignment */\n set horizontalAlignment(value) {\n return;\n }\n /** Gets or sets vertical alignment */\n set verticalAlignment(value) {\n return;\n }\n /** @internal */\n get _effectiveX2() {\n return (this._connectedControl ? this._connectedControl.centerX : 0) + this._x2.getValue(this._host);\n }\n /** @internal */\n get _effectiveY2() {\n return (this._connectedControl ? this._connectedControl.centerY : 0) + this._y2.getValue(this._host);\n }\n /**\n * Creates a new Line\n * @param name defines the control name\n */\n constructor(name) {\n super(name);\n this.name = name;\n this._lineWidth = 1;\n /** @internal */\n this._x1 = new ValueAndUnit(0);\n /** @internal */\n this._y1 = new ValueAndUnit(0);\n /** @internal */\n this._x2 = new ValueAndUnit(0);\n /** @internal */\n this._y2 = new ValueAndUnit(0);\n this._dash = new Array();\n this._automaticSize = true;\n this.isHitTestVisible = false;\n this._horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;\n this._verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP;\n }\n _getTypeName() {\n return \"Line\";\n }\n _draw(context) {\n context.save();\n if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {\n context.shadowColor = this.shadowColor;\n context.shadowBlur = this.shadowBlur;\n context.shadowOffsetX = this.shadowOffsetX;\n context.shadowOffsetY = this.shadowOffsetY;\n }\n this._applyStates(context);\n context.strokeStyle = this._getColor(context);\n context.lineWidth = this._lineWidth;\n context.setLineDash(this._dash);\n context.beginPath();\n context.moveTo(this._cachedParentMeasure.left + this._x1.getValue(this._host), this._cachedParentMeasure.top + this._y1.getValue(this._host));\n context.lineTo(this._cachedParentMeasure.left + this._effectiveX2, this._cachedParentMeasure.top + this._effectiveY2);\n context.stroke();\n context.restore();\n }\n _measure() {\n // Width / Height\n this._currentMeasure.width = Math.abs(this._x1.getValue(this._host) - this._effectiveX2) + this._lineWidth;\n this._currentMeasure.height = Math.abs(this._y1.getValue(this._host) - this._effectiveY2) + this._lineWidth;\n }\n _computeAlignment(parentMeasure) {\n this._currentMeasure.left = parentMeasure.left + Math.min(this._x1.getValue(this._host), this._effectiveX2) - this._lineWidth / 2;\n this._currentMeasure.top = parentMeasure.top + Math.min(this._y1.getValue(this._host), this._effectiveY2) - this._lineWidth / 2;\n }\n /**\n * Move one end of the line given 3D cartesian coordinates.\n * @param position Targeted world position\n * @param scene Scene\n * @param end (opt) Set to true to assign x2 and y2 coordinates of the line. Default assign to x1 and y1.\n */\n moveToVector3(position, scene, end = false) {\n if (!this._host || this.parent !== this._host._rootContainer) {\n Tools.Error(\"Cannot move a control to a vector3 if the control is not at root level\");\n return;\n }\n const globalViewport = this._host._getGlobalViewport();\n const projectedPosition = Vector3.Project(position, Matrix.IdentityReadOnly, scene.getTransformMatrix(), globalViewport);\n this._moveToProjectedPosition(projectedPosition, end);\n if (projectedPosition.z < 0 || projectedPosition.z > 1) {\n this.notRenderable = true;\n return;\n }\n this.notRenderable = false;\n }\n /**\n * Move one end of the line to a position in screen absolute space.\n * @param projectedPosition Position in screen absolute space (X, Y)\n * @param end (opt) Set to true to assign x2 and y2 coordinates of the line. Default assign to x1 and y1.\n */\n _moveToProjectedPosition(projectedPosition, end = false) {\n const x = projectedPosition.x + this._linkOffsetX.getValue(this._host) + \"px\";\n const y = projectedPosition.y + this._linkOffsetY.getValue(this._host) + \"px\";\n if (end) {\n this.x2 = x;\n this.y2 = y;\n this._x2.ignoreAdaptiveScaling = true;\n this._y2.ignoreAdaptiveScaling = true;\n }\n else {\n this.x1 = x;\n this.y1 = y;\n this._x1.ignoreAdaptiveScaling = true;\n this._y1.ignoreAdaptiveScaling = true;\n }\n }\n}\n__decorate([\n serialize()\n], Line.prototype, \"dash\", null);\n__decorate([\n serialize()\n], Line.prototype, \"x1\", null);\n__decorate([\n serialize()\n], Line.prototype, \"y1\", null);\n__decorate([\n serialize()\n], Line.prototype, \"x2\", null);\n__decorate([\n serialize()\n], Line.prototype, \"y2\", null);\n__decorate([\n serialize()\n], Line.prototype, \"lineWidth\", null);\nRegisterClass(\"BABYLON.GUI.Line\", Line);\n//# sourceMappingURL=line.js.map","import { Vector3 } from \"@babylonjs/core/Maths/math.vector.js\";\nimport { Epsilon } from \"@babylonjs/core/Maths/math.constants.js\";\nimport { ValueAndUnit } from \"./valueAndUnit.js\";\n/**\n * Class used to store a point for a MultiLine object.\n * The point can be pure 2D coordinates, a mesh or a control\n */\nexport class MultiLinePoint {\n /**\n * Creates a new MultiLinePoint\n * @param multiLine defines the source MultiLine object\n */\n constructor(multiLine) {\n this._multiLine = multiLine;\n this._x = new ValueAndUnit(0);\n this._y = new ValueAndUnit(0);\n this._point = new Vector3(0, 0, 0);\n }\n /** Gets or sets x coordinate */\n get x() {\n return this._x.toString(this._multiLine._host);\n }\n set x(value) {\n if (this._x.toString(this._multiLine._host) === value) {\n return;\n }\n if (this._x.fromString(value)) {\n this._multiLine._markAsDirty();\n }\n }\n /** Gets or sets y coordinate */\n get y() {\n return this._y.toString(this._multiLine._host);\n }\n set y(value) {\n if (this._y.toString(this._multiLine._host) === value) {\n return;\n }\n if (this._y.fromString(value)) {\n this._multiLine._markAsDirty();\n }\n }\n /** Gets or sets the control associated with this point */\n get control() {\n return this._control;\n }\n set control(value) {\n if (this._control === value) {\n return;\n }\n if (this._control && this._controlObserver) {\n this._control.onDirtyObservable.remove(this._controlObserver);\n this._controlObserver = null;\n }\n this._control = value;\n if (this._control) {\n this._controlObserver = this._control.onDirtyObservable.add(this._multiLine.onPointUpdate);\n }\n this._multiLine._markAsDirty();\n }\n /** Gets or sets the mesh associated with this point */\n get mesh() {\n return this._mesh;\n }\n set mesh(value) {\n if (this._mesh === value) {\n return;\n }\n if (this._mesh && this._meshObserver) {\n this._mesh.getScene().onAfterCameraRenderObservable.remove(this._meshObserver);\n }\n this._mesh = value;\n if (this._mesh) {\n this._meshObserver = this._mesh.getScene().onAfterCameraRenderObservable.add(this._multiLine.onPointUpdate);\n }\n this._multiLine._markAsDirty();\n }\n /** Resets links */\n resetLinks() {\n this.control = null;\n this.mesh = null;\n }\n /**\n * Gets a translation vector with Z component\n * @returns the translation vector\n */\n translate() {\n this._point = this._translatePoint();\n return this._point;\n }\n _translatePoint() {\n if (this._mesh != null) {\n return this._multiLine._host.getProjectedPositionWithZ(this._mesh.getBoundingInfo().boundingSphere.center, this._mesh.getWorldMatrix());\n }\n else if (this._control != null) {\n return new Vector3(this._control.centerX, this._control.centerY, 1 - Epsilon);\n }\n else {\n const host = this._multiLine._host;\n const xValue = this._x.getValueInPixel(host, Number(host._canvas.width));\n const yValue = this._y.getValueInPixel(host, Number(host._canvas.height));\n return new Vector3(xValue, yValue, 1 - Epsilon);\n }\n }\n /** Release associated resources */\n dispose() {\n this.resetLinks();\n }\n}\n//# sourceMappingURL=multiLinePoint.js.map","import { __decorate } from \"@babylonjs/core/tslib.es6.js\";\nimport { AbstractMesh } from \"@babylonjs/core/Meshes/abstractMesh.js\";\nimport { Control } from \"./control.js\";\nimport { MultiLinePoint } from \"../multiLinePoint.js\";\nimport { RegisterClass } from \"@babylonjs/core/Misc/typeStore.js\";\nimport { serialize } from \"@babylonjs/core/Misc/decorators.js\";\n/**\n * Class used to create multi line control\n */\nexport class MultiLine extends Control {\n /**\n * Creates a new MultiLine\n * @param name defines the control name\n */\n constructor(name) {\n super(name);\n this.name = name;\n this._lineWidth = 1;\n /** Function called when a point is updated */\n this.onPointUpdate = () => {\n this._markAsDirty();\n };\n this._automaticSize = true;\n this.isHitTestVisible = false;\n this._horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;\n this._verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP;\n this._dash = [];\n this._points = [];\n }\n /** Gets or sets dash pattern */\n get dash() {\n return this._dash;\n }\n set dash(value) {\n if (this._dash === value) {\n return;\n }\n this._dash = value;\n this._markAsDirty();\n }\n /**\n * Gets point stored at specified index\n * @param index defines the index to look for\n * @returns the requested point if found\n */\n getAt(index) {\n if (!this._points[index]) {\n this._points[index] = new MultiLinePoint(this);\n }\n return this._points[index];\n }\n /**\n * Adds new points to the point collection\n * @param items defines the list of items (mesh, control or 2d coordinates) to add\n * @returns the list of created MultiLinePoint\n */\n add(...items) {\n return items.map((item) => this.push(item));\n }\n /**\n * Adds a new point to the point collection\n * @param item defines the item (mesh, control or 2d coordinates) to add\n * @returns the created MultiLinePoint\n */\n push(item) {\n const point = this.getAt(this._points.length);\n if (item == null) {\n return point;\n }\n if (item instanceof AbstractMesh) {\n point.mesh = item;\n }\n else if (item instanceof Control) {\n point.control = item;\n }\n else if (item.x != null && item.y != null) {\n point.x = item.x;\n point.y = item.y;\n }\n return point;\n }\n /**\n * Remove a specific value or point from the active point collection\n * @param value defines the value or point to remove\n */\n remove(value) {\n let index;\n if (value instanceof MultiLinePoint) {\n index = this._points.indexOf(value);\n if (index === -1) {\n return;\n }\n }\n else {\n index = value;\n }\n const point = this._points[index];\n if (!point) {\n return;\n }\n point.dispose();\n this._points.splice(index, 1);\n }\n /**\n * Resets this object to initial state (no point)\n */\n reset() {\n while (this._points.length > 0) {\n this.remove(this._points.length - 1);\n }\n }\n /**\n * Resets all links\n */\n resetLinks() {\n this._points.forEach((point) => {\n if (point != null) {\n point.resetLinks();\n }\n });\n }\n /** Gets or sets line width */\n get lineWidth() {\n return this._lineWidth;\n }\n set lineWidth(value) {\n if (this._lineWidth === value) {\n return;\n }\n this._lineWidth = value;\n this._markAsDirty();\n }\n set horizontalAlignment(value) {\n return;\n }\n set verticalAlignment(value) {\n return;\n }\n _getTypeName() {\n return \"MultiLine\";\n }\n _draw(context) {\n context.save();\n if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {\n context.shadowColor = this.shadowColor;\n context.shadowBlur = this.shadowBlur;\n context.shadowOffsetX = this.shadowOffsetX;\n context.shadowOffsetY = this.shadowOffsetY;\n }\n this._applyStates(context);\n context.strokeStyle = this.color;\n context.lineWidth = this._lineWidth;\n context.setLineDash(this._dash);\n context.beginPath();\n let first = true; //first index is not necessarily 0\n let previousPoint;\n this._points.forEach((point) => {\n if (!point) {\n return;\n }\n if (first) {\n context.moveTo(point._point.x, point._point.y);\n first = false;\n }\n else {\n if (point._point.z < 1 && previousPoint.z < 1) {\n context.lineTo(point._point.x, point._point.y);\n }\n else {\n context.moveTo(point._point.x, point._point.y);\n }\n }\n previousPoint = point._point;\n });\n context.stroke();\n context.restore();\n }\n _additionalProcessing() {\n this._minX = null;\n this._minY = null;\n this._maxX = null;\n this._maxY = null;\n this._points.forEach((point) => {\n if (!point) {\n return;\n }\n point.translate();\n if (this._minX == null || point._point.x < this._minX) {\n this._minX = point._point.x;\n }\n if (this._minY == null || point._point.y < this._minY) {\n this._minY = point._point.y;\n }\n if (this._maxX == null || point._point.x > this._maxX) {\n this._maxX = point._point.x;\n }\n if (this._maxY == null || point._point.y > this._maxY) {\n this._maxY = point._point.y;\n }\n });\n if (this._minX == null) {\n this._minX = 0;\n }\n if (this._minY == null) {\n this._minY = 0;\n }\n if (this._maxX == null) {\n this._maxX = 0;\n }\n if (this._maxY == null) {\n this._maxY = 0;\n }\n }\n _measure() {\n if (this._minX == null || this._maxX == null || this._minY == null || this._maxY == null) {\n return;\n }\n this._currentMeasure.width = Math.abs(this._maxX - this._minX) + this._lineWidth;\n this._currentMeasure.height = Math.abs(this._maxY - this._minY) + this._lineWidth;\n }\n _computeAlignment() {\n if (this._minX == null || this._minY == null) {\n return;\n }\n this._currentMeasure.left = this._minX - this._lineWidth / 2;\n this._currentMeasure.top = this._minY - this._lineWidth / 2;\n }\n dispose() {\n this.reset();\n super.dispose();\n }\n}\n__decorate([\n serialize()\n], MultiLine.prototype, \"dash\", null);\nRegisterClass(\"BABYLON.GUI.MultiLine\", MultiLine);\n//# sourceMappingURL=multiLine.js.map","import { __decorate } from \"@babylonjs/core/tslib.es6.js\";\nimport { Observable } from \"@babylonjs/core/Misc/observable.js\";\nimport { Control } from \"./control.js\";\nimport { StackPanel } from \"./stackPanel.js\";\nimport { TextBlock } from \"./textBlock.js\";\nimport { RegisterClass } from \"@babylonjs/core/Misc/typeStore.js\";\nimport { serialize } from \"@babylonjs/core/Misc/decorators.js\";\n/**\n * Class used to create radio button controls\n */\nexport class RadioButton extends Control {\n /** Gets or sets border thickness */\n get thickness() {\n return this._thickness;\n }\n set thickness(value) {\n if (this._thickness === value) {\n return;\n }\n this._thickness = value;\n this._markAsDirty();\n }\n /** Gets or sets a value indicating the ratio between overall size and check size */\n get checkSizeRatio() {\n return this._checkSizeRatio;\n }\n set checkSizeRatio(value) {\n value = Math.max(Math.min(1, value), 0);\n if (this._checkSizeRatio === value) {\n return;\n }\n this._checkSizeRatio = value;\n this._markAsDirty();\n }\n /** Gets or sets background color */\n get background() {\n return this._background;\n }\n set background(value) {\n if (this._background === value) {\n return;\n }\n this._background = value;\n this._markAsDirty();\n }\n /** Gets or sets a boolean indicating if the checkbox is checked or not */\n get isChecked() {\n return this._isChecked;\n }\n set isChecked(value) {\n if (this._isChecked === value) {\n return;\n }\n this._isChecked = value;\n this._markAsDirty();\n this.onIsCheckedChangedObservable.notifyObservers(value);\n if (this._isChecked && this._host) {\n // Update all controls from same group\n this._host.executeOnAllControls((control) => {\n if (control === this) {\n return;\n }\n if (control.group === undefined) {\n return;\n }\n const childRadio = control;\n if (childRadio.group === this.group) {\n childRadio.isChecked = false;\n }\n });\n }\n }\n /**\n * Creates a new RadioButton\n * @param name defines the control name\n */\n constructor(name) {\n super(name);\n this.name = name;\n this._isChecked = false;\n this._background = \"black\";\n this._checkSizeRatio = 0.8;\n this._thickness = 1;\n /** Gets or sets group name */\n this.group = \"\";\n /** Observable raised when isChecked is changed */\n this.onIsCheckedChangedObservable = new Observable();\n this.isPointerBlocker = true;\n }\n _getTypeName() {\n return \"RadioButton\";\n }\n _draw(context) {\n context.save();\n this._applyStates(context);\n const actualWidth = this._currentMeasure.width - this._thickness;\n const actualHeight = this._currentMeasure.height - this._thickness;\n if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {\n context.shadowColor = this.shadowColor;\n context.shadowBlur = this.shadowBlur;\n context.shadowOffsetX = this.shadowOffsetX;\n context.shadowOffsetY = this.shadowOffsetY;\n }\n // Outer\n Control.drawEllipse(this._currentMeasure.left + this._currentMeasure.width / 2, this._currentMeasure.top + this._currentMeasure.height / 2, this._currentMeasure.width / 2 - this._thickness / 2, this._currentMeasure.height / 2 - this._thickness / 2, context);\n context.fillStyle = this._isEnabled ? this._background : this._disabledColor;\n context.fill();\n if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {\n context.shadowBlur = 0;\n context.shadowOffsetX = 0;\n context.shadowOffsetY = 0;\n }\n context.strokeStyle = this.color;\n context.lineWidth = this._thickness;\n context.stroke();\n // Inner\n if (this._isChecked) {\n context.fillStyle = this._isEnabled ? this.color : this._disabledColor;\n const offsetWidth = actualWidth * this._checkSizeRatio;\n const offseHeight = actualHeight * this._checkSizeRatio;\n Control.drawEllipse(this._currentMeasure.left + this._currentMeasure.width / 2, this._currentMeasure.top + this._currentMeasure.height / 2, offsetWidth / 2 - this._thickness / 2, offseHeight / 2 - this._thickness / 2, context);\n context.fill();\n }\n context.restore();\n }\n // Events\n _onPointerDown(target, coordinates, pointerId, buttonIndex, pi) {\n if (!super._onPointerDown(target, coordinates, pointerId, buttonIndex, pi)) {\n return false;\n }\n if (this.isReadOnly) {\n return true;\n }\n if (!this.isChecked) {\n this.isChecked = true;\n }\n return true;\n }\n /**\n * Utility function to easily create a radio button with a header\n * @param title defines the label to use for the header\n * @param group defines the group to use for the radio button\n * @param isChecked defines the initial state of the radio button\n * @param onValueChanged defines the callback to call when value changes\n * @returns a StackPanel containing the radio button and a textBlock\n */\n static AddRadioButtonWithHeader(title, group, isChecked, onValueChanged) {\n const panel = new StackPanel();\n panel.isVertical = false;\n panel.height = \"30px\";\n const radio = new RadioButton();\n radio.width = \"20px\";\n radio.height = \"20px\";\n radio.isChecked = isChecked;\n radio.color = \"green\";\n radio.group = group;\n radio.onIsCheckedChangedObservable.add((value) => onValueChanged(radio, value));\n panel.addControl(radio);\n const header = new TextBlock();\n header.text = title;\n header.width = \"180px\";\n header.paddingLeft = \"5px\";\n header.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;\n header.color = \"white\";\n panel.addControl(header);\n return panel;\n }\n}\n__decorate([\n serialize()\n], RadioButton.prototype, \"thickness\", null);\n__decorate([\n serialize()\n], RadioButton.prototype, \"group\", void 0);\n__decorate([\n serialize()\n], RadioButton.prototype, \"checkSizeRatio\", null);\n__decorate([\n serialize()\n], RadioButton.prototype, \"background\", null);\n__decorate([\n serialize()\n], RadioButton.prototype, \"isChecked\", null);\nRegisterClass(\"BABYLON.GUI.RadioButton\", RadioButton);\n//# sourceMappingURL=radioButton.js.map","import { __decorate } from \"@babylonjs/core/tslib.es6.js\";\nimport { Observable } from \"@babylonjs/core/Misc/observable.js\";\nimport { Control } from \"../control.js\";\nimport { ValueAndUnit } from \"../../valueAndUnit.js\";\nimport { serialize } from \"@babylonjs/core/Misc/decorators.js\";\n/**\n * Class used to create slider controls\n */\nexport class BaseSlider extends Control {\n /** Gets or sets a boolean indicating if the thumb must be rendered */\n get displayThumb() {\n return this._displayThumb;\n }\n set displayThumb(value) {\n if (this._displayThumb === value) {\n return;\n }\n this._displayThumb = value;\n this._markAsDirty();\n }\n /** Gets or sets a step to apply to values (0 by default) */\n get step() {\n return this._step;\n }\n set step(value) {\n if (this._step === value) {\n return;\n }\n this._step = value;\n this._markAsDirty();\n }\n /** Gets or sets main bar offset (ie. the margin applied to the value bar) */\n get barOffset() {\n return this._barOffset.toString(this._host);\n }\n /** Gets main bar offset in pixels*/\n get barOffsetInPixels() {\n return this._barOffset.getValueInPixel(this._host, this._cachedParentMeasure.width);\n }\n set barOffset(value) {\n if (this._barOffset.toString(this._host) === value) {\n return;\n }\n if (this._barOffset.fromString(value)) {\n this._markAsDirty();\n }\n }\n /** Gets or sets thumb width */\n get thumbWidth() {\n return this._thumbWidth.toString(this._host);\n }\n /** Gets thumb width in pixels */\n get thumbWidthInPixels() {\n return this._thumbWidth.getValueInPixel(this._host, this._cachedParentMeasure.width);\n }\n set thumbWidth(value) {\n if (this._thumbWidth.toString(this._host) === value) {\n return;\n }\n if (this._thumbWidth.fromString(value)) {\n this._markAsDirty();\n }\n }\n /** Gets or sets minimum value */\n get minimum() {\n return this._minimum;\n }\n set minimum(value) {\n if (this._minimum === value) {\n return;\n }\n this._minimum = value;\n this._markAsDirty();\n this.value = Math.max(Math.min(this.value, this._maximum), this._minimum);\n }\n /** Gets or sets maximum value */\n get maximum() {\n return this._maximum;\n }\n set maximum(value) {\n if (this._maximum === value) {\n return;\n }\n this._maximum = value;\n this._markAsDirty();\n this.value = Math.max(Math.min(this.value, this._maximum), this._minimum);\n }\n /** Gets or sets current value */\n get value() {\n return this._value;\n }\n set value(value) {\n value = Math.max(Math.min(value, this._maximum), this._minimum);\n if (this._value === value) {\n return;\n }\n this._value = value;\n this._markAsDirty();\n this.onValueChangedObservable.notifyObservers(this._value);\n }\n /**Gets or sets a boolean indicating if the slider should be vertical or horizontal */\n get isVertical() {\n return this._isVertical;\n }\n set isVertical(value) {\n if (this._isVertical === value) {\n return;\n }\n this._isVertical = value;\n this._markAsDirty();\n }\n /** Gets or sets a value indicating if the thumb can go over main bar extends */\n get isThumbClamped() {\n return this._isThumbClamped;\n }\n set isThumbClamped(value) {\n if (this._isThumbClamped === value) {\n return;\n }\n this._isThumbClamped = value;\n this._markAsDirty();\n }\n /**\n * Creates a new BaseSlider\n * @param name defines the control name\n */\n constructor(name) {\n super(name);\n this.name = name;\n this._thumbWidth = new ValueAndUnit(20, ValueAndUnit.UNITMODE_PIXEL, false);\n this._minimum = 0;\n this._maximum = 100;\n this._value = 50;\n this._isVertical = false;\n this._barOffset = new ValueAndUnit(5, ValueAndUnit.UNITMODE_PIXEL, false);\n this._isThumbClamped = false;\n this._displayThumb = true;\n this._step = 0;\n this._lastPointerDownId = -1;\n // Shared rendering info\n this._effectiveBarOffset = 0;\n /** Observable raised when the slider value changes */\n this.onValueChangedObservable = new Observable();\n // Events\n this._pointerIsDown = false;\n this.isPointerBlocker = true;\n }\n _getTypeName() {\n return \"BaseSlider\";\n }\n _getThumbPosition() {\n if (this.isVertical) {\n return ((this.maximum - this.value) / (this.maximum - this.minimum)) * this._backgroundBoxLength;\n }\n return ((this.value - this.minimum) / (this.maximum - this.minimum)) * this._backgroundBoxLength;\n }\n _getThumbThickness(type) {\n let thumbThickness = 0;\n switch (type) {\n case \"circle\":\n if (this._thumbWidth.isPixel) {\n thumbThickness = Math.max(this._thumbWidth.getValue(this._host), this._backgroundBoxThickness);\n }\n else {\n thumbThickness = this._backgroundBoxThickness * this._thumbWidth.getValue(this._host);\n }\n break;\n case \"rectangle\":\n if (this._thumbWidth.isPixel) {\n thumbThickness = Math.min(this._thumbWidth.getValue(this._host), this._backgroundBoxThickness);\n }\n else {\n thumbThickness = this._backgroundBoxThickness * this._thumbWidth.getValue(this._host);\n }\n }\n return thumbThickness;\n }\n _prepareRenderingData(type) {\n // Main bar\n this._effectiveBarOffset = 0;\n this._renderLeft = this._currentMeasure.left;\n this._renderTop = this._currentMeasure.top;\n this._renderWidth = this._currentMeasure.width;\n this._renderHeight = this._currentMeasure.height;\n this._backgroundBoxLength = Math.max(this._currentMeasure.width, this._currentMeasure.height);\n this._backgroundBoxThickness = Math.min(this._currentMeasure.width, this._currentMeasure.height);\n this._effectiveThumbThickness = this._getThumbThickness(type);\n if (this.displayThumb) {\n this._backgroundBoxLength -= this._effectiveThumbThickness;\n }\n //throw error when height is less than width for vertical slider\n if (this.isVertical && this._currentMeasure.height < this._currentMeasure.width) {\n console.error(\"Height should be greater than width\");\n return;\n }\n if (this._barOffset.isPixel) {\n this._effectiveBarOffset = Math.min(this._barOffset.getValue(this._host), this._backgroundBoxThickness);\n }\n else {\n this._effectiveBarOffset = this._backgroundBoxThickness * this._barOffset.getValue(this._host);\n }\n this._backgroundBoxThickness -= this._effectiveBarOffset * 2;\n if (this.isVertical) {\n this._renderLeft += this._effectiveBarOffset;\n if (!this.isThumbClamped && this.displayThumb) {\n this._renderTop += this._effectiveThumbThickness / 2;\n }\n this._renderHeight = this._backgroundBoxLength;\n this._renderWidth = this._backgroundBoxThickness;\n }\n else {\n this._renderTop += this._effectiveBarOffset;\n if (!this.isThumbClamped && this.displayThumb) {\n this._renderLeft += this._effectiveThumbThickness / 2;\n }\n this._renderHeight = this._backgroundBoxThickness;\n this._renderWidth = this._backgroundBoxLength;\n }\n }\n /**\n * @internal\n */\n _updateValueFromPointer(x, y) {\n if (this.rotation != 0) {\n this._invertTransformMatrix.transformCoordinates(x, y, this._transformedPosition);\n x = this._transformedPosition.x;\n y = this._transformedPosition.y;\n }\n let value;\n if (this._isVertical) {\n value = this._minimum + (1 - (y - this._currentMeasure.top) / this._currentMeasure.height) * (this._maximum - this._minimum);\n }\n else {\n value = this._minimum + ((x - this._currentMeasure.left) / this._currentMeasure.width) * (this._maximum - this._minimum);\n }\n this.value = this._step ? Math.round(value / this._step) * this._step : value;\n }\n _onPointerDown(target, coordinates, pointerId, buttonIndex, pi) {\n if (!super._onPointerDown(target, coordinates, pointerId, buttonIndex, pi)) {\n return false;\n }\n if (this.isReadOnly) {\n return true;\n }\n this._pointerIsDown = true;\n this._updateValueFromPointer(coordinates.x, coordinates.y);\n this._host._capturingControl[pointerId] = this;\n this._lastPointerDownId = pointerId;\n return true;\n }\n _onPointerMove(target, coordinates, pointerId, pi) {\n // Only listen to pointer move events coming from the last pointer to click on the element (To support dual vr controller interaction)\n if (pointerId != this._lastPointerDownId) {\n return;\n }\n if (this._pointerIsDown && !this.isReadOnly) {\n this._updateValueFromPointer(coordinates.x, coordinates.y);\n }\n super._onPointerMove(target, coordinates, pointerId, pi);\n }\n _onPointerUp(target, coordinates, pointerId, buttonIndex, notifyClick) {\n this._pointerIsDown = false;\n delete this._host._capturingControl[pointerId];\n super._onPointerUp(target, coordinates, pointerId, buttonIndex, notifyClick);\n }\n _onCanvasBlur() {\n this._forcePointerUp();\n super._onCanvasBlur();\n }\n}\n__decorate([\n serialize()\n], BaseSlider.prototype, \"displayThumb\", null);\n__decorate([\n serialize()\n], BaseSlider.prototype, \"step\", null);\n__decorate([\n serialize()\n], BaseSlider.prototype, \"barOffset\", null);\n__decorate([\n serialize()\n], BaseSlider.prototype, \"thumbWidth\", null);\n__decorate([\n serialize()\n], BaseSlider.prototype, \"minimum\", null);\n__decorate([\n serialize()\n], BaseSlider.prototype, \"maximum\", null);\n__decorate([\n serialize()\n], BaseSlider.prototype, \"value\", null);\n__decorate([\n serialize()\n], BaseSlider.prototype, \"isVertical\", null);\n__decorate([\n serialize()\n], BaseSlider.prototype, \"isThumbClamped\", null);\n//# sourceMappingURL=baseSlider.js.map","import { __decorate } from \"@babylonjs/core/tslib.es6.js\";\nimport { BaseSlider } from \"./baseSlider.js\";\nimport { RegisterClass } from \"@babylonjs/core/Misc/typeStore.js\";\nimport { serialize } from \"@babylonjs/core/Misc/decorators.js\";\nimport { Tools } from \"@babylonjs/core/Misc/tools.js\";\n/**\n * Class used to create slider controls\n */\nexport class Slider extends BaseSlider {\n /** Gets or sets a boolean indicating if the value bar must be rendered */\n get displayValueBar() {\n return this._displayValueBar;\n }\n set displayValueBar(value) {\n if (this._displayValueBar === value) {\n return;\n }\n this._displayValueBar = value;\n this._markAsDirty();\n }\n /** Gets or sets border color */\n get borderColor() {\n return this._borderColor;\n }\n set borderColor(value) {\n if (this._borderColor === value) {\n return;\n }\n this._borderColor = value;\n this._markAsDirty();\n }\n /** Gets or sets background color */\n get background() {\n return this._background;\n }\n set background(value) {\n if (this._background === value) {\n return;\n }\n this._background = value;\n this._markAsDirty();\n }\n /** Gets or sets background gradient */\n get backgroundGradient() {\n return this._backgroundGradient;\n }\n set backgroundGradient(value) {\n if (this._backgroundGradient === value) {\n return;\n }\n this._backgroundGradient = value;\n this._markAsDirty();\n }\n /** Gets or sets thumb's color */\n get thumbColor() {\n return this._thumbColor;\n }\n set thumbColor(value) {\n if (this._thumbColor === value) {\n return;\n }\n this._thumbColor = value;\n this._markAsDirty();\n }\n /** Gets or sets a boolean indicating if the thumb should be round or square */\n get isThumbCircle() {\n return this._isThumbCircle;\n }\n set isThumbCircle(value) {\n if (this._isThumbCircle === value) {\n return;\n }\n this._isThumbCircle = value;\n this._markAsDirty();\n }\n /**\n * Creates a new Slider\n * @param name defines the control name\n */\n constructor(name) {\n super(name);\n this.name = name;\n this._background = \"black\";\n this._borderColor = \"white\";\n this._thumbColor = \"\";\n this._isThumbCircle = false;\n this._displayValueBar = true;\n this._backgroundGradient = null;\n }\n _getTypeName() {\n return \"Slider\";\n }\n _getBackgroundColor(context) {\n return this._backgroundGradient ? this._backgroundGradient.getCanvasGradient(context) : this._background;\n }\n _draw(context) {\n context.save();\n this._applyStates(context);\n this._prepareRenderingData(this.isThumbCircle ? \"circle\" : \"rectangle\");\n let left = this._renderLeft;\n let top = this._renderTop;\n const width = this._renderWidth;\n const height = this._renderHeight;\n let radius = 0;\n if (this.isThumbClamped && this.isThumbCircle) {\n if (this.isVertical) {\n top += this._effectiveThumbThickness / 2;\n }\n else {\n left += this._effectiveThumbThickness / 2;\n }\n radius = this._backgroundBoxThickness / 2;\n }\n else {\n radius = (this._effectiveThumbThickness - this._effectiveBarOffset) / 2;\n }\n if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {\n context.shadowColor = this.shadowColor;\n context.shadowBlur = this.shadowBlur;\n context.shadowOffsetX = this.shadowOffsetX;\n context.shadowOffsetY = this.shadowOffsetY;\n }\n const thumbPosition = this._getThumbPosition();\n context.fillStyle = this._getBackgroundColor(context);\n if (this.isVertical) {\n if (this.isThumbClamped) {\n if (this.isThumbCircle) {\n context.beginPath();\n context.arc(left + this._backgroundBoxThickness / 2, top, radius, Math.PI, 2 * Math.PI);\n context.fill();\n context.fillRect(left, top, width, height);\n }\n else {\n context.fillRect(left, top, width, height + this._effectiveThumbThickness);\n }\n }\n else {\n context.fillRect(left, top, width, height);\n }\n }\n else {\n if (this.isThumbClamped) {\n if (this.isThumbCircle) {\n context.beginPath();\n context.arc(left + this._backgroundBoxLength, top + this._backgroundBoxThickness / 2, radius, 0, 2 * Math.PI);\n context.fill();\n context.fillRect(left, top, width, height);\n }\n else {\n context.fillRect(left, top, width + this._effectiveThumbThickness, height);\n }\n }\n else {\n context.fillRect(left, top, width, height);\n }\n }\n if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {\n context.shadowBlur = 0;\n context.shadowOffsetX = 0;\n context.shadowOffsetY = 0;\n }\n // Value bar\n context.fillStyle = this._getColor(context);\n if (this._displayValueBar) {\n if (this.isVertical) {\n if (this.isThumbClamped) {\n if (this.isThumbCircle) {\n context.beginPath();\n context.arc(left + this._backgroundBoxThickness / 2, top + this._backgroundBoxLength, radius, 0, 2 * Math.PI);\n context.fill();\n context.fillRect(left, top + thumbPosition, width, height - thumbPosition);\n }\n else {\n context.fillRect(left, top + thumbPosition, width, height - thumbPosition + this._effectiveThumbThickness);\n }\n }\n else {\n context.fillRect(left, top + thumbPosition, width, height - thumbPosition);\n }\n }\n else {\n if (this.isThumbClamped) {\n if (this.isThumbCircle) {\n context.beginPath();\n context.arc(left, top + this._backgroundBoxThickness / 2, radius, 0, 2 * Math.PI);\n context.fill();\n context.fillRect(left, top, thumbPosition, height);\n }\n else {\n context.fillRect(left, top, thumbPosition, height);\n }\n }\n else {\n context.fillRect(left, top, thumbPosition, height);\n }\n }\n }\n // Thumb\n context.fillStyle = this._thumbColor || this._getColor(context);\n if (this.displayThumb) {\n if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {\n context.shadowColor = this.shadowColor;\n context.shadowBlur = this.shadowBlur;\n context.shadowOffsetX = this.shadowOffsetX;\n context.shadowOffsetY = this.shadowOffsetY;\n }\n if (this._isThumbCircle) {\n context.beginPath();\n if (this.isVertical) {\n context.arc(left + this._backgroundBoxThickness / 2, top + thumbPosition, radius, 0, 2 * Math.PI);\n }\n else {\n context.arc(left + thumbPosition, top + this._backgroundBoxThickness / 2, radius, 0, 2 * Math.PI);\n }\n context.fill();\n if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {\n context.shadowBlur = 0;\n context.shadowOffsetX = 0;\n context.shadowOffsetY = 0;\n }\n context.strokeStyle = this._borderColor;\n context.stroke();\n }\n else {\n if (this.isVertical) {\n context.fillRect(left - this._effectiveBarOffset, this._currentMeasure.top + thumbPosition, this._currentMeasure.width, this._effectiveThumbThickness);\n }\n else {\n context.fillRect(this._currentMeasure.left + thumbPosition, this._currentMeasure.top, this._effectiveThumbThickness, this._currentMeasure.height);\n }\n if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {\n context.shadowBlur = 0;\n context.shadowOffsetX = 0;\n context.shadowOffsetY = 0;\n }\n context.strokeStyle = this._borderColor;\n if (this.isVertical) {\n context.strokeRect(left - this._effectiveBarOffset, this._currentMeasure.top + thumbPosition, this._currentMeasure.width, this._effectiveThumbThickness);\n }\n else {\n context.strokeRect(this._currentMeasure.left + thumbPosition, this._currentMeasure.top, this._effectiveThumbThickness, this._currentMeasure.height);\n }\n }\n }\n context.restore();\n }\n serialize(serializationObject) {\n super.serialize(serializationObject);\n if (this.backgroundGradient) {\n serializationObject.backgroundGradient = {};\n this.backgroundGradient.serialize(serializationObject.backgroundGradient);\n }\n }\n /** @internal */\n _parseFromContent(serializedObject, host) {\n super._parseFromContent(serializedObject, host);\n if (serializedObject.backgroundGradient) {\n const className = Tools.Instantiate(\"BABYLON.GUI.\" + serializedObject.backgroundGradient.className);\n this.backgroundGradient = new className();\n this.backgroundGradient.parse(serializedObject.backgroundGradient);\n }\n }\n}\n__decorate([\n serialize()\n], Slider.prototype, \"displayValueBar\", null);\n__decorate([\n serialize()\n], Slider.prototype, \"borderColor\", null);\n__decorate([\n serialize()\n], Slider.prototype, \"background\", null);\n__decorate([\n serialize()\n], Slider.prototype, \"thumbColor\", null);\n__decorate([\n serialize()\n], Slider.prototype, \"isThumbCircle\", null);\nRegisterClass(\"BABYLON.GUI.Slider\", Slider);\n//# sourceMappingURL=slider.js.map","import { Measure } from \"../../measure.js\";\nimport { Container } from \"../container.js\";\nimport { ValueAndUnit } from \"../../valueAndUnit.js\";\nimport { Control } from \"../control.js\";\n/**\n * Class used to hold a the container for ScrollViewer\n * @internal\n */\nexport class _ScrollViewerWindow extends Container {\n get freezeControls() {\n return this._freezeControls;\n }\n set freezeControls(value) {\n if (this._freezeControls === value) {\n return;\n }\n if (!value) {\n this._restoreMeasures();\n }\n // trigger a full normal layout calculation to be sure all children have their measures up to date\n this._freezeControls = false;\n const textureSize = this.host.getSize();\n const renderWidth = textureSize.width;\n const renderHeight = textureSize.height;\n const context = this.host.getContext();\n const measure = new Measure(0, 0, renderWidth, renderHeight);\n this.host._numLayoutCalls = 0;\n this.host._rootContainer._layout(measure, context);\n // in freeze mode, prepare children measures accordingly\n if (value) {\n this._updateMeasures();\n if (this._useBuckets()) {\n this._makeBuckets();\n }\n }\n this._freezeControls = value;\n this.host.markAsDirty(); // redraw with the (new) current settings\n }\n get bucketWidth() {\n return this._bucketWidth;\n }\n get bucketHeight() {\n return this._bucketHeight;\n }\n setBucketSizes(width, height) {\n this._bucketWidth = width;\n this._bucketHeight = height;\n if (this._useBuckets()) {\n if (this._freezeControls) {\n this._makeBuckets();\n }\n }\n else {\n this._buckets = {};\n }\n }\n _useBuckets() {\n return this._bucketWidth > 0 && this._bucketHeight > 0;\n }\n _makeBuckets() {\n this._buckets = {};\n this._bucketLen = Math.ceil(this.widthInPixels / this._bucketWidth);\n this._dispatchInBuckets(this._children);\n this._oldLeft = null;\n this._oldTop = null;\n }\n _dispatchInBuckets(children) {\n for (let i = 0; i < children.length; ++i) {\n const child = children[i];\n const bStartX = Math.max(0, Math.floor((child._customData._origLeft - this._customData.origLeft) / this._bucketWidth)), bEndX = Math.floor((child._customData._origLeft - this._customData.origLeft + child._currentMeasure.width - 1) / this._bucketWidth), bEndY = Math.floor((child._customData._origTop - this._customData.origTop + child._currentMeasure.height - 1) / this._bucketHeight);\n let bStartY = Math.max(0, Math.floor((child._customData._origTop - this._customData.origTop) / this._bucketHeight));\n while (bStartY <= bEndY) {\n for (let x = bStartX; x <= bEndX; ++x) {\n const bucket = bStartY * this._bucketLen + x;\n let lstc = this._buckets[bucket];\n if (!lstc) {\n lstc = [];\n this._buckets[bucket] = lstc;\n }\n lstc.push(child);\n }\n bStartY++;\n }\n if (child instanceof Container && child._children.length > 0) {\n this._dispatchInBuckets(child._children);\n }\n }\n }\n // reset left and top measures for the window and all its children\n _updateMeasures() {\n const left = this.leftInPixels | 0, top = this.topInPixels | 0;\n this._measureForChildren.left -= left;\n this._measureForChildren.top -= top;\n this._currentMeasure.left -= left;\n this._currentMeasure.top -= top;\n this._customData.origLeftForChildren = this._measureForChildren.left;\n this._customData.origTopForChildren = this._measureForChildren.top;\n this._customData.origLeft = this._currentMeasure.left;\n this._customData.origTop = this._currentMeasure.top;\n this._updateChildrenMeasures(this._children, left, top);\n }\n _updateChildrenMeasures(children, left, top) {\n for (let i = 0; i < children.length; ++i) {\n const child = children[i];\n child._currentMeasure.left -= left;\n child._currentMeasure.top -= top;\n child._customData._origLeft = child._currentMeasure.left; // save the original left and top values for each child\n child._customData._origTop = child._currentMeasure.top;\n if (child instanceof Container && child._children.length > 0) {\n this._updateChildrenMeasures(child._children, left, top);\n }\n }\n }\n _restoreMeasures() {\n const left = this.leftInPixels | 0, top = this.topInPixels | 0;\n this._measureForChildren.left = this._customData.origLeftForChildren + left;\n this._measureForChildren.top = this._customData.origTopForChildren + top;\n this._currentMeasure.left = this._customData.origLeft + left;\n this._currentMeasure.top = this._customData.origTop + top;\n }\n /**\n * Creates a new ScrollViewerWindow\n * @param name of ScrollViewerWindow\n */\n constructor(name) {\n super(name);\n this._freezeControls = false;\n this._bucketWidth = 0;\n this._bucketHeight = 0;\n this._buckets = {};\n }\n _getTypeName() {\n return \"ScrollViewerWindow\";\n }\n /**\n * @internal\n */\n _additionalProcessing(parentMeasure, context) {\n super._additionalProcessing(parentMeasure, context);\n this._parentMeasure = parentMeasure;\n this._measureForChildren.left = this._currentMeasure.left;\n this._measureForChildren.top = this._currentMeasure.top;\n this._measureForChildren.width = parentMeasure.width;\n this._measureForChildren.height = parentMeasure.height;\n }\n /**\n * @internal\n */\n _layout(parentMeasure, context) {\n if (this._freezeControls) {\n this.invalidateRect(); // will trigger a redraw of the window\n return false;\n }\n return super._layout(parentMeasure, context);\n }\n _scrollChildren(children, left, top) {\n for (let i = 0; i < children.length; ++i) {\n const child = children[i];\n child._currentMeasure.left = child._customData._origLeft + left;\n child._currentMeasure.top = child._customData._origTop + top;\n child._isClipped = false; // clipping will be handled by _draw and the call to _intersectsRect()\n if (child instanceof Container && child._children.length > 0) {\n this._scrollChildren(child._children, left, top);\n }\n }\n }\n _scrollChildrenWithBuckets(left, top, scrollLeft, scrollTop) {\n const bStartX = Math.max(0, Math.floor(-left / this._bucketWidth)), bEndX = Math.floor((-left + this._parentMeasure.width - 1) / this._bucketWidth), bEndY = Math.floor((-top + this._parentMeasure.height - 1) / this._bucketHeight);\n let bStartY = Math.max(0, Math.floor(-top / this._bucketHeight));\n while (bStartY <= bEndY) {\n for (let x = bStartX; x <= bEndX; ++x) {\n const bucket = bStartY * this._bucketLen + x, lstc = this._buckets[bucket];\n if (lstc) {\n for (let i = 0; i < lstc.length; ++i) {\n const child = lstc[i];\n child._currentMeasure.left = child._customData._origLeft + scrollLeft;\n child._currentMeasure.top = child._customData._origTop + scrollTop;\n child._isClipped = false; // clipping will be handled by _draw and the call to _intersectsRect()\n }\n }\n }\n bStartY++;\n }\n }\n /**\n * @internal\n */\n _draw(context, invalidatedRectangle) {\n if (!this._freezeControls) {\n super._draw(context, invalidatedRectangle);\n return;\n }\n this._localDraw(context);\n if (this.clipChildren) {\n this._clipForChildren(context);\n }\n const left = this.leftInPixels | 0, top = this.topInPixels | 0;\n if (this._useBuckets()) {\n if (this._oldLeft !== null && this._oldTop !== null) {\n this._scrollChildrenWithBuckets(this._oldLeft, this._oldTop, left, top);\n this._scrollChildrenWithBuckets(left, top, left, top);\n }\n else {\n this._scrollChildren(this._children, left, top);\n }\n }\n else {\n this._scrollChildren(this._children, left, top);\n }\n this._oldLeft = left;\n this._oldTop = top;\n for (const child of this._children) {\n if (!child._intersectsRect(this._parentMeasure)) {\n continue;\n }\n child._render(context, this._parentMeasure);\n }\n }\n _postMeasure() {\n if (this._freezeControls) {\n super._postMeasure();\n return;\n }\n let maxWidth = this.parentClientWidth;\n let maxHeight = this.parentClientHeight;\n for (const child of this.children) {\n if (!child.isVisible || child.notRenderable) {\n continue;\n }\n if (child.horizontalAlignment === Control.HORIZONTAL_ALIGNMENT_CENTER) {\n child._offsetLeft(this._currentMeasure.left - child._currentMeasure.left);\n }\n if (child.verticalAlignment === Control.VERTICAL_ALIGNMENT_CENTER) {\n child._offsetTop(this._currentMeasure.top - child._currentMeasure.top);\n }\n maxWidth = Math.max(maxWidth, child._currentMeasure.left - this._currentMeasure.left + child._currentMeasure.width + child.paddingRightInPixels);\n maxHeight = Math.max(maxHeight, child._currentMeasure.top - this._currentMeasure.top + child._currentMeasure.height + child.paddingBottomInPixels);\n }\n if (this._currentMeasure.width !== maxWidth) {\n this._width.updateInPlace(maxWidth, ValueAndUnit.UNITMODE_PIXEL);\n this._currentMeasure.width = maxWidth;\n this._rebuildLayout = true;\n this._isDirty = true;\n }\n if (this._currentMeasure.height !== maxHeight) {\n this._height.updateInPlace(maxHeight, ValueAndUnit.UNITMODE_PIXEL);\n this._currentMeasure.height = maxHeight;\n this._rebuildLayout = true;\n this._isDirty = true;\n }\n super._postMeasure();\n }\n}\n//# sourceMappingURL=scrollViewerWindow.js.map","import { __decorate } from \"@babylonjs/core/tslib.es6.js\";\nimport { BaseSlider } from \"./baseSlider.js\";\nimport { Measure } from \"../../measure.js\";\nimport { serialize } from \"@babylonjs/core/Misc/decorators.js\";\nimport { Tools } from \"@babylonjs/core/Misc/tools.js\";\nimport { RegisterClass } from \"@babylonjs/core/Misc/typeStore.js\";\n/**\n * Class used to create slider controls\n */\nexport class ScrollBar extends BaseSlider {\n /** Gets or sets border color */\n get borderColor() {\n return this._borderColor;\n }\n set borderColor(value) {\n if (this._borderColor === value) {\n return;\n }\n this._borderColor = value;\n this._markAsDirty();\n }\n /** Gets or sets background color */\n get background() {\n return this._background;\n }\n set background(value) {\n if (this._background === value) {\n return;\n }\n this._background = value;\n this._markAsDirty();\n }\n /** Gets or sets background gradient. Takes precedence over gradient. */\n get backgroundGradient() {\n return this._backgroundGradient;\n }\n set backgroundGradient(value) {\n if (this._backgroundGradient === value) {\n return;\n }\n this._backgroundGradient = value;\n this._markAsDirty();\n }\n /** Inverts the scrolling direction (default: false) */\n get invertScrollDirection() {\n return this._invertScrollDirection;\n }\n set invertScrollDirection(invert) {\n this._invertScrollDirection = invert;\n }\n /**\n * Creates a new Slider\n * @param name defines the control name\n */\n constructor(name) {\n super(name);\n this.name = name;\n this._background = \"black\";\n this._borderColor = \"white\";\n this._tempMeasure = new Measure(0, 0, 0, 0);\n this._invertScrollDirection = false;\n this._backgroundGradient = null;\n }\n _getTypeName() {\n return \"Scrollbar\";\n }\n _getThumbThickness() {\n let thumbThickness = 0;\n if (this._thumbWidth.isPixel) {\n thumbThickness = this._thumbWidth.getValue(this._host);\n }\n else {\n thumbThickness = this._backgroundBoxThickness * this._thumbWidth.getValue(this._host);\n }\n return thumbThickness;\n }\n _getBackgroundColor(context) {\n return this._backgroundGradient ? this._backgroundGradient.getCanvasGradient(context) : this._background;\n }\n _draw(context) {\n context.save();\n this._applyStates(context);\n this._prepareRenderingData(\"rectangle\");\n const left = this._renderLeft;\n const thumbPosition = this._getThumbPosition();\n context.fillStyle = this._getBackgroundColor(context);\n context.fillRect(this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);\n // Value bar\n context.fillStyle = this._getColor(context);\n // Thumb\n if (this.isVertical) {\n this._tempMeasure.left = left - this._effectiveBarOffset;\n this._tempMeasure.top = this._currentMeasure.top + thumbPosition;\n this._tempMeasure.width = this._currentMeasure.width;\n this._tempMeasure.height = this._effectiveThumbThickness;\n }\n else {\n this._tempMeasure.left = this._currentMeasure.left + thumbPosition;\n this._tempMeasure.top = this._currentMeasure.top;\n this._tempMeasure.width = this._effectiveThumbThickness;\n this._tempMeasure.height = this._currentMeasure.height;\n }\n context.fillRect(this._tempMeasure.left, this._tempMeasure.top, this._tempMeasure.width, this._tempMeasure.height);\n context.restore();\n }\n /**\n * @internal\n */\n _updateValueFromPointer(x, y) {\n if (this.rotation != 0) {\n this._invertTransformMatrix.transformCoordinates(x, y, this._transformedPosition);\n x = this._transformedPosition.x;\n y = this._transformedPosition.y;\n }\n const sign = this._invertScrollDirection ? -1 : 1;\n if (this._first) {\n this._first = false;\n this._originX = x;\n this._originY = y;\n // Check if move is required\n if (x < this._tempMeasure.left ||\n x > this._tempMeasure.left + this._tempMeasure.width ||\n y < this._tempMeasure.top ||\n y > this._tempMeasure.top + this._tempMeasure.height) {\n if (this.isVertical) {\n this.value = this.minimum + (1 - (y - this._currentMeasure.top) / this._currentMeasure.height) * (this.maximum - this.minimum);\n }\n else {\n this.value = this.minimum + ((x - this._currentMeasure.left) / this._currentMeasure.width) * (this.maximum - this.minimum);\n }\n }\n }\n // Delta mode\n let delta = 0;\n if (this.isVertical) {\n delta = -((y - this._originY) / (this._currentMeasure.height - this._effectiveThumbThickness));\n }\n else {\n delta = (x - this._originX) / (this._currentMeasure.width - this._effectiveThumbThickness);\n }\n this.value += sign * delta * (this.maximum - this.minimum);\n this._originX = x;\n this._originY = y;\n }\n _onPointerDown(target, coordinates, pointerId, buttonIndex, pi) {\n this._first = true;\n return super._onPointerDown(target, coordinates, pointerId, buttonIndex, pi);\n }\n serialize(serializationObject) {\n super.serialize(serializationObject);\n if (this.backgroundGradient) {\n serializationObject.backgroundGradient = {};\n this.backgroundGradient.serialize(serializationObject.backgroundGradient);\n }\n }\n _parseFromContent(serializationObject, host) {\n super._parseFromContent(serializationObject, host);\n if (serializationObject.backgroundGradient) {\n const className = Tools.Instantiate(\"BABYLON.GUI.\" + serializationObject.backgroundGradient.className);\n this.backgroundGradient = new className();\n this.backgroundGradient.parse(serializationObject.backgroundGradient);\n }\n }\n}\n__decorate([\n serialize()\n], ScrollBar.prototype, \"borderColor\", null);\n__decorate([\n serialize()\n], ScrollBar.prototype, \"background\", null);\n__decorate([\n serialize()\n], ScrollBar.prototype, \"invertScrollDirection\", null);\nRegisterClass(\"BABYLON.GUI.Scrollbar\", ScrollBar);\n//# sourceMappingURL=scrollBar.js.map","import { __decorate } from \"@babylonjs/core/tslib.es6.js\";\nimport { BaseSlider } from \"./baseSlider.js\";\nimport { Measure } from \"../../measure.js\";\nimport { serialize } from \"@babylonjs/core/Misc/decorators.js\";\n/**\n * Class used to create slider controls\n */\nexport class ImageScrollBar extends BaseSlider {\n /** Inverts the scrolling direction (default: false) */\n get invertScrollDirection() {\n return this._invertScrollDirection;\n }\n set invertScrollDirection(invert) {\n this._invertScrollDirection = invert;\n }\n /**\n * Gets or sets the image used to render the background for horizontal bar\n */\n get backgroundImage() {\n return this._backgroundBaseImage;\n }\n set backgroundImage(value) {\n if (this._backgroundBaseImage === value) {\n return;\n }\n this._backgroundBaseImage = value;\n if (this.isVertical && this.num90RotationInVerticalMode !== 0) {\n if (!value.isLoaded) {\n value.onImageLoadedObservable.addOnce(() => {\n const rotatedValue = value._rotate90(this.num90RotationInVerticalMode, true);\n this._backgroundImage = rotatedValue;\n if (!rotatedValue.isLoaded) {\n rotatedValue.onImageLoadedObservable.addOnce(() => {\n this._markAsDirty();\n });\n }\n this._markAsDirty();\n });\n }\n else {\n this._backgroundImage = value._rotate90(this.num90RotationInVerticalMode, true);\n this._markAsDirty();\n }\n }\n else {\n this._backgroundImage = value;\n if (value && !value.isLoaded) {\n value.onImageLoadedObservable.addOnce(() => {\n this._markAsDirty();\n });\n }\n this._markAsDirty();\n }\n }\n /**\n * Gets or sets the image used to render the thumb\n */\n get thumbImage() {\n return this._thumbBaseImage;\n }\n set thumbImage(value) {\n if (this._thumbBaseImage === value) {\n return;\n }\n this._thumbBaseImage = value;\n if (this.isVertical && this.num90RotationInVerticalMode !== 0) {\n if (!value.isLoaded) {\n value.onImageLoadedObservable.addOnce(() => {\n const rotatedValue = value._rotate90(-this.num90RotationInVerticalMode, true);\n this._thumbImage = rotatedValue;\n if (!rotatedValue.isLoaded) {\n rotatedValue.onImageLoadedObservable.addOnce(() => {\n this._markAsDirty();\n });\n }\n this._markAsDirty();\n });\n }\n else {\n this._thumbImage = value._rotate90(-this.num90RotationInVerticalMode, true);\n this._markAsDirty();\n }\n }\n else {\n this._thumbImage = value;\n if (value && !value.isLoaded) {\n value.onImageLoadedObservable.addOnce(() => {\n this._markAsDirty();\n });\n }\n this._markAsDirty();\n }\n }\n /**\n * Gets or sets the length of the thumb\n */\n get thumbLength() {\n return this._thumbLength;\n }\n set thumbLength(value) {\n if (this._thumbLength === value) {\n return;\n }\n this._thumbLength = value;\n this._markAsDirty();\n }\n /**\n * Gets or sets the height of the thumb\n */\n get thumbHeight() {\n return this._thumbHeight;\n }\n set thumbHeight(value) {\n if (this._thumbLength === value) {\n return;\n }\n this._thumbHeight = value;\n this._markAsDirty();\n }\n /**\n * Gets or sets the height of the bar image\n */\n get barImageHeight() {\n return this._barImageHeight;\n }\n set barImageHeight(value) {\n if (this._barImageHeight === value) {\n return;\n }\n this._barImageHeight = value;\n this._markAsDirty();\n }\n /**\n * Creates a new ImageScrollBar\n * @param name defines the control name\n */\n constructor(name) {\n super(name);\n this.name = name;\n this._thumbLength = 0.5;\n this._thumbHeight = 1;\n this._barImageHeight = 1;\n this._tempMeasure = new Measure(0, 0, 0, 0);\n this._invertScrollDirection = false;\n /** Number of 90° rotation to apply on the images when in vertical mode */\n this.num90RotationInVerticalMode = 1;\n }\n _getTypeName() {\n return \"ImageScrollBar\";\n }\n _getThumbThickness() {\n let thumbThickness = 0;\n if (this._thumbWidth.isPixel) {\n thumbThickness = this._thumbWidth.getValue(this._host);\n }\n else {\n thumbThickness = this._backgroundBoxThickness * this._thumbWidth.getValue(this._host);\n }\n return thumbThickness;\n }\n _draw(context) {\n context.save();\n this._applyStates(context);\n this._prepareRenderingData(\"rectangle\");\n const thumbPosition = this._getThumbPosition();\n const left = this._renderLeft;\n const top = this._renderTop;\n const width = this._renderWidth;\n const height = this._renderHeight;\n // Background\n if (this._backgroundImage) {\n this._tempMeasure.copyFromFloats(left, top, width, height);\n if (this.isVertical) {\n this._tempMeasure.copyFromFloats(left + width * (1 - this._barImageHeight) * 0.5, this._currentMeasure.top, width * this._barImageHeight, height);\n this._tempMeasure.height += this._effectiveThumbThickness;\n this._backgroundImage._currentMeasure.copyFrom(this._tempMeasure);\n }\n else {\n this._tempMeasure.copyFromFloats(this._currentMeasure.left, top + height * (1 - this._barImageHeight) * 0.5, width, height * this._barImageHeight);\n this._tempMeasure.width += this._effectiveThumbThickness;\n this._backgroundImage._currentMeasure.copyFrom(this._tempMeasure);\n }\n this._backgroundImage._draw(context);\n }\n // Thumb\n if (this.isVertical) {\n this._tempMeasure.copyFromFloats(left - this._effectiveBarOffset + this._currentMeasure.width * (1 - this._thumbHeight) * 0.5, this._currentMeasure.top + thumbPosition, this._currentMeasure.width * this._thumbHeight, this._effectiveThumbThickness);\n }\n else {\n this._tempMeasure.copyFromFloats(this._currentMeasure.left + thumbPosition, this._currentMeasure.top + this._currentMeasure.height * (1 - this._thumbHeight) * 0.5, this._effectiveThumbThickness, this._currentMeasure.height * this._thumbHeight);\n }\n if (this._thumbImage) {\n this._thumbImage._currentMeasure.copyFrom(this._tempMeasure);\n this._thumbImage._draw(context);\n }\n context.restore();\n }\n /**\n * @internal\n */\n _updateValueFromPointer(x, y) {\n if (this.rotation != 0) {\n this._invertTransformMatrix.transformCoordinates(x, y, this._transformedPosition);\n x = this._transformedPosition.x;\n y = this._transformedPosition.y;\n }\n const sign = this._invertScrollDirection ? -1 : 1;\n if (this._first) {\n this._first = false;\n this._originX = x;\n this._originY = y;\n // Check if move is required\n if (x < this._tempMeasure.left ||\n x > this._tempMeasure.left + this._tempMeasure.width ||\n y < this._tempMeasure.top ||\n y > this._tempMeasure.top + this._tempMeasure.height) {\n if (this.isVertical) {\n this.value = this.minimum + (1 - (y - this._currentMeasure.top) / this._currentMeasure.height) * (this.maximum - this.minimum);\n }\n else {\n this.value = this.minimum + ((x - this._currentMeasure.left) / this._currentMeasure.width) * (this.maximum - this.minimum);\n }\n }\n }\n // Delta mode\n let delta = 0;\n if (this.isVertical) {\n delta = -((y - this._originY) / (this._currentMeasure.height - this._effectiveThumbThickness));\n }\n else {\n delta = (x - this._originX) / (this._currentMeasure.width - this._effectiveThumbThickness);\n }\n this.value += sign * delta * (this.maximum - this.minimum);\n this._originX = x;\n this._originY = y;\n }\n _onPointerDown(target, coordinates, pointerId, buttonIndex, pi) {\n this._first = true;\n return super._onPointerDown(target, coordinates, pointerId, buttonIndex, pi);\n }\n}\n__decorate([\n serialize()\n], ImageScrollBar.prototype, \"num90RotationInVerticalMode\", void 0);\n__decorate([\n serialize()\n], ImageScrollBar.prototype, \"invertScrollDirection\", null);\n//# sourceMappingURL=imageScrollBar.js.map","import { __decorate } from \"@babylonjs/core/tslib.es6.js\";\nimport { Rectangle } from \"../rectangle.js\";\nimport { Grid } from \"../grid.js\";\nimport { Control } from \"../control.js\";\nimport { _ScrollViewerWindow } from \"./scrollViewerWindow.js\";\nimport { ScrollBar } from \"../sliders/scrollBar.js\";\nimport { ImageScrollBar } from \"../sliders/imageScrollBar.js\";\nimport { RegisterClass } from \"@babylonjs/core/Misc/typeStore.js\";\nimport { serialize } from \"@babylonjs/core/Misc/decorators.js\";\n/**\n * Class used to hold a viewer window and sliders in a grid\n */\nexport class ScrollViewer extends Rectangle {\n /**\n * Gets the horizontal scrollbar\n */\n get horizontalBar() {\n return this._horizontalBar;\n }\n /**\n * Gets the vertical scrollbar\n */\n get verticalBar() {\n return this._verticalBar;\n }\n /**\n * Adds a new control to the current container\n * @param control defines the control to add\n * @returns the current container\n */\n addControl(control) {\n if (!control) {\n return this;\n }\n this._window.addControl(control);\n return this;\n }\n /**\n * Removes a control from the current container\n * @param control defines the control to remove\n * @returns the current container\n */\n removeControl(control) {\n this._window.removeControl(control);\n return this;\n }\n /** Gets the list of children */\n get children() {\n return this._window.children;\n }\n _flagDescendantsAsMatrixDirty() {\n for (const child of this._children) {\n child._markMatrixAsDirty();\n }\n }\n /**\n * Freezes or unfreezes the controls in the window.\n * When controls are frozen, the scroll viewer can render a lot more quickly but updates to positions/sizes of controls\n * are not taken into account. If you want to change positions/sizes, unfreeze, perform the changes then freeze again\n */\n get freezeControls() {\n return this._window.freezeControls;\n }\n set freezeControls(value) {\n this._window.freezeControls = value;\n }\n /** Gets the bucket width */\n get bucketWidth() {\n return this._window.bucketWidth;\n }\n /** Gets the bucket height */\n get bucketHeight() {\n return this._window.bucketHeight;\n }\n /**\n * Sets the bucket sizes.\n * When freezeControls is true, setting a non-zero bucket size will improve performances by updating only\n * controls that are visible. The bucket sizes is used to subdivide (internally) the window area to smaller areas into which\n * controls are dispatched. So, the size should be roughly equals to the mean size of all the controls of\n * the window. To disable the usage of buckets, sets either width or height (or both) to 0.\n * Please note that using this option will raise the memory usage (the higher the bucket sizes, the less memory\n * used), that's why it is not enabled by default.\n * @param width width of the bucket\n * @param height height of the bucket\n */\n setBucketSizes(width, height) {\n this._window.setBucketSizes(width, height);\n }\n /**\n * Forces the horizontal scroll bar to be displayed\n */\n get forceHorizontalBar() {\n return this._forceHorizontalBar;\n }\n set forceHorizontalBar(value) {\n this._grid.setRowDefinition(1, value ? this._barSize : 0, true);\n this._horizontalBar.isVisible = value;\n this._forceHorizontalBar = value;\n }\n /**\n * Forces the vertical scroll bar to be displayed\n */\n get forceVerticalBar() {\n return this._forceVerticalBar;\n }\n set forceVerticalBar(value) {\n this._grid.setColumnDefinition(1, value ? this._barSize : 0, true);\n this._verticalBar.isVisible = value;\n this._forceVerticalBar = value;\n }\n /**\n * Creates a new ScrollViewer\n * @param name of ScrollViewer\n * @param isImageBased\n */\n constructor(name, isImageBased) {\n super(name);\n this._barSize = 20;\n this._pointerIsOver = false;\n this._wheelPrecision = 0.05;\n this._thumbLength = 0.5;\n this._thumbHeight = 1;\n this._barImageHeight = 1;\n this._horizontalBarImageHeight = 1;\n this._verticalBarImageHeight = 1;\n this._oldWindowContentsWidth = 0;\n this._oldWindowContentsHeight = 0;\n this._forceHorizontalBar = false;\n this._forceVerticalBar = false;\n this._useImageBar = isImageBased ? isImageBased : false;\n this.onDirtyObservable.add(() => {\n this._horizontalBarSpace.color = this.color;\n this._verticalBarSpace.color = this.color;\n this._dragSpace.color = this.color;\n });\n this.onPointerEnterObservable.add(() => {\n this._pointerIsOver = true;\n });\n this.onPointerOutObservable.add(() => {\n this._pointerIsOver = false;\n });\n this._grid = new Grid();\n if (this._useImageBar) {\n this._horizontalBar = new ImageScrollBar();\n this._verticalBar = new ImageScrollBar();\n }\n else {\n this._horizontalBar = new ScrollBar();\n this._verticalBar = new ScrollBar();\n }\n this._window = new _ScrollViewerWindow(\"scrollViewer_window\");\n this._window.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;\n this._window.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP;\n this._grid.addColumnDefinition(1);\n this._grid.addColumnDefinition(0, true);\n this._grid.addRowDefinition(1);\n this._grid.addRowDefinition(0, true);\n super.addControl(this._grid);\n this._grid.addControl(this._window, 0, 0);\n this._verticalBarSpace = new Rectangle();\n this._verticalBarSpace.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;\n this._verticalBarSpace.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP;\n this._verticalBarSpace.thickness = 1;\n this._grid.addControl(this._verticalBarSpace, 0, 1);\n this._addBar(this._verticalBar, this._verticalBarSpace, true, Math.PI);\n this._horizontalBarSpace = new Rectangle();\n this._horizontalBarSpace.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;\n this._horizontalBarSpace.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP;\n this._horizontalBarSpace.thickness = 1;\n this._grid.addControl(this._horizontalBarSpace, 1, 0);\n this._addBar(this._horizontalBar, this._horizontalBarSpace, false, 0);\n this._dragSpace = new Rectangle();\n this._dragSpace.thickness = 1;\n this._grid.addControl(this._dragSpace, 1, 1);\n // Colors\n if (!this._useImageBar) {\n this.barColor = \"grey\";\n this.barBackground = \"transparent\";\n }\n }\n /** Reset the scroll viewer window to initial size */\n resetWindow() {\n this._window.width = \"100%\";\n this._window.height = \"100%\";\n }\n _getTypeName() {\n return \"ScrollViewer\";\n }\n _buildClientSizes() {\n const ratio = this.host.idealRatio;\n this._window.parentClientWidth = this._currentMeasure.width - (this._verticalBar.isVisible || this.forceVerticalBar ? this._barSize * ratio : 0) - 2 * this.thickness;\n this._window.parentClientHeight = this._currentMeasure.height - (this._horizontalBar.isVisible || this.forceHorizontalBar ? this._barSize * ratio : 0) - 2 * this.thickness;\n this._clientWidth = this._window.parentClientWidth;\n this._clientHeight = this._window.parentClientHeight;\n }\n _additionalProcessing(parentMeasure, context) {\n super._additionalProcessing(parentMeasure, context);\n this._buildClientSizes();\n }\n _postMeasure() {\n super._postMeasure();\n this._updateScroller();\n this._setWindowPosition(false);\n }\n /**\n * Gets or sets the mouse wheel precision\n * from 0 to 1 with a default value of 0.05\n * */\n get wheelPrecision() {\n return this._wheelPrecision;\n }\n set wheelPrecision(value) {\n if (this._wheelPrecision === value) {\n return;\n }\n if (value < 0) {\n value = 0;\n }\n if (value > 1) {\n value = 1;\n }\n this._wheelPrecision = value;\n }\n /** Gets or sets the scroll bar container background color */\n get scrollBackground() {\n return this._horizontalBarSpace.background;\n }\n set scrollBackground(color) {\n if (this._horizontalBarSpace.background === color) {\n return;\n }\n this._horizontalBarSpace.background = color;\n this._verticalBarSpace.background = color;\n }\n /** Gets or sets the bar color */\n get barColor() {\n return this._barColor;\n }\n set barColor(color) {\n if (this._barColor === color) {\n return;\n }\n this._barColor = color;\n this._horizontalBar.color = color;\n this._verticalBar.color = color;\n }\n /** Gets or sets the bar image */\n get thumbImage() {\n return this._barImage;\n }\n set thumbImage(value) {\n if (this._barImage === value) {\n return;\n }\n this._barImage = value;\n const hb = this._horizontalBar;\n const vb = this._verticalBar;\n hb.thumbImage = value;\n vb.thumbImage = value;\n }\n /** Gets or sets the horizontal bar image */\n get horizontalThumbImage() {\n return this._horizontalBarImage;\n }\n set horizontalThumbImage(value) {\n if (this._horizontalBarImage === value) {\n return;\n }\n this._horizontalBarImage = value;\n const hb = this._horizontalBar;\n hb.thumbImage = value;\n }\n /** Gets or sets the vertical bar image */\n get verticalThumbImage() {\n return this._verticalBarImage;\n }\n set verticalThumbImage(value) {\n if (this._verticalBarImage === value) {\n return;\n }\n this._verticalBarImage = value;\n const vb = this._verticalBar;\n vb.thumbImage = value;\n }\n /** Gets or sets the size of the bar */\n get barSize() {\n return this._barSize;\n }\n set barSize(value) {\n if (this._barSize === value) {\n return;\n }\n this._barSize = value;\n this._markAsDirty();\n if (this._horizontalBar.isVisible) {\n this._grid.setRowDefinition(1, this._barSize, true);\n }\n if (this._verticalBar.isVisible) {\n this._grid.setColumnDefinition(1, this._barSize, true);\n }\n }\n /** Gets or sets the length of the thumb */\n get thumbLength() {\n return this._thumbLength;\n }\n set thumbLength(value) {\n if (this._thumbLength === value) {\n return;\n }\n if (value <= 0) {\n value = 0.1;\n }\n if (value > 1) {\n value = 1;\n }\n this._thumbLength = value;\n const hb = this._horizontalBar;\n const vb = this._verticalBar;\n hb.thumbLength = value;\n vb.thumbLength = value;\n this._markAsDirty();\n }\n /** Gets or sets the height of the thumb */\n get thumbHeight() {\n return this._thumbHeight;\n }\n set thumbHeight(value) {\n if (this._thumbHeight === value) {\n return;\n }\n if (value <= 0) {\n value = 0.1;\n }\n if (value > 1) {\n value = 1;\n }\n this._thumbHeight = value;\n const hb = this._horizontalBar;\n const vb = this._verticalBar;\n hb.thumbHeight = value;\n vb.thumbHeight = value;\n this._markAsDirty();\n }\n /** Gets or sets the height of the bar image */\n get barImageHeight() {\n return this._barImageHeight;\n }\n set barImageHeight(value) {\n if (this._barImageHeight === value) {\n return;\n }\n if (value <= 0) {\n value = 0.1;\n }\n if (value > 1) {\n value = 1;\n }\n this._barImageHeight = value;\n const hb = this._horizontalBar;\n const vb = this._verticalBar;\n hb.barImageHeight = value;\n vb.barImageHeight = value;\n this._markAsDirty();\n }\n /** Gets or sets the height of the horizontal bar image */\n get horizontalBarImageHeight() {\n return this._horizontalBarImageHeight;\n }\n set horizontalBarImageHeight(value) {\n if (this._horizontalBarImageHeight === value) {\n return;\n }\n if (value <= 0) {\n value = 0.1;\n }\n if (value > 1) {\n value = 1;\n }\n this._horizontalBarImageHeight = value;\n const hb = this._horizontalBar;\n hb.barImageHeight = value;\n this._markAsDirty();\n }\n /** Gets or sets the height of the vertical bar image */\n get verticalBarImageHeight() {\n return this._verticalBarImageHeight;\n }\n set verticalBarImageHeight(value) {\n if (this._verticalBarImageHeight === value) {\n return;\n }\n if (value <= 0) {\n value = 0.1;\n }\n if (value > 1) {\n value = 1;\n }\n this._verticalBarImageHeight = value;\n const vb = this._verticalBar;\n vb.barImageHeight = value;\n this._markAsDirty();\n }\n /** Gets or sets the bar background */\n get barBackground() {\n return this._barBackground;\n }\n set barBackground(color) {\n if (this._barBackground === color) {\n return;\n }\n this._barBackground = color;\n const hb = this._horizontalBar;\n const vb = this._verticalBar;\n hb.background = color;\n vb.background = color;\n this._dragSpace.background = color;\n }\n /** Gets or sets the bar background image */\n get barImage() {\n return this._barBackgroundImage;\n }\n set barImage(value) {\n this._barBackgroundImage = value;\n const hb = this._horizontalBar;\n const vb = this._verticalBar;\n hb.backgroundImage = value;\n vb.backgroundImage = value;\n }\n /** Gets or sets the horizontal bar background image */\n get horizontalBarImage() {\n return this._horizontalBarBackgroundImage;\n }\n set horizontalBarImage(value) {\n this._horizontalBarBackgroundImage = value;\n const hb = this._horizontalBar;\n hb.backgroundImage = value;\n }\n /** Gets or sets the vertical bar background image */\n get verticalBarImage() {\n return this._verticalBarBackgroundImage;\n }\n set verticalBarImage(value) {\n this._verticalBarBackgroundImage = value;\n const vb = this._verticalBar;\n vb.backgroundImage = value;\n }\n _setWindowPosition(force = true) {\n const ratio = this.host.idealRatio;\n const windowContentsWidth = this._window._currentMeasure.width;\n const windowContentsHeight = this._window._currentMeasure.height;\n if (!force && this._oldWindowContentsWidth === windowContentsWidth && this._oldWindowContentsHeight === windowContentsHeight) {\n return;\n }\n this._oldWindowContentsWidth = windowContentsWidth;\n this._oldWindowContentsHeight = windowContentsHeight;\n const _endLeft = this._clientWidth - windowContentsWidth;\n const _endTop = this._clientHeight - windowContentsHeight;\n const newLeft = (this._horizontalBar.value / ratio) * _endLeft + \"px\";\n const newTop = (this._verticalBar.value / ratio) * _endTop + \"px\";\n if (newLeft !== this._window.left) {\n this._window.left = newLeft;\n if (!this.freezeControls) {\n this._rebuildLayout = true;\n }\n }\n if (newTop !== this._window.top) {\n this._window.top = newTop;\n if (!this.freezeControls) {\n this._rebuildLayout = true;\n }\n }\n }\n /** @internal */\n _updateScroller() {\n const windowContentsWidth = this._window._currentMeasure.width;\n const windowContentsHeight = this._window._currentMeasure.height;\n if (this._horizontalBar.isVisible && windowContentsWidth <= this._clientWidth && !this.forceHorizontalBar) {\n this._grid.setRowDefinition(1, 0, true);\n this._horizontalBar.isVisible = false;\n this._horizontalBar.value = 0;\n this._rebuildLayout = true;\n }\n else if (!this._horizontalBar.isVisible && (windowContentsWidth > this._clientWidth || this.forceHorizontalBar)) {\n this._grid.setRowDefinition(1, this._barSize, true);\n this._horizontalBar.isVisible = true;\n this._rebuildLayout = true;\n }\n if (this._verticalBar.isVisible && windowContentsHeight <= this._clientHeight && !this.forceVerticalBar) {\n this._grid.setColumnDefinition(1, 0, true);\n this._verticalBar.isVisible = false;\n this._verticalBar.value = 0;\n this._rebuildLayout = true;\n }\n else if (!this._verticalBar.isVisible && (windowContentsHeight > this._clientHeight || this.forceVerticalBar)) {\n this._grid.setColumnDefinition(1, this._barSize, true);\n this._verticalBar.isVisible = true;\n this._rebuildLayout = true;\n }\n this._buildClientSizes();\n const ratio = this.host.idealRatio;\n this._horizontalBar.thumbWidth = this._thumbLength * 0.9 * (this._clientWidth / ratio) + \"px\";\n this._verticalBar.thumbWidth = this._thumbLength * 0.9 * (this._clientHeight / ratio) + \"px\";\n }\n _link(host) {\n super._link(host);\n this._attachWheel();\n }\n /**\n * @internal\n */\n _addBar(barControl, barContainer, isVertical, rotation) {\n barControl.paddingLeft = 0;\n barControl.width = \"100%\";\n barControl.height = \"100%\";\n barControl.barOffset = 0;\n barControl.value = 0;\n barControl.maximum = 1;\n barControl.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_CENTER;\n barControl.verticalAlignment = Control.VERTICAL_ALIGNMENT_CENTER;\n barControl.isVertical = isVertical;\n barControl.rotation = rotation;\n barControl.isVisible = false;\n barContainer.addControl(barControl);\n barControl.onValueChangedObservable.add(() => {\n this._setWindowPosition();\n });\n }\n /** @internal */\n _attachWheel() {\n if (!this._host || this._onWheelObserver) {\n return;\n }\n this._onWheelObserver = this.onWheelObservable.add((pi) => {\n if (!this._pointerIsOver || this.isReadOnly) {\n return;\n }\n if (this._verticalBar.isVisible == true) {\n if (pi.y < 0 && this._verticalBar.value > 0) {\n this._verticalBar.value -= this._wheelPrecision;\n }\n else if (pi.y > 0 && this._verticalBar.value < this._verticalBar.maximum) {\n this._verticalBar.value += this._wheelPrecision;\n }\n }\n if (this._horizontalBar.isVisible == true) {\n if (pi.x < 0 && this._horizontalBar.value < this._horizontalBar.maximum) {\n this._horizontalBar.value += this._wheelPrecision;\n }\n else if (pi.x > 0 && this._horizontalBar.value > 0) {\n this._horizontalBar.value -= this._wheelPrecision;\n }\n }\n });\n }\n _renderHighlightSpecific(context) {\n if (!this.isHighlighted) {\n return;\n }\n super._renderHighlightSpecific(context);\n this._grid._renderHighlightSpecific(context);\n context.restore();\n }\n /** Releases associated resources */\n dispose() {\n this.onWheelObservable.remove(this._onWheelObserver);\n this._onWheelObserver = null;\n super.dispose();\n }\n}\n__decorate([\n serialize()\n], ScrollViewer.prototype, \"wheelPrecision\", null);\n__decorate([\n serialize()\n], ScrollViewer.prototype, \"scrollBackground\", null);\n__decorate([\n serialize()\n], ScrollViewer.prototype, \"barColor\", null);\n__decorate([\n serialize()\n], ScrollViewer.prototype, \"barSize\", null);\n__decorate([\n serialize()\n], ScrollViewer.prototype, \"barBackground\", null);\nRegisterClass(\"BABYLON.GUI.ScrollViewer\", ScrollViewer);\n//# sourceMappingURL=scrollViewer.js.map","import { Observable } from \"@babylonjs/core/Misc/observable.js\";\nimport { Rectangle } from \"./rectangle.js\";\nimport { RegisterClass } from \"@babylonjs/core/Misc/typeStore.js\";\n/**\n * Class used to create toggle buttons\n * @since 5.0.0\n */\nexport class ToggleButton extends Rectangle {\n /** Gets or sets group name this toggle button belongs to */\n get group() {\n return this._group;\n }\n set group(value) {\n if (this._group === value) {\n return;\n }\n this._group = value;\n }\n /** Gets or sets a boolean indicating if the toggle button is active or not */\n get isActive() {\n return this._isActive;\n }\n set isActive(value) {\n var _a, _b;\n // Function modeled after radioButton.ts\n if (this._isActive === value) {\n return;\n }\n this._isActive = value;\n // Update the visual state based on the new value\n if (this._isActive) {\n (_a = this.toActiveAnimation) === null || _a === void 0 ? void 0 : _a.call(this);\n }\n else {\n (_b = this.toInactiveAnimation) === null || _b === void 0 ? void 0 : _b.call(this);\n }\n this._markAsDirty();\n this.onIsActiveChangedObservable.notifyObservers(value);\n if (this._isActive && this._host && this._group) {\n // A toggle button in a group can only have 1 active element at a given time.\n // If this toggle button has a group, set other toggle buttons in the group to inactive.\n this._host.executeOnAllControls((control) => {\n // Check for control type ToggleButton\n if (control.typeName === \"ToggleButton\") {\n // Don't do anything to this toggle button\n if (control === this) {\n return;\n }\n const childToggle = control;\n // If toggle button is in same group, set isActive to false\n if (childToggle.group === this.group) {\n childToggle.isActive = false;\n }\n }\n });\n }\n }\n /**\n * Creates a new ToggleButton\n * @param name defines the control name\n * @param group defines the toggle group this toggle belongs to\n */\n constructor(name, group) {\n super(name);\n this.name = name;\n /** Observable raised when isActive is changed */\n this.onIsActiveChangedObservable = new Observable();\n /**\n * Gets or sets a boolean indicating that the toggle button will let internal controls handle picking instead of doing it directly using its bounding info\n */\n this.delegatePickingToChildren = false;\n this._isActive = false;\n this.group = group !== null && group !== void 0 ? group : \"\";\n this.thickness = 0;\n this.isPointerBlocker = true;\n let alphaStore = null;\n this.toActiveAnimation = () => {\n this.thickness = 1;\n };\n this.toInactiveAnimation = () => {\n this.thickness = 0;\n };\n this.pointerEnterActiveAnimation = () => {\n alphaStore = this.alpha;\n this.alpha -= 0.1;\n };\n this.pointerOutActiveAnimation = () => {\n if (alphaStore !== null) {\n this.alpha = alphaStore;\n }\n };\n this.pointerDownActiveAnimation = () => {\n this.scaleX -= 0.05;\n this.scaleY -= 0.05;\n };\n this.pointerUpActiveAnimation = () => {\n this.scaleX += 0.05;\n this.scaleY += 0.05;\n };\n this.pointerEnterInactiveAnimation = () => {\n alphaStore = this.alpha;\n this.alpha -= 0.1;\n };\n this.pointerOutInactiveAnimation = () => {\n if (alphaStore !== null) {\n this.alpha = alphaStore;\n }\n };\n this.pointerDownInactiveAnimation = () => {\n this.scaleX -= 0.05;\n this.scaleY -= 0.05;\n };\n this.pointerUpInactiveAnimation = () => {\n this.scaleX += 0.05;\n this.scaleY += 0.05;\n };\n }\n _getTypeName() {\n return \"ToggleButton\";\n }\n // While being a container, the toggle button behaves like a control.\n /**\n * @internal\n */\n _processPicking(x, y, pi, type, pointerId, buttonIndex, deltaX, deltaY) {\n if (!this._isEnabled || !this.isHitTestVisible || !this.isVisible || this.notRenderable) {\n return false;\n }\n if (!super.contains(x, y)) {\n return false;\n }\n if (this.delegatePickingToChildren) {\n let contains = false;\n for (let index = this._children.length - 1; index >= 0; index--) {\n const child = this._children[index];\n if (child.isEnabled && child.isHitTestVisible && child.isVisible && !child.notRenderable && child.contains(x, y)) {\n contains = true;\n break;\n }\n }\n if (!contains) {\n return false;\n }\n }\n this._processObservables(type, x, y, pi, pointerId, buttonIndex, deltaX, deltaY);\n return true;\n }\n /**\n * @internal\n */\n _onPointerEnter(target, pi) {\n if (!super._onPointerEnter(target, pi)) {\n return false;\n }\n if (this.isReadOnly) {\n return true;\n }\n if (this._isActive) {\n if (this.pointerEnterActiveAnimation) {\n this.pointerEnterActiveAnimation();\n }\n }\n else {\n if (this.pointerEnterInactiveAnimation) {\n this.pointerEnterInactiveAnimation();\n }\n }\n return true;\n }\n /**\n * @internal\n */\n _onPointerOut(target, pi, force = false) {\n if (!this.isReadOnly) {\n if (this._isActive) {\n if (this.pointerOutActiveAnimation) {\n this.pointerOutActiveAnimation();\n }\n }\n else {\n if (this.pointerOutInactiveAnimation) {\n this.pointerOutInactiveAnimation();\n }\n }\n }\n super._onPointerOut(target, pi, force);\n }\n /**\n * @internal\n */\n _onPointerDown(target, coordinates, pointerId, buttonIndex, pi) {\n if (!super._onPointerDown(target, coordinates, pointerId, buttonIndex, pi)) {\n return false;\n }\n if (this.isReadOnly) {\n return true;\n }\n if (this._isActive) {\n if (this.pointerDownActiveAnimation) {\n this.pointerDownActiveAnimation();\n }\n }\n else {\n if (this.pointerDownInactiveAnimation) {\n this.pointerDownInactiveAnimation();\n }\n }\n return true;\n }\n /**\n * @internal\n */\n _onPointerUp(target, coordinates, pointerId, buttonIndex, notifyClick, pi) {\n if (!this.isReadOnly) {\n if (this._isActive) {\n if (this.pointerUpActiveAnimation) {\n this.pointerUpActiveAnimation();\n }\n }\n else {\n if (this.pointerUpInactiveAnimation) {\n this.pointerUpInactiveAnimation();\n }\n }\n }\n super._onPointerUp(target, coordinates, pointerId, buttonIndex, notifyClick, pi);\n }\n}\nRegisterClass(\"BABYLON.GUI.ToggleButton\", ToggleButton);\n//# sourceMappingURL=toggleButton.js.map","import { Observable } from \"@babylonjs/core/Misc/observable.js\";\nimport { StackPanel } from \"./stackPanel.js\";\nimport { Button } from \"./button.js\";\nimport { RegisterClass } from \"@babylonjs/core/Misc/typeStore.js\";\nimport { InputTextArea } from \"./inputTextArea.js\";\n/**\n * Class used to store key control properties\n */\nexport class KeyPropertySet {\n}\n/**\n * Class used to create virtual keyboard\n */\nexport class VirtualKeyboard extends StackPanel {\n constructor() {\n super(...arguments);\n /** Observable raised when a key is pressed */\n this.onKeyPressObservable = new Observable();\n /** Gets or sets default key button width */\n this.defaultButtonWidth = \"40px\";\n /** Gets or sets default key button height */\n this.defaultButtonHeight = \"40px\";\n /** Gets or sets default key button left padding */\n this.defaultButtonPaddingLeft = \"2px\";\n /** Gets or sets default key button right padding */\n this.defaultButtonPaddingRight = \"2px\";\n /** Gets or sets default key button top padding */\n this.defaultButtonPaddingTop = \"2px\";\n /** Gets or sets default key button bottom padding */\n this.defaultButtonPaddingBottom = \"2px\";\n /** Gets or sets default key button foreground color */\n this.defaultButtonColor = \"#DDD\";\n /** Gets or sets default key button background color */\n this.defaultButtonBackground = \"#070707\";\n /** Gets or sets shift button foreground color */\n this.shiftButtonColor = \"#7799FF\";\n /** Gets or sets shift button thickness*/\n this.selectedShiftThickness = 1;\n /** Gets shift key state */\n this.shiftState = 0;\n this._currentlyConnectedInputText = null;\n this._connectedInputTexts = [];\n this._onKeyPressObserver = null;\n }\n _getTypeName() {\n return \"VirtualKeyboard\";\n }\n _createKey(key, propertySet) {\n const button = Button.CreateSimpleButton(key, key);\n button.width = propertySet && propertySet.width ? propertySet.width : this.defaultButtonWidth;\n button.height = propertySet && propertySet.height ? propertySet.height : this.defaultButtonHeight;\n button.color = propertySet && propertySet.color ? propertySet.color : this.defaultButtonColor;\n button.background = propertySet && propertySet.background ? propertySet.background : this.defaultButtonBackground;\n button.paddingLeft = propertySet && propertySet.paddingLeft ? propertySet.paddingLeft : this.defaultButtonPaddingLeft;\n button.paddingRight = propertySet && propertySet.paddingRight ? propertySet.paddingRight : this.defaultButtonPaddingRight;\n button.paddingTop = propertySet && propertySet.paddingTop ? propertySet.paddingTop : this.defaultButtonPaddingTop;\n button.paddingBottom = propertySet && propertySet.paddingBottom ? propertySet.paddingBottom : this.defaultButtonPaddingBottom;\n button.thickness = 0;\n button.isFocusInvisible = true;\n button.shadowColor = this.shadowColor;\n button.shadowBlur = this.shadowBlur;\n button.shadowOffsetX = this.shadowOffsetX;\n button.shadowOffsetY = this.shadowOffsetY;\n button.onPointerUpObservable.add(() => {\n this.onKeyPressObservable.notifyObservers(key);\n });\n return button;\n }\n /**\n * Adds a new row of keys\n * @param keys defines the list of keys to add\n * @param propertySets defines the associated property sets\n */\n addKeysRow(keys, propertySets) {\n const panel = new StackPanel();\n panel.isVertical = false;\n panel.isFocusInvisible = true;\n let maxKey = null;\n for (let i = 0; i < keys.length; i++) {\n let properties = null;\n if (propertySets && propertySets.length === keys.length) {\n properties = propertySets[i];\n }\n const key = this._createKey(keys[i], properties);\n if (!maxKey || key.heightInPixels > maxKey.heightInPixels) {\n maxKey = key;\n }\n panel.addControl(key);\n }\n panel.height = maxKey ? maxKey.height : this.defaultButtonHeight;\n this.addControl(panel);\n }\n /**\n * Set the shift key to a specific state\n * @param shiftState defines the new shift state\n */\n applyShiftState(shiftState) {\n if (!this.children) {\n return;\n }\n for (let i = 0; i < this.children.length; i++) {\n const row = this.children[i];\n if (!row || !row.children) {\n continue;\n }\n const rowContainer = row;\n for (let j = 0; j < rowContainer.children.length; j++) {\n const button = rowContainer.children[j];\n if (!button || !button.children[0]) {\n continue;\n }\n const button_tblock = button.children[0];\n if (button_tblock.text === \"\\u21E7\") {\n button.color = shiftState ? this.shiftButtonColor : this.defaultButtonColor;\n button.thickness = shiftState > 1 ? this.selectedShiftThickness : 0;\n }\n button_tblock.text = shiftState > 0 ? button_tblock.text.toUpperCase() : button_tblock.text.toLowerCase();\n }\n }\n }\n /** Gets the input text control currently attached to the keyboard */\n get connectedInputText() {\n return this._currentlyConnectedInputText;\n }\n /**\n * Connects the keyboard with an input text control\n *\n * @param input defines the target control\n */\n connect(input) {\n const inputTextAlreadyConnected = this._connectedInputTexts.some((a) => a.input === input);\n if (inputTextAlreadyConnected) {\n return;\n }\n if (this._onKeyPressObserver === null) {\n this._onKeyPressObserver = this.onKeyPressObservable.add((key) => {\n if (!this._currentlyConnectedInputText) {\n return;\n }\n this._currentlyConnectedInputText._host.focusedControl = this._currentlyConnectedInputText;\n switch (key) {\n case \"\\u21E7\":\n this.shiftState++;\n if (this.shiftState > 2) {\n this.shiftState = 0;\n }\n this.applyShiftState(this.shiftState);\n return;\n case \"\\u2190\":\n if (this._currentlyConnectedInputText instanceof InputTextArea) {\n this._currentlyConnectedInputText.alternativeProcessKey(\"Backspace\");\n }\n else {\n this._currentlyConnectedInputText.processKey(8);\n }\n return;\n case \"\\u21B5\":\n if (this._currentlyConnectedInputText instanceof InputTextArea) {\n this._currentlyConnectedInputText.alternativeProcessKey(\"Enter\");\n }\n else {\n this._currentlyConnectedInputText.processKey(13);\n }\n return;\n }\n if (this._currentlyConnectedInputText instanceof InputTextArea) {\n this._currentlyConnectedInputText.alternativeProcessKey(\"\", this.shiftState ? key.toUpperCase() : key);\n }\n else {\n this._currentlyConnectedInputText.processKey(-1, this.shiftState ? key.toUpperCase() : key);\n }\n if (this.shiftState === 1) {\n this.shiftState = 0;\n this.applyShiftState(this.shiftState);\n }\n });\n }\n this.isVisible = false;\n this._currentlyConnectedInputText = input;\n input._connectedVirtualKeyboard = this;\n // Events hooking\n const onFocusObserver = input.onFocusObservable.add(() => {\n this._currentlyConnectedInputText = input;\n input._connectedVirtualKeyboard = this;\n this.isVisible = true;\n });\n const onBlurObserver = input.onBlurObservable.add(() => {\n input._connectedVirtualKeyboard = null;\n this._currentlyConnectedInputText = null;\n this.isVisible = false;\n });\n this._connectedInputTexts.push({\n input,\n onBlurObserver,\n onFocusObserver,\n });\n }\n /**\n * Disconnects the keyboard from connected InputText controls\n *\n * @param input optionally defines a target control, otherwise all are disconnected\n */\n disconnect(input) {\n if (input) {\n // .find not available on IE\n const filtered = this._connectedInputTexts.filter((a) => a.input === input);\n if (filtered.length === 1) {\n this._removeConnectedInputObservables(filtered[0]);\n this._connectedInputTexts = this._connectedInputTexts.filter((a) => a.input !== input);\n if (this._currentlyConnectedInputText === input) {\n this._currentlyConnectedInputText = null;\n }\n }\n }\n else {\n this._connectedInputTexts.forEach((connectedInputText) => {\n this._removeConnectedInputObservables(connectedInputText);\n });\n this._connectedInputTexts.length = 0;\n }\n if (this._connectedInputTexts.length === 0) {\n this._currentlyConnectedInputText = null;\n this.onKeyPressObservable.remove(this._onKeyPressObserver);\n this._onKeyPressObserver = null;\n }\n }\n _removeConnectedInputObservables(connectedInputText) {\n connectedInputText.input._connectedVirtualKeyboard = null;\n connectedInputText.input.onFocusObservable.remove(connectedInputText.onFocusObserver);\n connectedInputText.input.onBlurObservable.remove(connectedInputText.onBlurObserver);\n }\n /**\n * Release all resources\n */\n dispose() {\n super.dispose();\n this.disconnect();\n }\n // Statics\n /**\n * Creates a new keyboard using a default layout\n *\n * @param name defines control name\n * @returns a new VirtualKeyboard\n */\n static CreateDefaultLayout(name) {\n const returnValue = new VirtualKeyboard(name);\n returnValue.addKeysRow([\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"0\", \"\\u2190\"]);\n returnValue.addKeysRow([\"q\", \"w\", \"e\", \"r\", \"t\", \"y\", \"u\", \"i\", \"o\", \"p\"]);\n returnValue.addKeysRow([\"a\", \"s\", \"d\", \"f\", \"g\", \"h\", \"j\", \"k\", \"l\", \";\", \"'\", \"\\u21B5\"]);\n returnValue.addKeysRow([\"\\u21E7\", \"z\", \"x\", \"c\", \"v\", \"b\", \"n\", \"m\", \",\", \".\", \"/\"]);\n returnValue.addKeysRow([\" \"], [{ width: \"200px\" }]);\n return returnValue;\n }\n /**\n * @internal\n */\n _parseFromContent(serializedObject, host) {\n super._parseFromContent(serializedObject, host);\n for (const row of this.children) {\n if (row.getClassName() === \"StackPanel\") {\n const stackPanel = row;\n for (const key of stackPanel.children) {\n if (key.getClassName() === \"Button\" && key.name) {\n key.onPointerUpObservable.add(() => {\n this.onKeyPressObservable.notifyObservers(key.name);\n });\n }\n }\n }\n }\n }\n}\nRegisterClass(\"BABYLON.GUI.VirtualKeyboard\", VirtualKeyboard);\n//# sourceMappingURL=virtualKeyboard.js.map","import { __decorate } from \"@babylonjs/core/tslib.es6.js\";\nimport { Control } from \"./control.js\";\nimport { RegisterClass } from \"@babylonjs/core/Misc/typeStore.js\";\nimport { serialize } from \"@babylonjs/core/Misc/decorators.js\";\n/** Class used to render a grid */\nexport class DisplayGrid extends Control {\n /** Gets or sets a boolean indicating if minor lines must be rendered (true by default)) */\n get displayMinorLines() {\n return this._displayMinorLines;\n }\n set displayMinorLines(value) {\n if (this._displayMinorLines === value) {\n return;\n }\n this._displayMinorLines = value;\n this._markAsDirty();\n }\n /** Gets or sets a boolean indicating if major lines must be rendered (true by default)) */\n get displayMajorLines() {\n return this._displayMajorLines;\n }\n set displayMajorLines(value) {\n if (this._displayMajorLines === value) {\n return;\n }\n this._displayMajorLines = value;\n this._markAsDirty();\n }\n /** Gets or sets background color (Black by default) */\n get background() {\n return this._background;\n }\n set background(value) {\n if (this._background === value) {\n return;\n }\n this._background = value;\n this._markAsDirty();\n }\n /** Gets or sets the width of each cell (20 by default) */\n get cellWidth() {\n return this._cellWidth;\n }\n set cellWidth(value) {\n this._cellWidth = value;\n this._markAsDirty();\n }\n /** Gets or sets the height of each cell (20 by default) */\n get cellHeight() {\n return this._cellHeight;\n }\n set cellHeight(value) {\n this._cellHeight = value;\n this._markAsDirty();\n }\n /** Gets or sets the tickness of minor lines (1 by default) */\n get minorLineTickness() {\n return this._minorLineTickness;\n }\n set minorLineTickness(value) {\n this._minorLineTickness = value;\n this._markAsDirty();\n }\n /** Gets or sets the color of minor lines (DarkGray by default) */\n get minorLineColor() {\n return this._minorLineColor;\n }\n set minorLineColor(value) {\n this._minorLineColor = value;\n this._markAsDirty();\n }\n /** Gets or sets the tickness of major lines (2 by default) */\n get majorLineTickness() {\n return this._majorLineTickness;\n }\n set majorLineTickness(value) {\n this._majorLineTickness = value;\n this._markAsDirty();\n }\n /** Gets or sets the color of major lines (White by default) */\n get majorLineColor() {\n return this._majorLineColor;\n }\n set majorLineColor(value) {\n this._majorLineColor = value;\n this._markAsDirty();\n }\n /** Gets or sets the frequency of major lines (default is 1 every 5 minor lines)*/\n get majorLineFrequency() {\n return this._majorLineFrequency;\n }\n set majorLineFrequency(value) {\n this._majorLineFrequency = value;\n this._markAsDirty();\n }\n /**\n * Creates a new GridDisplayRectangle\n * @param name defines the control name\n */\n constructor(name) {\n super(name);\n this.name = name;\n this._cellWidth = 20;\n this._cellHeight = 20;\n this._minorLineTickness = 1;\n this._minorLineColor = \"DarkGray\";\n this._majorLineTickness = 2;\n this._majorLineColor = \"White\";\n this._majorLineFrequency = 5;\n this._background = \"Black\";\n this._displayMajorLines = true;\n this._displayMinorLines = true;\n }\n _draw(context) {\n context.save();\n this._applyStates(context);\n if (this._isEnabled) {\n if (this._background) {\n context.fillStyle = this._background;\n context.fillRect(this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);\n }\n const cellCountX = this._currentMeasure.width / this._cellWidth;\n const cellCountY = this._currentMeasure.height / this._cellHeight;\n // Minor lines\n const left = this._currentMeasure.left + this._currentMeasure.width / 2;\n const top = this._currentMeasure.top + this._currentMeasure.height / 2;\n if (this._displayMinorLines) {\n context.strokeStyle = this._minorLineColor;\n context.lineWidth = this._minorLineTickness;\n for (let x = -cellCountX / 2 + 1; x < cellCountX / 2; x++) {\n const cellX = left + x * this.cellWidth;\n context.beginPath();\n context.moveTo(cellX, this._currentMeasure.top);\n context.lineTo(cellX, this._currentMeasure.top + this._currentMeasure.height);\n context.stroke();\n }\n for (let y = -cellCountY / 2 + 1; y < cellCountY / 2; y++) {\n const cellY = top + y * this.cellHeight;\n context.beginPath();\n context.moveTo(this._currentMeasure.left, cellY);\n context.lineTo(this._currentMeasure.left + this._currentMeasure.width, cellY);\n context.stroke();\n }\n }\n // Major lines\n if (this._displayMajorLines) {\n context.strokeStyle = this._majorLineColor;\n context.lineWidth = this._majorLineTickness;\n for (let x = -cellCountX / 2 + this._majorLineFrequency; x < cellCountX / 2; x += this._majorLineFrequency) {\n const cellX = left + x * this.cellWidth;\n context.beginPath();\n context.moveTo(cellX, this._currentMeasure.top);\n context.lineTo(cellX, this._currentMeasure.top + this._currentMeasure.height);\n context.stroke();\n }\n for (let y = -cellCountY / 2 + this._majorLineFrequency; y < cellCountY / 2; y += this._majorLineFrequency) {\n const cellY = top + y * this.cellHeight;\n context.moveTo(this._currentMeasure.left, cellY);\n context.lineTo(this._currentMeasure.left + this._currentMeasure.width, cellY);\n context.closePath();\n context.stroke();\n }\n }\n }\n context.restore();\n }\n _getTypeName() {\n return \"DisplayGrid\";\n }\n}\n__decorate([\n serialize()\n], DisplayGrid.prototype, \"displayMinorLines\", null);\n__decorate([\n serialize()\n], DisplayGrid.prototype, \"displayMajorLines\", null);\n__decorate([\n serialize()\n], DisplayGrid.prototype, \"background\", null);\n__decorate([\n serialize()\n], DisplayGrid.prototype, \"cellWidth\", null);\n__decorate([\n serialize()\n], DisplayGrid.prototype, \"cellHeight\", null);\n__decorate([\n serialize()\n], DisplayGrid.prototype, \"minorLineTickness\", null);\n__decorate([\n serialize()\n], DisplayGrid.prototype, \"minorLineColor\", null);\n__decorate([\n serialize()\n], DisplayGrid.prototype, \"majorLineTickness\", null);\n__decorate([\n serialize()\n], DisplayGrid.prototype, \"majorLineColor\", null);\n__decorate([\n serialize()\n], DisplayGrid.prototype, \"majorLineFrequency\", null);\nRegisterClass(\"BABYLON.GUI.DisplayGrid\", DisplayGrid);\n//# sourceMappingURL=displayGrid.js.map","import { __decorate } from \"@babylonjs/core/tslib.es6.js\";\nimport { BaseSlider } from \"./baseSlider.js\";\nimport { Measure } from \"../../measure.js\";\nimport { Image } from \"../image.js\";\nimport { RegisterClass } from \"@babylonjs/core/Misc/typeStore.js\";\nimport { serialize } from \"@babylonjs/core/Misc/decorators.js\";\n/**\n * Class used to create slider controls based on images\n */\nexport class ImageBasedSlider extends BaseSlider {\n get displayThumb() {\n return this._displayThumb && this.thumbImage != null;\n }\n set displayThumb(value) {\n if (this._displayThumb === value) {\n return;\n }\n this._displayThumb = value;\n this._markAsDirty();\n }\n /**\n * Gets or sets the image used to render the background\n */\n get backgroundImage() {\n return this._backgroundImage;\n }\n set backgroundImage(value) {\n if (this._backgroundImage === value) {\n return;\n }\n this._backgroundImage = value;\n if (value && !value.isLoaded) {\n value.onImageLoadedObservable.addOnce(() => this._markAsDirty());\n }\n this._markAsDirty();\n }\n /**\n * Gets or sets the image used to render the value bar\n */\n get valueBarImage() {\n return this._valueBarImage;\n }\n set valueBarImage(value) {\n if (this._valueBarImage === value) {\n return;\n }\n this._valueBarImage = value;\n if (value && !value.isLoaded) {\n value.onImageLoadedObservable.addOnce(() => this._markAsDirty());\n }\n this._markAsDirty();\n }\n /**\n * Gets or sets the image used to render the thumb\n */\n get thumbImage() {\n return this._thumbImage;\n }\n set thumbImage(value) {\n if (this._thumbImage === value) {\n return;\n }\n this._thumbImage = value;\n if (value && !value.isLoaded) {\n value.onImageLoadedObservable.addOnce(() => this._markAsDirty());\n }\n this._markAsDirty();\n }\n /**\n * Creates a new ImageBasedSlider\n * @param name defines the control name\n */\n constructor(name) {\n super(name);\n this.name = name;\n this._tempMeasure = new Measure(0, 0, 0, 0);\n }\n _getTypeName() {\n return \"ImageBasedSlider\";\n }\n _draw(context) {\n context.save();\n this._applyStates(context);\n this._prepareRenderingData(\"rectangle\");\n const thumbPosition = this._getThumbPosition();\n const left = this._renderLeft;\n const top = this._renderTop;\n const width = this._renderWidth;\n const height = this._renderHeight;\n // Background\n if (this._backgroundImage) {\n this._tempMeasure.copyFromFloats(left, top, width, height);\n if (this.isThumbClamped && this.displayThumb) {\n if (this.isVertical) {\n this._tempMeasure.height += this._effectiveThumbThickness;\n }\n else {\n this._tempMeasure.width += this._effectiveThumbThickness;\n }\n }\n this._backgroundImage._currentMeasure.copyFrom(this._tempMeasure);\n this._backgroundImage._draw(context);\n }\n // Bar\n if (this._valueBarImage) {\n if (this.isVertical) {\n if (this.isThumbClamped && this.displayThumb) {\n this._tempMeasure.copyFromFloats(left, top + thumbPosition, width, height - thumbPosition + this._effectiveThumbThickness);\n }\n else {\n this._tempMeasure.copyFromFloats(left, top + thumbPosition, width, height - thumbPosition);\n }\n }\n else {\n if (this.isThumbClamped && this.displayThumb) {\n this._tempMeasure.copyFromFloats(left, top, thumbPosition + this._effectiveThumbThickness / 2, height);\n }\n else {\n this._tempMeasure.copyFromFloats(left, top, thumbPosition, height);\n }\n }\n this._valueBarImage._currentMeasure.copyFrom(this._tempMeasure);\n this._valueBarImage._draw(context);\n }\n // Thumb\n if (this.displayThumb) {\n if (this.isVertical) {\n this._tempMeasure.copyFromFloats(left - this._effectiveBarOffset, this._currentMeasure.top + thumbPosition, this._currentMeasure.width, this._effectiveThumbThickness);\n }\n else {\n this._tempMeasure.copyFromFloats(this._currentMeasure.left + thumbPosition, this._currentMeasure.top, this._effectiveThumbThickness, this._currentMeasure.height);\n }\n this._thumbImage._currentMeasure.copyFrom(this._tempMeasure);\n this._thumbImage._draw(context);\n }\n context.restore();\n }\n /**\n * Serializes the current control\n * @param serializationObject defined the JSON serialized object\n */\n serialize(serializationObject) {\n super.serialize(serializationObject);\n const backgroundImage = {};\n const thumbImage = {};\n const valueBarImage = {};\n this.backgroundImage.serialize(backgroundImage);\n this.thumbImage.serialize(thumbImage);\n this.valueBarImage.serialize(valueBarImage);\n serializationObject.backgroundImage = backgroundImage;\n serializationObject.thumbImage = thumbImage;\n serializationObject.valueBarImage = valueBarImage;\n }\n /**\n * @internal\n */\n _parseFromContent(serializedObject, host) {\n super._parseFromContent(serializedObject, host);\n this.backgroundImage = Image.Parse(serializedObject.backgroundImage, host);\n this.thumbImage = Image.Parse(serializedObject.thumbImage, host);\n this.valueBarImage = Image.Parse(serializedObject.valueBarImage, host);\n }\n}\n__decorate([\n serialize()\n], ImageBasedSlider.prototype, \"displayThumb\", null);\nRegisterClass(\"BABYLON.GUI.ImageBasedSlider\", ImageBasedSlider);\n//# sourceMappingURL=imageBasedSlider.js.map","import { Control } from \"./control.js\";\nimport { StackPanel } from \"./stackPanel.js\";\nimport { TextBlock } from \"./textBlock.js\";\n/**\n * Forcing an export so that this code will execute\n * @internal\n */\nconst name = \"Statics\";\nexport { name };\n/**\n * Creates a stack panel that can be used to render headers\n * @param control defines the control to associate with the header\n * @param text defines the text of the header\n * @param size defines the size of the header\n * @param options defines options used to configure the header\n * @param options.isHorizontal\n * @param options.controlFirst\n * @returns a new StackPanel\n */\nControl.AddHeader = function (control, text, size, options) {\n const panel = new StackPanel(\"panel\");\n const isHorizontal = options ? options.isHorizontal : true;\n const controlFirst = options ? options.controlFirst : true;\n panel.isVertical = !isHorizontal;\n const header = new TextBlock(\"header\");\n header.text = text;\n header.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;\n if (isHorizontal) {\n header.width = size;\n }\n else {\n header.height = size;\n }\n if (controlFirst) {\n panel.addControl(control);\n panel.addControl(header);\n header.paddingLeft = \"5px\";\n }\n else {\n panel.addControl(header);\n panel.addControl(control);\n header.paddingRight = \"5px\";\n }\n header.shadowBlur = control.shadowBlur;\n header.shadowColor = control.shadowColor;\n header.shadowOffsetX = control.shadowOffsetX;\n header.shadowOffsetY = control.shadowOffsetY;\n return panel;\n};\n//# sourceMappingURL=statics.js.map","/*\n * Base Gradient class. Should not be used directly.\n */\n/**\n * Class that serves as a base for all the gradients created from context.\n */\nexport class BaseGradient {\n constructor() {\n this._colorStops = [];\n this._gradientDirty = true;\n }\n _addColorStopsToCanvasGradient() {\n for (const stop of this._colorStops) {\n this._canvasGradient.addColorStop(stop.offset, stop.color);\n }\n }\n /**\n * If there are any changes or the context changed, regenerate the canvas gradient object. Else,\n * reuse the existing gradient.\n **/\n getCanvasGradient(context) {\n if (this._gradientDirty || this._context !== context) {\n this._context = context;\n this._canvasGradient = this._createCanvasGradient(context);\n this._addColorStopsToCanvasGradient();\n this._gradientDirty = false;\n }\n return this._canvasGradient;\n }\n /**\n * Adds a new color stop to the gradient.\n * @param offset the offset of the stop on the gradient. Should be between 0 and 1\n * @param color the color of the stop\n */\n addColorStop(offset, color) {\n this._colorStops.push({ offset, color });\n this._gradientDirty = true;\n }\n /**\n * Removes an existing color stop with the specified offset from the gradient\n * @param offset the offset of the stop to be removed\n */\n removeColorStop(offset) {\n this._colorStops = this._colorStops.filter((colorStop) => colorStop.offset !== offset);\n this._gradientDirty = true;\n }\n /**\n * Removes all color stops from the gradient\n */\n clearColorStops() {\n this._colorStops = [];\n this._gradientDirty = true;\n }\n /** Color stops of the gradient */\n get colorStops() {\n return this._colorStops;\n }\n /** Type of the gradient */\n getClassName() {\n return \"BaseGradient\";\n }\n /** Serialize into a json object */\n serialize(serializationObject) {\n serializationObject.colorStops = this._colorStops;\n serializationObject.className = this.getClassName();\n }\n /** Parse from json object */\n parse(serializationObject) {\n this._colorStops = serializationObject.colorStops;\n }\n}\n//# sourceMappingURL=BaseGradient.js.map","import { BaseGradient } from \"./BaseGradient.js\";\nimport { RegisterClass } from \"@babylonjs/core/Misc/typeStore.js\";\n/**\n * Gradient along a line that connects two coordinates.\n * These coordinates are relative to the canvas' space, not to any control's space.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/createLinearGradient\n */\nexport class LinearGradient extends BaseGradient {\n /**\n * Creates a new linear gradient\n * @param x0\n * @param y0\n * @param x1\n * @param y1\n */\n constructor(x0, y0, x1, y1) {\n super();\n this._x0 = x0 !== null && x0 !== void 0 ? x0 : 0;\n this._y0 = y0 !== null && y0 !== void 0 ? y0 : 0;\n this._x1 = x1 !== null && x1 !== void 0 ? x1 : 0;\n this._y1 = y1 !== null && y1 !== void 0 ? y1 : 0;\n }\n _createCanvasGradient(context) {\n return context.createLinearGradient(this._x0, this._y0, this._x1, this._y1);\n }\n /** X axis coordinate of the starting point in the line */\n get x0() {\n return this._x0;\n }\n /** X axis coordinate of the ending point in the line */\n get x1() {\n return this._x1;\n }\n /** Y axis coordinate of the starting point in the line */\n get y0() {\n return this._y0;\n }\n /** Y axis coordinate of the ending point in the line */\n get y1() {\n return this._y1;\n }\n /**\n * Class name of the gradient\n * @returns the class name of the gradient\n */\n getClassName() {\n return \"LinearGradient\";\n }\n /**\n * Serializes this gradient\n * @param serializationObject the object to serialize to\n */\n serialize(serializationObject) {\n super.serialize(serializationObject);\n serializationObject.x0 = this._x0;\n serializationObject.y0 = this._y0;\n serializationObject.x1 = this._x1;\n serializationObject.y1 = this._y1;\n }\n /**\n * Parses a gradient from a serialization object\n * @param serializationObject the object to parse from\n */\n parse(serializationObject) {\n super.parse(serializationObject);\n this._x0 = serializationObject.x0;\n this._y0 = serializationObject.y0;\n this._x1 = serializationObject.x1;\n this._y1 = serializationObject.y1;\n }\n}\nRegisterClass(\"BABYLON.GUI.LinearGradient\", LinearGradient);\n//# sourceMappingURL=LinearGradient.js.map","import { BaseGradient } from \"./BaseGradient.js\";\nimport { RegisterClass } from \"@babylonjs/core/Misc/typeStore.js\";\n/**\n * Gradient formed from two circles with their own centers and radius.\n * The coordinates of the circles centers are relative to the canvas' space, not to any control's space.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/createRadialGradient\n */\nexport class RadialGradient extends BaseGradient {\n /**\n * Creates a new radial gradient\n * @param x0 x coordinate of the first circle's center\n * @param y0 y coordinate of the first circle's center\n * @param r0 radius of the first circle\n * @param x1 x coordinate of the second circle's center\n * @param y1 y coordinate of the second circle's center\n * @param r1 radius of the second circle\n */\n constructor(x0, y0, r0, x1, y1, r1) {\n super();\n this._x0 = x0 !== null && x0 !== void 0 ? x0 : 0;\n this._y0 = y0 !== null && y0 !== void 0 ? y0 : 0;\n this._r0 = r0 !== null && r0 !== void 0 ? r0 : 0;\n this._x1 = x1 !== null && x1 !== void 0 ? x1 : 0;\n this._y1 = y1 !== null && y1 !== void 0 ? y1 : 0;\n this._r1 = r1 !== null && r1 !== void 0 ? r1 : 0;\n }\n _createCanvasGradient(context) {\n return context.createRadialGradient(this._x0, this._y0, this._r0, this._x1, this._y1, this._r1);\n }\n /** x coordinate of the first circle's center */\n get x0() {\n return this._x0;\n }\n /** x coordinate of the second circle's center */\n get x1() {\n return this._x1;\n }\n /** y coordinate of the first circle's center */\n get y0() {\n return this._y0;\n }\n /** y coordinate of the second circle's center */\n get y1() {\n return this._y1;\n }\n /** radius of the first circle */\n get r0() {\n return this._r0;\n }\n /** radius of the second circle */\n get r1() {\n return this._r1;\n }\n /**\n * Class name of the gradient\n * @returns the class name of the gradient\n */\n getClassName() {\n return \"RadialGradient\";\n }\n /**\n * Serializes this gradient\n * @param serializationObject the object to serialize to\n */\n serialize(serializationObject) {\n super.serialize(serializationObject);\n serializationObject.x0 = this._x0;\n serializationObject.y0 = this._y0;\n serializationObject.r0 = this._r0;\n serializationObject.x1 = this._x1;\n serializationObject.y1 = this._y1;\n serializationObject.r1 = this._r1;\n }\n /**\n * Parses a gradient from a serialization object\n * @param serializationObject the object to parse from\n */\n parse(serializationObject) {\n super.parse(serializationObject);\n this._x0 = serializationObject.x0;\n this._y0 = serializationObject.y0;\n this._r0 = serializationObject.r0;\n this._x1 = serializationObject.x1;\n this._y1 = serializationObject.y1;\n this._r1 = serializationObject.r1;\n }\n}\nRegisterClass(\"BABYLON.GUI.RadialGradient\", RadialGradient);\n//# sourceMappingURL=RadialGradient.js.map","import { Vector2 } from \"@babylonjs/core/Maths/math.vector.js\";\nimport { Epsilon } from \"@babylonjs/core/Maths/math.constants.js\";\n/**\n * Class used to transport Vector2 information for pointer events\n */\nexport class Vector2WithInfo extends Vector2 {\n /**\n * Creates a new Vector2WithInfo\n * @param source defines the vector2 data to transport\n * @param buttonIndex defines the current mouse button index\n */\n constructor(source, \n /** defines the current mouse button index */\n buttonIndex = 0) {\n super(source.x, source.y);\n this.buttonIndex = buttonIndex;\n }\n}\n/** Class used to provide 2D matrix features */\nexport class Matrix2D {\n /**\n * Creates a new matrix\n * @param m00 defines value for (0, 0)\n * @param m01 defines value for (0, 1)\n * @param m10 defines value for (1, 0)\n * @param m11 defines value for (1, 1)\n * @param m20 defines value for (2, 0)\n * @param m21 defines value for (2, 1)\n */\n constructor(m00, m01, m10, m11, m20, m21) {\n /** Gets the internal array of 6 floats used to store matrix data */\n this.m = new Float32Array(6);\n this.fromValues(m00, m01, m10, m11, m20, m21);\n }\n /**\n * Fills the matrix from direct values\n * @param m00 defines value for (0, 0)\n * @param m01 defines value for (0, 1)\n * @param m10 defines value for (1, 0)\n * @param m11 defines value for (1, 1)\n * @param m20 defines value for (2, 0)\n * @param m21 defines value for (2, 1)\n * @returns the current modified matrix\n */\n fromValues(m00, m01, m10, m11, m20, m21) {\n this.m[0] = m00;\n this.m[1] = m01;\n this.m[2] = m10;\n this.m[3] = m11;\n this.m[4] = m20;\n this.m[5] = m21;\n return this;\n }\n /**\n * Gets matrix determinant\n * @returns the determinant\n */\n determinant() {\n return this.m[0] * this.m[3] - this.m[1] * this.m[2];\n }\n /**\n * Inverses the matrix and stores it in a target matrix\n * @param result defines the target matrix\n * @returns the current matrix\n */\n invertToRef(result) {\n const l0 = this.m[0];\n const l1 = this.m[1];\n const l2 = this.m[2];\n const l3 = this.m[3];\n const l4 = this.m[4];\n const l5 = this.m[5];\n const det = this.determinant();\n if (det < Epsilon * Epsilon) {\n result.m[0] = 0;\n result.m[1] = 0;\n result.m[2] = 0;\n result.m[3] = 0;\n result.m[4] = 0;\n result.m[5] = 0;\n return this;\n }\n const detDiv = 1 / det;\n const det4 = l2 * l5 - l3 * l4;\n const det5 = l1 * l4 - l0 * l5;\n result.m[0] = l3 * detDiv;\n result.m[1] = -l1 * detDiv;\n result.m[2] = -l2 * detDiv;\n result.m[3] = l0 * detDiv;\n result.m[4] = det4 * detDiv;\n result.m[5] = det5 * detDiv;\n return this;\n }\n /**\n * Multiplies the current matrix with another one\n * @param other defines the second operand\n * @param result defines the target matrix\n * @returns the current matrix\n */\n multiplyToRef(other, result) {\n const l0 = this.m[0];\n const l1 = this.m[1];\n const l2 = this.m[2];\n const l3 = this.m[3];\n const l4 = this.m[4];\n const l5 = this.m[5];\n const r0 = other.m[0];\n const r1 = other.m[1];\n const r2 = other.m[2];\n const r3 = other.m[3];\n const r4 = other.m[4];\n const r5 = other.m[5];\n result.m[0] = l0 * r0 + l1 * r2;\n result.m[1] = l0 * r1 + l1 * r3;\n result.m[2] = l2 * r0 + l3 * r2;\n result.m[3] = l2 * r1 + l3 * r3;\n result.m[4] = l4 * r0 + l5 * r2 + r4;\n result.m[5] = l4 * r1 + l5 * r3 + r5;\n return this;\n }\n /**\n * Applies the current matrix to a set of 2 floats and stores the result in a vector2\n * @param x defines the x coordinate to transform\n * @param y defines the x coordinate to transform\n * @param result defines the target vector2\n * @returns the current matrix\n */\n transformCoordinates(x, y, result) {\n result.x = x * this.m[0] + y * this.m[2] + this.m[4];\n result.y = x * this.m[1] + y * this.m[3] + this.m[5];\n return this;\n }\n // Statics\n /**\n * Creates an identity matrix\n * @returns a new matrix\n */\n static Identity() {\n return new Matrix2D(1, 0, 0, 1, 0, 0);\n }\n /**\n * Creates an identity matrix and stores it in a target matrix\n * @param result defines the target matrix\n */\n static IdentityToRef(result) {\n result.m[0] = 1;\n result.m[1] = 0;\n result.m[2] = 0;\n result.m[3] = 1;\n result.m[4] = 0;\n result.m[5] = 0;\n }\n /**\n * Creates a translation matrix and stores it in a target matrix\n * @param x defines the x coordinate of the translation\n * @param y defines the y coordinate of the translation\n * @param result defines the target matrix\n */\n static TranslationToRef(x, y, result) {\n result.fromValues(1, 0, 0, 1, x, y);\n }\n /**\n * Creates a scaling matrix and stores it in a target matrix\n * @param x defines the x coordinate of the scaling\n * @param y defines the y coordinate of the scaling\n * @param result defines the target matrix\n */\n static ScalingToRef(x, y, result) {\n result.fromValues(x, 0, 0, y, 0, 0);\n }\n /**\n * Creates a rotation matrix and stores it in a target matrix\n * @param angle defines the rotation angle\n * @param result defines the target matrix\n */\n static RotationToRef(angle, result) {\n const s = Math.sin(angle);\n const c = Math.cos(angle);\n result.fromValues(c, s, -s, c, 0, 0);\n }\n /**\n * Composes a matrix from translation, rotation, scaling and parent matrix and stores it in a target matrix\n * @param tx defines the x coordinate of the translation\n * @param ty defines the y coordinate of the translation\n * @param angle defines the rotation angle\n * @param scaleX defines the x coordinate of the scaling\n * @param scaleY defines the y coordinate of the scaling\n * @param parentMatrix defines the parent matrix to multiply by (can be null)\n * @param result defines the target matrix\n */\n static ComposeToRef(tx, ty, angle, scaleX, scaleY, parentMatrix, result) {\n Matrix2D.TranslationToRef(tx, ty, Matrix2D._TempPreTranslationMatrix);\n Matrix2D.ScalingToRef(scaleX, scaleY, Matrix2D._TempScalingMatrix);\n Matrix2D.RotationToRef(angle, Matrix2D._TempRotationMatrix);\n Matrix2D.TranslationToRef(-tx, -ty, Matrix2D._TempPostTranslationMatrix);\n Matrix2D._TempPreTranslationMatrix.multiplyToRef(Matrix2D._TempScalingMatrix, Matrix2D._TempCompose0);\n Matrix2D._TempCompose0.multiplyToRef(Matrix2D._TempRotationMatrix, Matrix2D._TempCompose1);\n if (parentMatrix) {\n Matrix2D._TempCompose1.multiplyToRef(Matrix2D._TempPostTranslationMatrix, Matrix2D._TempCompose2);\n Matrix2D._TempCompose2.multiplyToRef(parentMatrix, result);\n }\n else {\n Matrix2D._TempCompose1.multiplyToRef(Matrix2D._TempPostTranslationMatrix, result);\n }\n }\n}\nMatrix2D._TempPreTranslationMatrix = Matrix2D.Identity();\nMatrix2D._TempPostTranslationMatrix = Matrix2D.Identity();\nMatrix2D._TempRotationMatrix = Matrix2D.Identity();\nMatrix2D._TempScalingMatrix = Matrix2D.Identity();\nMatrix2D._TempCompose0 = Matrix2D.Identity();\nMatrix2D._TempCompose1 = Matrix2D.Identity();\nMatrix2D._TempCompose2 = Matrix2D.Identity();\n/**\n * Useful math functions\n */\nexport class MathTools {\n /**\n * Rounds a number to the nearest multiple of a given precision\n * @param value the value to be rounded\n * @param precision the multiple to which the value will be rounded. Default is 100 (2 decimal digits)\n * @returns\n */\n static Round(value, precision = MathTools.DefaultRoundingPrecision) {\n return Math.round(value * precision) / precision;\n }\n}\n/**\n * Default rounding precision for GUI elements. It should be\n * set to a power of ten, where the exponent means the number\n * of decimal digits to round to, i.e, 100 means 2 decimal digits,\n * 1000 means 3 decimal digits, etc. Default is 100 (2 decimal digits).\n */\nMathTools.DefaultRoundingPrecision = 100;\n//# sourceMappingURL=math2D.js.map","import { Vector2 } from \"@babylonjs/core/Maths/math.vector.js\";\nconst tmpRect = [new Vector2(0, 0), new Vector2(0, 0), new Vector2(0, 0), new Vector2(0, 0)];\nconst tmpRect2 = [new Vector2(0, 0), new Vector2(0, 0), new Vector2(0, 0), new Vector2(0, 0)];\nconst tmpV1 = new Vector2(0, 0);\nconst tmpV2 = new Vector2(0, 0);\n/**\n * Class used to store 2D control sizes\n */\nexport class Measure {\n /**\n * Creates a new measure\n * @param left defines left coordinate\n * @param top defines top coordinate\n * @param width defines width dimension\n * @param height defines height dimension\n */\n constructor(\n /** defines left coordinate */\n left, \n /** defines top coordinate */\n top, \n /** defines width dimension */\n width, \n /** defines height dimension */\n height) {\n this.left = left;\n this.top = top;\n this.width = width;\n this.height = height;\n }\n /**\n * Copy from another measure\n * @param other defines the other measure to copy from\n */\n copyFrom(other) {\n this.left = other.left;\n this.top = other.top;\n this.width = other.width;\n this.height = other.height;\n }\n /**\n * Copy from a group of 4 floats\n * @param left defines left coordinate\n * @param top defines top coordinate\n * @param width defines width dimension\n * @param height defines height dimension\n */\n copyFromFloats(left, top, width, height) {\n this.left = left;\n this.top = top;\n this.width = width;\n this.height = height;\n }\n /**\n * Computes the axis aligned bounding box measure for two given measures\n * @param a Input measure\n * @param b Input measure\n * @param result the resulting bounding measure\n */\n static CombineToRef(a, b, result) {\n const left = Math.min(a.left, b.left);\n const top = Math.min(a.top, b.top);\n const right = Math.max(a.left + a.width, b.left + b.width);\n const bottom = Math.max(a.top + a.height, b.top + b.height);\n result.left = left;\n result.top = top;\n result.width = right - left;\n result.height = bottom - top;\n }\n /**\n * Computes the axis aligned bounding box of the measure after it is modified by a given transform\n * @param transform the matrix to transform the measure before computing the AABB\n * @param addX number to add to left\n * @param addY number to add to top\n * @param addWidth number to add to width\n * @param addHeight number to add to height\n * @param result the resulting AABB\n */\n addAndTransformToRef(transform, addX, addY, addWidth, addHeight, result) {\n const left = this.left + addX;\n const top = this.top + addY;\n const width = this.width + addWidth;\n const height = this.height + addHeight;\n tmpRect[0].copyFromFloats(left, top);\n tmpRect[1].copyFromFloats(left + width, top);\n tmpRect[2].copyFromFloats(left + width, top + height);\n tmpRect[3].copyFromFloats(left, top + height);\n tmpV1.copyFromFloats(Number.MAX_VALUE, Number.MAX_VALUE);\n tmpV2.copyFromFloats(0, 0);\n for (let i = 0; i < 4; i++) {\n transform.transformCoordinates(tmpRect[i].x, tmpRect[i].y, tmpRect2[i]);\n tmpV1.x = Math.floor(Math.min(tmpV1.x, tmpRect2[i].x));\n tmpV1.y = Math.floor(Math.min(tmpV1.y, tmpRect2[i].y));\n tmpV2.x = Math.ceil(Math.max(tmpV2.x, tmpRect2[i].x));\n tmpV2.y = Math.ceil(Math.max(tmpV2.y, tmpRect2[i].y));\n }\n result.left = tmpV1.x;\n result.top = tmpV1.y;\n result.width = tmpV2.x - tmpV1.x;\n result.height = tmpV2.y - tmpV1.y;\n }\n /**\n * Computes the axis aligned bounding box of the measure after it is modified by a given transform\n * @param transform the matrix to transform the measure before computing the AABB\n * @param result the resulting AABB\n */\n transformToRef(transform, result) {\n this.addAndTransformToRef(transform, 0, 0, 0, 0, result);\n }\n /**\n * Check equality between this measure and another one\n * @param other defines the other measures\n * @returns true if both measures are equals\n */\n isEqualsTo(other) {\n if (this.left !== other.left) {\n return false;\n }\n if (this.top !== other.top) {\n return false;\n }\n if (this.width !== other.width) {\n return false;\n }\n if (this.height !== other.height) {\n return false;\n }\n return true;\n }\n /**\n * Creates an empty measure\n * @returns a new measure\n */\n static Empty() {\n return new Measure(0, 0, 0, 0);\n }\n}\n//# sourceMappingURL=measure.js.map","import { Observable } from \"@babylonjs/core/Misc/observable.js\";\nimport { ValueAndUnit } from \"./valueAndUnit.js\";\n/**\n * Define a style used by control to automatically setup properties based on a template.\n * Only support font related properties so far\n */\nexport class Style {\n /**\n * Creates a new style object\n * @param host defines the AdvancedDynamicTexture which hosts this style\n */\n constructor(host) {\n this._fontFamily = \"Arial\";\n this._fontStyle = \"\";\n this._fontWeight = \"\";\n /** @internal */\n this._fontSize = new ValueAndUnit(18, ValueAndUnit.UNITMODE_PIXEL, false);\n /**\n * Observable raised when the style values are changed\n */\n this.onChangedObservable = new Observable();\n this._host = host;\n }\n /**\n * Gets or sets the font size\n */\n get fontSize() {\n return this._fontSize.toString(this._host);\n }\n set fontSize(value) {\n if (this._fontSize.toString(this._host) === value) {\n return;\n }\n if (this._fontSize.fromString(value)) {\n this.onChangedObservable.notifyObservers(this);\n }\n }\n /**\n * Gets or sets the font family\n */\n get fontFamily() {\n return this._fontFamily;\n }\n set fontFamily(value) {\n if (this._fontFamily === value) {\n return;\n }\n this._fontFamily = value;\n this.onChangedObservable.notifyObservers(this);\n }\n /**\n * Gets or sets the font style\n */\n get fontStyle() {\n return this._fontStyle;\n }\n set fontStyle(value) {\n if (this._fontStyle === value) {\n return;\n }\n this._fontStyle = value;\n this.onChangedObservable.notifyObservers(this);\n }\n /** Gets or sets font weight */\n get fontWeight() {\n return this._fontWeight;\n }\n set fontWeight(value) {\n if (this._fontWeight === value) {\n return;\n }\n this._fontWeight = value;\n this.onChangedObservable.notifyObservers(this);\n }\n /** Dispose all associated resources */\n dispose() {\n this.onChangedObservable.clear();\n }\n}\n//# sourceMappingURL=style.js.map","import { Observable } from \"@babylonjs/core/Misc/observable.js\";\n/**\n * Class used to specific a value and its associated unit\n */\nexport class ValueAndUnit {\n /**\n * Creates a new ValueAndUnit\n * @param value defines the value to store\n * @param unit defines the unit to store - defaults to ValueAndUnit.UNITMODE_PIXEL\n * @param negativeValueAllowed defines a boolean indicating if the value can be negative\n */\n constructor(value, \n /** defines the unit to store */\n unit = ValueAndUnit.UNITMODE_PIXEL, \n /** defines a boolean indicating if the value can be negative */\n negativeValueAllowed = true) {\n this.negativeValueAllowed = negativeValueAllowed;\n this._value = 1;\n this._unit = ValueAndUnit.UNITMODE_PIXEL;\n /**\n * Gets or sets a value indicating that this value will not scale accordingly with adaptive scaling property\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#adaptive-scaling\n */\n this.ignoreAdaptiveScaling = false;\n /**\n * Observable event triggered each time the value or unit changes\n */\n this.onChangedObservable = new Observable();\n this._value = value;\n this._unit = unit;\n this._originalUnit = unit;\n }\n /** Gets a boolean indicating if the value is a percentage */\n get isPercentage() {\n return this._unit === ValueAndUnit.UNITMODE_PERCENTAGE;\n }\n /** Gets a boolean indicating if the value is store as pixel */\n get isPixel() {\n return this._unit === ValueAndUnit.UNITMODE_PIXEL;\n }\n /**\n * Gets value (without units)\n * @deprecated use value property instead\n */\n get internalValue() {\n return this._value;\n }\n /** Gets value (without units) */\n get value() {\n return this._value;\n }\n /** Sets value (without units) */\n set value(value) {\n if (value !== this._value) {\n this._value = value;\n this.onChangedObservable.notifyObservers();\n }\n }\n /** Gets units (without value) */\n get unit() {\n return this._unit;\n }\n /** Sets units (without value) */\n set unit(value) {\n if (value !== this._unit) {\n this._unit = value;\n this.onChangedObservable.notifyObservers();\n }\n }\n /**\n * Gets value as pixel\n * @param host defines the root host\n * @param refValue defines the reference value for percentages\n * @returns the value as pixel\n */\n getValueInPixel(host, refValue) {\n if (this.isPixel) {\n return this.getValue(host);\n }\n return this.getValue(host) * refValue;\n }\n /**\n * Update the current value and unit.\n * @param value defines the value to store\n * @param unit defines the unit to store\n * @returns the current ValueAndUnit\n */\n updateInPlace(value, unit = ValueAndUnit.UNITMODE_PIXEL) {\n if (this.value !== value || this.unit !== unit) {\n // set member variables to notify only once\n this._value = value;\n this._unit = unit;\n this.onChangedObservable.notifyObservers();\n }\n return this;\n }\n /**\n * Gets the value accordingly to its unit\n * @param host defines the root host\n * @returns the value\n */\n getValue(host) {\n if (host && !this.ignoreAdaptiveScaling && this.unit !== ValueAndUnit.UNITMODE_PERCENTAGE) {\n let width = 0;\n let height = 0;\n if (host.idealWidth) {\n width = Math.ceil((this._value * host.getSize().width) / host.idealWidth);\n }\n if (host.idealHeight) {\n height = Math.ceil((this._value * host.getSize().height) / host.idealHeight);\n }\n if (host.useSmallestIdeal && host.idealWidth && host.idealHeight) {\n return window.innerWidth < window.innerHeight ? width : height;\n }\n if (host.idealWidth) {\n // horizontal\n return width;\n }\n if (host.idealHeight) {\n // vertical\n return height;\n }\n }\n return this._value;\n }\n /**\n * Gets a string representation of the value\n * @param host defines the root host\n * @param decimals defines an optional number of decimals to display\n * @returns a string\n */\n toString(host, decimals) {\n switch (this._unit) {\n case ValueAndUnit.UNITMODE_PERCENTAGE: {\n const percentage = this.getValue(host) * 100;\n return (decimals ? percentage.toFixed(decimals) : percentage) + \"%\";\n }\n case ValueAndUnit.UNITMODE_PIXEL: {\n const pixels = this.getValue(host);\n return (decimals ? pixels.toFixed(decimals) : pixels) + \"px\";\n }\n }\n return this._unit.toString();\n }\n /**\n * Store a value parsed from a string\n * @param source defines the source string\n * @returns true if the value was successfully parsed and updated\n */\n fromString(source) {\n const match = ValueAndUnit._Regex.exec(source.toString());\n if (!match || match.length === 0) {\n return false;\n }\n let sourceValue = parseFloat(match[1]);\n let sourceUnit = this._originalUnit;\n if (!this.negativeValueAllowed) {\n if (sourceValue < 0) {\n sourceValue = 0;\n }\n }\n if (match.length === 4) {\n switch (match[3]) {\n case \"px\":\n sourceUnit = ValueAndUnit.UNITMODE_PIXEL;\n break;\n case \"%\":\n sourceUnit = ValueAndUnit.UNITMODE_PERCENTAGE;\n sourceValue /= 100.0;\n break;\n }\n }\n if (sourceValue === this._value && sourceUnit === this._unit) {\n return false;\n }\n this._value = sourceValue;\n this._unit = sourceUnit;\n this.onChangedObservable.notifyObservers();\n return true;\n }\n /** UNITMODE_PERCENTAGE */\n static get UNITMODE_PERCENTAGE() {\n return ValueAndUnit._UNITMODE_PERCENTAGE;\n }\n /** UNITMODE_PIXEL */\n static get UNITMODE_PIXEL() {\n return ValueAndUnit._UNITMODE_PIXEL;\n }\n}\n// Static\nValueAndUnit._Regex = /(^-?\\d*(\\.\\d+)?)(%|px)?/;\nValueAndUnit._UNITMODE_PERCENTAGE = 0;\nValueAndUnit._UNITMODE_PIXEL = 1;\n//# sourceMappingURL=valueAndUnit.js.map"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","style","ref","attrs","on","onCanvasClick","$event","onDragOverItem","onDropItem","staticStyle","staticRenderFns","XView","UIElement","mounted","$nextTick","ro","ResizeObserver","entries","clearTimeout","_resizeTimer","setTimeout","parentRectangle","canvasElement","parentElement","getBoundingClientRect","rectangle","finalRectangle","DOMRect","x","y","width","height","_viewer","setSizeView","observe","_isMounted","_mountedCallback","_configuration","loadConfiguration","beforeDestroy","e","sender","args","event","_isDropAllowed","preventDefault","MathHelper","pick","offsetX","offsetY","onConfigurationPropertyChanged","value","oldValue","configuration","viewer","screenshotData","takeScreenshotAsync","_showPreview","updateCurrentOrientation","$throttle","_updateCurrentOrientation","Viewer360","iconProvider","cam","_hidePreview","loadConfigurationAsync","error","console","$emit","target","getTarget","_orientation","z","_focale","fov","sourcePreview","transitionElement","src","className","$refs","__decorate","Watch","JsonProperty","name","type","Object","editorBrowsable","groupName","PropSyncWithInternal","required","default","Number","template","Boolean","PropSync","Component","component","earcut","data","holeIndices","dim","minX","minY","maxX","maxY","invSize","hasHoles","length","outerLen","outerNode","linkedList","triangles","next","prev","eliminateHoles","i","Math","max","earcutLinked","start","end","clockwise","last","signedArea","insertNode","equals","removeNode","filterPoints","again","p","steiner","area","ear","pass","indexCurve","stop","isEarHashed","isEar","push","cureLocalIntersections","splitEarcut","a","b","c","ax","bx","cx","ay","by","cy","x0","y0","x1","y1","pointInTriangle","minZ","zOrder","maxZ","prevZ","n","nextZ","intersects","locallyInside","isValidDiagonal","splitPolygon","len","list","queue","getLeftmost","sort","compareX","eliminateHole","hole","bridge","findHoleBridge","bridgeReverse","m","hx","hy","qx","Infinity","tan","mx","my","tanMin","abs","sectorContainsSector","sortLinked","q","tail","numMerges","pSize","qSize","inSize","leftmost","px","py","intersectsPolygon","middleInside","r","p1","p2","q1","q2","o1","sign","o2","o3","o4","onSegment","min","num","inside","a2","Node","b2","an","bp","sum","j","module","exports","deviation","polygonArea","trianglesArea","flatten","result","vertices","holes","dimensions","holeIndex","d","Camera360MouseInput","FreeCameraMouseInput","attachControl","noPreventDefault","super","_wheel","s","PointerEventTypes","delta","mouseWheelLegacyEvent","wheelDelta","wheelDeltaPercentage","camera","wheelPrecision","deltaValue","deltaY","detail","inertialRadiusOffset","_wheelObserver","getScene","onPointerObservable","add","detachControl","engine","getEngine","element","getInputElement","remove","serialize","Camera360PointersInput","BaseCameraPointersInput","onTouch","point","useRightHandedSystem","parent","_getWorldMatrixDeterminant","speed","angularSensibility","cameraRotation","onMultiTouch","_pointA","_pointB","previousPinchSquaredDistance","pinchSquaredDistance","_previousMultiTouchPanPosition","_multiTouchPanPosition","angularPinchSensibility","ZoomAndPanMouseInput","BaseCameraMouseWheelInput","checkInputs","_wheelDeltaX","_wheelDeltaY","_wheelDeltaZ","ZoomAndPanPointersInput","sensibility","position","pointA","pointB","pinchSensibility","Flat2DCamera","UniversalCamera","constructor","scene","Vector3","fovMode","Constants","inputs","clear","lookTo","Error","setPitch","pitch","rotation","setYaw","yaw","setRoll","roll","_checkInputs","inertia","Epsilon","_checkLimits","minFov","maxFov","Sphere360Camera","PI","addMouse","addTouch","_setupInputs","coordinates","cartesianCoordinates","DefaultCoordinates","setTarget","touchEnabled","_camera360MouseInput","_camera360TouchInput","Tooltip","Rectangle","text","advancedTexture","anchor","actionManager","options","_anchor","_actionManager","_guiTexture","adaptWidthToChildren","adaptHeightToChildren","thickness","background","_textblock","TextBlock","resizeToFit","paddingBottomInPixels","paddingLeftInPixels","paddingRightInPixels","paddingTopInPixels","addControl","linkWithMesh","_setPosition","hotspotMeshSize","getBoundingInfo","boundingSphere","radius","tooltipHeight","_getHeight","tooltipWidth","_getWidth","TooltipPosition","linkOffsetY","linkOffsetX","_bind","onPointerOverAction","ExecuteCodeAction","ActionManager","_","isVisible","linkedMesh","beginDirectAnimation","animations","onPointerOutAction","stopAnimation","registerAction","_actions","_unbind","forEach","unregisterAction","context","getContext","font","fontSize","fontFamily","measure","measureText","fontSizeInPixels","_updateVisibility","visibility","TooltipVisibility","_animations","alphaAnimation","Animation","keys","frame","setKeys","_options","color","ColorHelper","size","CreatePolygon3D","points","mesh","Mesh","flatPoints","flatMap","trianglesIndices","normals","VertexData","vertexData","positions","indices","applyToMesh","BaseDynamicImageTexture","DynamicTexture","image","samplingMode","Texture","padding","drawImage","update","IconTexture","vScale","vOffset","uScale","uOffset","wrapU","wrapV","wrapR","AnimatedSpriteTexture","nRows","nCols","frameRate","fakeLastKey","uAnimation","Array","fill","map","floatInterpolateFunction","startValue","vAnimation","ResizedTextureProvider","maxWidth","maxHeight","_maxWidth","_maxHeight","url","texture","getTextureByName","_fileToolsLoadSvgAsync","_computeNewDimensions","resizeWidthFactor","resizeHeightFactor","offlineProvider","mimeType","file","_fileToolsLoadFileAsync","svg","svgDocument","DOMParser","parseFromString","svgDocumentElement","documentElement","baseVal","valueAsString","toString","viewBox","XMLSerializer","serializeToString","base64EncodedSVG","btoa","_fileToolsLoadImageAsync","Promise","resolve","reject","FileTools","useArrayBuffer","responseURL","BaseHotspotOverlay","Scene","addTransformNode","TransformNode","_iconProvider","_textureProvider","_tooltipsGui","AdvancedDynamicTexture","_highlightLayers","activeCamera","autoClear","onBeforeRenderObservable","scaleFactor","renderScale","meshes","dispose","executeOnAllControls","tooltip","key","hotspots","hotspot","isIconHotspot","_createHotspotMeshAsync","_addEventListeners","_addTooltip","setOrigin","originX","originY","originZ","transformNode","getTransformNodeByName","content","tooltipStyle","TooltipStyle","onclick","RendererHelper","_createIconMeshAsync","_createShapeMeshAsync","_createTextMeshAsync","doubleMargin","textMesh","MeshBuilder","fontData","depth","MIN_VALUE","boundingBox","maximum","subtract","minimum","scale","bakeCurrentTransformIntoVertices","material","StandardMaterial","rgbaColor","emissiveColor","Color3","g","alpha","box","onMeshIconCreatedAsync","iconInfos","getIconInfo","animation","createAnimatedSpriteTextureAsync","beginAnimation","startFrame","endFrame","createIconTextureAsync","icon","EnumHelper","textureType","TextureTypes","hasAlpha","opacityTexture","emissiveTexture","ambientTexture","specularTexture","diffuseTexture","getCartesianCoordinatesOfShapeAsync","rgbaHoverColor","hoverColor","polygon","_createPolygon","stroke","rgbaStrokeColor","strokeColor","_createOutline","hoverAlpha","backFaceCulling","freezeWorldMatrix","SetValueAction","highlightLayer","HighlightLayer","isStroke","mainTextureFixedSize","addMesh","Vector3WithInfo","source","buttonIndex","Control3D","_node","scaling","_isScaledByManager","behaviors","_behaviors","addBehavior","behavior","index","indexOf","init","_host","isLoading","onDataLoadedObservable","addOnce","attach","removeBehavior","detach","splice","getBehaviorByName","_isVisible","setEnabled","_downCount","_enterCount","_downPointerIds","onPointerMoveObservable","onPointerOutObservable","onPointerDownObservable","onPointerUpObservable","onPointerClickObservable","onPointerEnterObservable","typeName","_getTypeName","getClassName","node","linkToTransformNode","_prepareNode","_createNode","_injectGUI3DReservedDataStore","control","isPickable","_affectMaterial","_a","_b","reservedDataStore","GUI3D","_isTouchButton3D","undefined","_generatePointerEventType","_onPointerMove","notifyObservers","_onPointerEnter","pointerEnterAnimation","_onPointerOut","pointerOutAnimation","_onPointerDown","pointerId","pointerDownAnimation","_onPointerUp","notifyClick","pointerUpAnimation","forcePointerUp","_processObservables","pickedPoint","originMeshPosition","previousControlOver","_lastControlOver","_lastControlDown","_lastPickedControl","_disposeNode","ContentDisplay3D","arguments","_contentResolution","_contentScaleRatio","_content","utilityLayer","_facadeTexture","rootContainer","clearControls","utilityLayerScene","_setFacadeTextureScaling","premulAlpha","_applyFacade","scaleX","scaleY","_contentScaleRatioY","contentResolution","_resetContent","_disposeFacadeTexture","facadeTexture","AbstractButton3D","_currentMaterial","scaleInPlace","faceUV","copyFromFloats","wrap","specularColor","children","_children","blockLayout","_blockLayout","_arrangeChildren","updateLayout","containsControl","removeControl","UNSET_ORIENTATION","FACEORIGIN_ORIENTATION","FACEORIGINREVERSED_ORIENTATION","FACEFORWARD_ORIENTATION","FACEFORWARDREVERSED_ORIENTATION","orientation","columns","_columns","_rowThenColum","rows","_rows","margin","_cellWidth","_cellHeight","controlCount","currentInverseWorld","computeWorldMatrix","child","getHierarchyBoundingVectors","extendSize","diff","subtractToRef","ceil","startOffsetX","startOffsetY","nodeGrid","cellCounter","_mapGridNode","_finalProcessing","shader","FluentMaterialDefines","INNERGLOW","BORDER","HOVERLIGHT","TEXTURE","rebuild","innerGlowColorIntensity","innerGlowColor","albedoColor","renderBorders","borderWidth","edgeSmoothingValue","borderMinValue","renderHoverLight","hoverRadius","hoverPosition","needAlphaBlending","needAlphaTesting","getAlphaTestTexture","isReadyForSubMesh","subMesh","isFrozen","effect","_wasPreviouslyReady","materialDefines","defines","checkReadyOnEveryCall","_renderId","getRenderId","_areTexturesDirty","_albedoTexture","isReadyOrNotBlocking","isDirty","markAsProcessed","resetCachedMaterial","attribs","shaderName","uniforms","samplers","uniformBuffers","uniformsNames","uniformBuffersNames","maxSimultaneousLights","join","setEffect","createEffect","attributes","fallbacks","onCompiled","onError","indexParameters","_materialContext","isReady","bindForSubMesh","world","_activeEffect","bindOnlyWorldMatrix","setMatrix","getTransformMatrix","_mustRebind","setColor4","setFloat","multiplyToRef","setVector3","setDirectColor4","setTexture","matrix","getTextureMatrix","_afterBind","getActiveTextures","activeTextures","hasTexture","forceDisposeEffect","clone","serializationObject","customType","static","rootUrl","prototype","backPlateMargin","_backPlateMargin","_updateCurrentMinMax","_updateMargins","_backPlate","_backPlateMaterial","_pickedPointObserver","onPickedPointChangedObservable","nodePosition","_currentMin","_currentMax","minimizeInPlace","maximizeInPlace","addInPlaceFromFloats","subtractInPlace","addButton","button","wasLayoutBlocked","isBackplateVisible","MENU_BUTTON_SCALE","_control","FluentBackplateMaterialDefines","BLOB_ENABLE","BLOB_ENABLE_2","SMOOTH_EDGES","IRIDESCENT_MAP_ENABLE","_needNormals","FluentBackplateMaterial","lineWidth","absoluteSizes","_filterWidth","baseColor","lineColor","blobIntensity","blobFarSize","blobNearDistance","blobFarDistance","blobFadeLength","blobNearSize","blobPulse","blobFade","blobNearSize2","blobPulse2","blobFade2","_rate","highlightColor","highlightWidth","_highlightTransform","_highlight","iridescenceIntensity","iridescenceEdgeIntensity","_angle","fadeOut","_reflected","_frequency","_verticalOffset","globalLeftIndexTipPosition","_globalLeftIndexTipPosition4","globalRightIndexTipPosition","_globalRightIndexTipPosition4","alphaMode","_blobTexture","BLOB_TEXTURE_URL","_iridescentMap","IM_TEXTURE_URL","_isReadyForSubMesh","FOG","addFallback","IMAGEPROCESSINGPOSTPROCESS","imageProcessingConfiguration","applyByPostProcess","NORMAL","UV1","UV2","VERTEXCOLOR","TANGENT","setVector4","set","getAnimatables","HolographicBackplate","renderingGroupId","id","_model","_material","shareMaterials","_shareMaterials","collisionMesh","MODEL_BASE_URL","MODEL_FILENAME","then","importedModel","_createMaterial","_touchSharedMaterials","FluentButtonMaterialDefines","RELATIVE_WIDTH","ENABLE_FADE","_needUVs","FluentButtonMaterial","edgeWidth","edgeColor","proximityMaxIntensity","proximityFarDistance","proximityNearRadius","proximityAnisotropy","selectionFuzz","selected","selectionFade","selectionFadeSize","selectedDistance","selectedFadeLength","leftBlobEnable","leftBlobNearSize","leftBlobPulse","leftBlobFade","leftBlobInnerFade","rightBlobEnable","rightBlobNearSize","rightBlobPulse","rightBlobFade","rightBlobInnerFade","activeFaceDir","activeFaceUp","enableFade","fadeWidth","smoothActiveFace","showFrame","useBlobTexture","disableDepthWrite","_isNearPressed","_interactionSurfaceHeight","_isToggleButton","_toggleState","_toggleButtonCallback","_onToggle","onToggleObservable","collidableFrontDirection","isActiveNearInteraction","frontWorldDir","_collidableFrontDirection","normalize","_collisionMesh","invert","copyFrom","getWorldMatrix","transformedDirection","isNearPickable","getChildMeshes","forward","isToggleButton","removeCallback","isToggled","newState","_isInteractionInFrontOfButton","collidablePos","_getInteractionHeight","getAbsolutePosition","getPressDepth","touchPoint","interactionHeight","interactionPos","basePos","frontDir","abc","providedType","nearMeshPosition","activeInteractionCount","TouchHolographicButton","_disposeTooltip","_tooltipFade","_tooltipTextBlock","_tooltipTexture","_tooltipMesh","_tooltipHoverObserver","_tooltipOutObserver","_textPlate","_frontPlate","tooltipText","rightHandedScene","_scene","tooltipBackground","sideOrientation","mat","diffuseColor","addChild","delay","fadeIn","_text","_rebuildContent","imageUrl","_imageUrl","backMaterial","_backMaterial","frontMaterial","_frontMaterial","plateMaterial","_plateMaterial","_isBackplateVisible","_frontPlateDepth","_backPlateDepth","_backplateColor","_backplateToggledColor","decompose","_pointerHoverObserver","panel","isVertical","document","createElement","paddingTop","paddingBottom","alphaMesh","importedFrontPlate","tn","setParent","negate","_createBackMaterial","_createFrontMaterial","_createPlateMaterial","DefaultBehavior","followBehaviorEnabled","sixDofDragBehaviorEnabled","surfaceMagnetismBehaviorEnabled","_followBehavior","_sixDofDragBehavior","_surfaceMagnetismBehavior","followBehavior","sixDofDragBehavior","surfaceMagnetismBehavior","ownerMesh","draggablesMeshes","sceneUnderstandingMeshes","attachedNode","_addObservables","draggableMeshes","faceCameraOnDragStart","enabled","_removeObservables","_onBeforeRenderObserver","_enabled","isMoving","_onDragObserver","onDragObservable","disableMovement","findAndUpdateTarget","pickInfo","HandleMaterial","hover","_hover","_updateInterpolationTarget","drag","_drag","_color","_scale","_lastTick","animationLength","hoverScale","baseScale","dragScale","_positionOffset","Date","now","_onBeforeRender","tick","scaleDiff","_targetScale","colorDiff","_targetColor","scaleToRef","addToRef","setColor3","HandleState","GizmoHandle","state","_state","gizmo","_gizmo","HOVER","_updateMaterial","DRAG","IDLE","_materials","createNode","handle","positionOffset","setDragBehavior","dragStartFn","dragFn","dragEndFn","dragBehavior","_dragBehavior","_dragStartObserver","onDragStartObservable","_draggingObserver","_dragEndObserver","onDragEndObservable","SideHandle","verticalBox","sideNode","isNearGrabbable","CornerHandle","horizontalBox","angleNode","SlateGizmo","attachedSlate","attachedMesh","updateBoundingBox","onPickingObservable","pickedMesh","_handleHovered","_attachedSlate","_boundingDimensions","_renderObserver","_tmpQuaternion","_tmpVector","_corners","_sides","_boundingBoxGizmo","_margin","_handleSize","_existingSlateScale","fixedScreenSize","fixedScreenSizeDistanceFactor","updateScale","gizmoLayer","originalScene","_handlesParent","rotationQuaternion","masksCorners","origin","corner","_assignDragBehaviorCorners","originStart","dimensionsStart","offset","masks","_moveHandle","side","_assignDragBehaviorSides","_rootMesh","_keepAspectRatio","vector","aspectRatio","invertDiagonal","axis","dot","_clampDimensions","mask","keepAspectRatio","impact","multiplyInPlace","clampedDimensions","minDimensions","ratio","isCorner","offsetOriginMasked","offsetDimensionsMasked","addInPlace","moveFn","dragOrigin","toObjectFrame","dragPlaneNormal","projectToRef","normal","dragStart","_followButton","_handleDragged","dragging","_positionElements","dragEnd","_updatePivot","quaternionOrigin","directionOrigin","worldPivot","worldPlaneNormal","getAbsolutePivotPoint","angle","_attachedNodeChanged","originalParent","_update","boundingMinMax","_updateHandlesPosition","_updateHandlesScaling","handleScaling","center","scaledWidth","scaledHeight","setAll","absolutePosition","distanceFromCamera","HolographicSlate","defaultBehavior","_defaultBehavior","_dimensions","newRatio","minRatio","titleBarHeight","_titleBarHeight","_titleBar","_titleBarTitle","_contentPlate","title","_titleText","_titleTextComponent","titleBarMargin","defaultDimensions","_closeButton","_contentViewport","_contentDragBehavior","_contentMaterial","albedoTexture","_resetContentPositionAndZoom","_applyContentViewport","attachToMesh","_addControl","followButton","closeButton","titleBar","titleBarTitle","contentPlate","backPlate","contentPlateHeight","rightHandScene","host","scaleTo","_DEFAULT_TEXT_RESOLUTION_Y","tex","setPivotPoint","origin2","adt","textWrapping","textHorizontalAlignment","paddingLeft","frontUVs","_attachContentPlateBehavior","ASSETS_BASE_URL","FOLLOW_ICON_FILENAME","CLOSE_ICON_FILENAME","recenter","moveAttached","useObjectOrientationForDragging","updateDragPlane","worldDimensions","upWorld","rightWorld","projectedOffset","startViewport","worldMatrix","dragPlanePoint","_titleBarMaterial","_positionChangedObserver","onPositionChangedObservable","resetDefaultAspectAndPose","resetAspect","backward","pivot","NearMenu","isPinned","_isPinned","_pinButton","_createPinButton","_ASSETS_BASE_URL","_PIN_ICON_FILENAME","ignoreCameraPitchAndRoll","pitchOffset","minimumDistance","defaultDistance","maximumDistance","_dragObserver","MRDLSliderBarMaterialDefines","SKY_ENABLED","IRIDESCENCE_ENABLED","MRDLSliderBarMaterial","bevelFront","bevelFrontStretch","bevelBack","bevelBackStretch","radiusTopLeft","radiusTopRight","radiusBottomLeft","radiusBottomRight","bulgeEnabled","bulgeHeight","bulgeRadius","sunIntensity","sunTheta","sunPhi","indirectDiffuse","albedo","specular","shininess","sharpness","subsurface","leftGradientColor","rightGradientColor","reflection","frontReflect","edgeReflect","power","skyColor","horizonColor","groundColor","horizonPower","fuzz","minFuzz","clipFade","hueShift","saturationShift","valueShift","blobPosition","blobPosition2","blobTexture","leftIndexPosition","rightIndexPosition","leftIndexMiddlePosition","rightIndexMiddlePosition","decalScaleXY","decalFrontOnly","rimIntensity","rimHueShift","rimSaturationShift","rimValueShift","useGlobalLeftIndex","useGlobalRightIndex","globalLeftIndexTipProximity","globalRightIndexTipProximity","globaRightIndexTipPosition","globalLeftThumbTipPosition","globalRightThumbTipPosition","globalLeftIndexMiddlePosition","globalRightIndexMiddlePosition","_blueGradientTexture","BLUE_GRADIENT_TEXTURE_URL","_decalTexture","_reflectionMapTexture","_indirectEnvTexture","setVector2","MRDLSliderThumbMaterialDefines","MRDLSliderThumbMaterial","MRDLBackplateMaterialDefines","IRIDESCENCE_ENABLE","MRDLBackplateMaterial","iridescenceTint","gradientColor","topLeftGradientColor","topRightGradientColor","bottomLeftGradientColor","bottomRightGradientColor","edgePower","edgeLineGradientBlend","_iridescentMapTexture","IRIDESCENT_MAP_TEXTURE_URL","SLIDER_MIN","SLIDER_MAX","SLIDER_VAL","SLIDER_STEP","SLIDER_SCALING","SLIDER_MARGIN","Slider3D","sliderBackplateVisible","onValueChangedObservable","_sliderBackplateVisible","_minimum","_maximum","_step","_value","_sliderThumb","step","_convertToPosition","_sliderBar","sliderBarMaterial","_sliderBarMaterial","sliderThumbMaterial","_sliderThumbMaterial","sliderBackplateMaterial","_sliderBackplateMaterial","sliderBackplate","sliderBackplateModel","sliderBarModel","sliderThumbModel","_sliderBackplate","_createBehavior","pointerDragBehavior","dragAxis","_draggedPosition","dragDistance","_convertToValue","round","_d","_e","_f","MRDLBackglowMaterialDefines","MRDLBackglowMaterial","bevelRadius","tuningMotion","motion","maxIntensity","intensityFadeInExponent","outerFuzzStart","outerFuzzEnd","innerColor","blendExponent","falloff","bias","MRDLFrontplateMaterialDefines","MRDLFrontplateMaterial","relativeToHeight","blobEnable","blobInnerFade","blobPulseMaxSize","blobEnable2","blobInnerFade2","gazeIntensity","gazeFocus","MRDLInnerquadMaterialDefines","MRDLInnerquadMaterial","fixedRadius","glowFraction","glowMax","glowFalloff","_backGlow","_innerQuad","_frontPlateCollisionMesh","cornerRadius","subtext","_subtext","backGlowMaterial","_backGlowMaterial","innerQuadMaterial","_innerQuadMaterial","textSizeInPixels","imageSizeInPixels","plateMaterialColor","frontPlateDepth","backPlateDepth","backGlowOffset","flatPlaneDepth","innerQuadRadius","innerQuadColor","innerQuadToggledColor","innerQuadHoverColor","innerQuadToggledHoverColor","_performEnterExitAnimation","_pointerClickObserver","_performClickAnimation","_pointerEnterObserver","_pointerOutObserver","_toggleObserver","_getAspectRatio","_alignContentVertically","_alignContentHorizontally","heightInPixels","widthInPixels","totalPanelWidthInPixels","contentContainer","setPaddingInPixels","imageContainer","textContainer","addColumnDefinition","addRowDefinition","fontWeight","backPlateMesh","_createBackPlate","_createFrontPlate","innerQuadMesh","_createInnerQuad","backGlowMesh","_createBackGlow","MRTK_ASSET_BASE_URL","BACKPLATE_MODEL_FILENAME","backPlateModel","FRONTPLATE_MODEL_FILENAME","collisionPlate","_collisionPlate","frontPlateModel","INNERQUAD_MODEL_FILENAME","innerQuadModel","BACKGLOW_MODEL_FILENAME","backGlowModel","animationGroup","property","values","anim","animkeyFrames","inTangent","outTangent","interpolation","addTargetedAnimation","speedRatio","play","_createBackGlowMaterial","glowRadius","_createInnerQuadMaterial","GUI3DManager","_utilityLayer","controlScaling","_customControlScaling","newScale","scaleRatio","_rootContainer","useRealisticScaling","MRTK_REALISTIC_SCALING","newValue","_sharedMaterials","_sceneDisposeObserver","onDisposeObservable","onlyCheckPointerDownEvents","pickUtilitySceneFirst","mainSceneTrackerPredicate","_handlePointerOut","_pointerObserver","pi","_doPicking","autoClearDepthAndStencil","isPointerUp","shouldRender","pointerEvent","pickingInfo","hit","originMesh","pointerType","hostInformation","isMobile","materialName","hasOwnProperty","call","GuiOverlay","_uiTexture","uiTexture","createStyle","defaultFovScaling","HotspotFlat2DOverlay","imageRatio","_imageRatio","Hotspot360Overlay","sphereRadius","_hotspotsSphereRadius","sphericalCoordinates","phi","theta","LazyTextureMaterial","textureUrl","_subMesh","getMesh","_loaded","isInFrustum","_textureUrl","unregisterBeforeRender","_checkVisibility","fogEnabled","registerBeforeRender","TextureMaterial","VideoTextureMaterial","videoTexture","VideoTexture","autoPlay","autoUpdateTexture","loop","vAng","video","doNotRecurse","disposeMaterialAndTextures","pause","firstChild","removeChild","lastChild","removeAttribute","load","cubestrip","CreateTiledGround","precision","subdivisions","submeshes","verticesCount","getTotalVertices","subdivisionsX","subdivisionsY","tileIndicesLength","getIndices","cubeSides","tileVerticesLength","base","baseVertice","materialIndex","cubeSideIndex","row","col","submesh","SubMesh","subMeshes","xmin","ymin","xmax","ymax","uvs","tileSize","applyTile","xTileMin","yTileMin","xTileMax","yTileMax","transformationMatrix","rowLength","square","cubeSide","tileRow","tileCol","w","h","RotationMatrix","sphere","diameter","widthSegments","heightSegments","updatable","createVertexDataSphere","floor","phiStart","phiLength","thetaStart","thetaLength","indexGrid","iy","verticesRow","v","ix","u","vertex","sin","cos","Matrix","Label","_rotationLeft","_rotationFront","_rotationRight","_rotationBack","_rotationUp","_rotationDown","BaseRenderer","metadata","isRenderer","_clearScene","Fov","MaxFov","MinFov","onLoad","textures","materials","_camera","Cube360Renderer","_cullingLevel","startOrientation","_levelCubeMeshes","level","MaxLevel","loadedTextures","panoramaLevel","Levels","faceSize","ImageWidth","TileSize","CreateCubeStrip","multimat","MultiMaterial","subMeshIndex","Url","replace","subMaterials","all","t","every","isLoaded","maxLevel","percent","currentLayerDepth","trunc","Sphere360Renderer","createSphere","setAbsolutePosition","includes","videoMaterial","onPointerDown","evt","_isCameraMoving","onPointerMove","onPointerUp","async","paused","Flat2DRenderer","startPosition","_plane","fitWidth","_internalFit","fitHeight","containerRatio","getRenderWidth","getRenderHeight","fit","atan","ContextMenu","StackPanel","guiRenderer","_guiRenderer","verticalAlignment","Control","horizontalAlignment","items","menuItem","_createButton","_computeMaxWidth","removeMenuItems","showAt","positionX","positionY","_openAt","Vector2","leftInPixels","_computeLeftInPixels","topInPixels","_computeTopInPixels","_setIsOpen","close","buttonType","Button","tickness","foreground","toHexString","textBlock","TextWrapping","paddingRight","desiredLeft","widthScreen","isWidthOverBoudingScreen","desiredTop","heightScreen","isHeightOverBoundingScreen","openAt","isOpen","_isOpen","onCameraChangeCallback","viewerWidth","_engine","resize","Observable","o","_setFov","_refreshHotspots","_canvasElement","Engine","_mainScene","clearColor","Color4","_uiScene","displayLoadingUI","_onCameraChangeCallback","_contextMenu","window","addEventListener","resizeHandler","_lookToEventAction","_setFovAction","_refreshHotspotsAction","removeEventListener","addNewScene","Tools","scenes","isPanoramaConfiguration","_internalRenderer","RenderType","_hotspotRenderer","isFlatConfiguration","loadHotspotsAsync","onViewMatrixChangedObservable","onProjectionMatrixChangedObservable","startRendering","hideLoadingUI","stopRendering","stopRenderLoop","runRenderLoop","isDisposed","resizeView","setSize","FPS","getFps","contextMenu","clientWidth","innerWidth","_isMobile","onMobileObservable","hex","_parseHexToRgba","startsWith","rgba","ParseColorToRgba","_rgbToHex","_parseColorNameToHex","slice","split","parseInt","parseFloat","brightness","rHex","gHex","bHex","aHex","toUpperCase","shorthandRegex","exec","groups","colorName","hexColor","colors","toLowerCase","numLayoutCalls","_numLayoutCalls","numRenderCalls","_numRenderCalls","_renderScale","_onResize","_background","markAsDirty","idealWidth","_idealWidth","_markAllAsDirty","idealHeight","_idealHeight","useSmallestIdeal","_useSmallestIdeal","renderAtIdealSize","_renderAtIdealSize","idealRatio","rwidth","rheight","getSize","innerHeight","layer","_layerToDispose","getChildren","getDescendants","directDescendantsOnly","predicate","getControlsByType","getControlByName","_getControlByKey","find","focusedControl","_focusedControl","onBlur","onFocus","isForeground","isBackground","clipboardData","_clipboardData","generateMipMaps","invertY","onGuiReadyObservable","_isDirty","_capturingControl","_linkedControls","_isFullscreen","_fullscreenViewport","_blockNextFocusCheck","_cursorChanged","_defaultMousePointerId","_rootChildrenHaveChanged","_capturedPointerIds","Set","onClipboardObservable","onControlPickedObservable","onBeginLayoutObservable","onEndLayoutObservable","onBeginRenderObservable","onEndRenderObservable","applyYInversionOnUpdate","skipBlockEvents","checkPointerEveryFrame","_useInvalidateRectOptimization","_invalidatedRectangle","_clearMeasure","_onClipboardCopy","rawEvt","ev","_onClipboardCut","_onClipboardPaste","parseContent","parseSerializedObject","_texture","_rootElement","onBeforeCameraRenderObservable","_checkUpdate","_controlAddedObserver","onControlAddedObservable","_controlRemovedObserver","onControlRemovedObservable","_preKeyboardObserver","onPreKeyboardObservable","info","processKeyboard","skipOnPointerObservable","_link","_resizeObserver","onResizeObservable","func","container","useInvalidateRectOptimization","invalidateRect","invalidMinX","invalidMinY","invalidMaxX","invalidMaxY","left","top","moveToNonOverlappedPosition","overlapGroup","deltaStep","repelFactor","controlsForGroup","isArray","descendants","filter","control1","velocity","centerX","centerY","control2","_Overlaps","diffLength","overlapDeltaMultiplier","linkOffsetXInPixels","linkOffsetYInPixels","_prePointerObserver","onPrePointerObservable","_sceneRenderObserver","_canvasPointerOutObserver","onCanvasPointerOutObservable","_canvasBlurObserver","onCanvasBlurObservable","textureSize","renderWidth","renderHeight","_getGlobalViewport","globalViewPort","toGlobal","targetX","targetY","getProjectedPosition","getProjectedPositionWithZ","globalViewport","projectedPosition","skipUpdate","layerMask","_linkedMesh","notRenderable","_moveToProjectedPosition","_render","AllowGPUOptimizations","skipRender","strokeStyle","hasObservers","_checkGuiIsReady","_layout","clearRect","save","fillStyle","fillRect","restore","_changeCursor","cursor","_registerLastControlDown","deltaX","cameraToUseForPointers","viewport","isPointerBlocker","_shouldBlockPointer","_processPicking","doNotHandleCursors","_manageFocus","_cleanControlAfterRemovalFromList","lastControlOver","_cleanControlAfterRemoval","_translateToPicking","tempViewport","pointerX","pointerY","originalCameraToUseForPointers","rigCameras","rigViewport","rigCamera","toGlobalToRef","transformedX","getHardwareScalingLevel","transformedY","isPointerCaptured","has","_attachPickingToSceneRender","_attachToOnPointerOut","_attachToOnBlur","registerClipboardEvents","self","unRegisterClipboardEvents","_transformUvs","uv","textureMatrix","isIdentityAs3x2","homogeneousTextureMatrix","getRowToRef","r0","r1","r2","setRowFromFloats","fX","fY","supportPointerMove","getTextureCoordinates","_forcePointerUp","friendlyControls","keepsFocusWith","canMoveFocus","otherHost","isAscendant","enablePointerMoveEvents","moveFocusToControl","isFocusInvisible","pickFunction","forcePicking","_onCanvasBlur","serializeContent","root","serializedObject","scaleToSize","newName","noMipmap","snippetId","appendToAdt","CreateFullscreenUI","serialized","_LoadURLContentAsync","SnippetUrl","parseFromSnippetAsync","ParseFromSnippetAsync","parseFromURLAsync","ParseFromFileAsync","snippet","request","readyState","status","gui","payload","JSON","parse","responseText","jsonPayload","encodedGui","TextDecoder","decode","open","send","onlyAlphaTesting","materialSetupCallback","_CreateMaterial","uniqueId","internalClassType","sampling","adaptiveScaling","resultScene","guiIsReady","Container","renderToIntermediateTexture","_renderToIntermediateTexture","_markAsDirty","_adaptHeightToChildren","_adaptWidthToChildren","backgroundGradient","_backgroundGradient","isReadOnly","_isReadOnly","_measureForChildren","_intermediateTexture","logLayoutCycleErrors","maxLayoutCycle","_inverseTransformMatrix","_inverseMeasure","_flagDescendantsAsMatrixDirty","_isClipped","_markMatrixAsDirty","getChildByName","getChildByType","_reOrderControl","wasAdded","zIndex","_offsetLeft","_offsetTop","_getBackgroundColor","getCanvasGradient","_localDraw","shadowBlur","shadowOffsetX","shadowOffsetY","shadowColor","_currentMeasure","_beforeLayout","_processMeasures","parentMeasure","_cachedParentMeasure","isEqualsTo","_evaluateClippingState","transformToRef","_transformMatrix","_prevCurrentMeasureTransformedIntoGlobalSpace","rebuildCount","_applyStates","computedWidth","computedHeight","_rebuildLayout","_tempParentMeasure","_width","isPixel","_paddingLeftInPixels","_paddingRightInPixels","_height","_paddingTopInPixels","_paddingBottomInPixels","ignoreAdaptiveScaling","_postMeasure","_draw","invalidatedRectangle","renderToIntermediateTextureThisDraw","contextToDrawTo","translate","invertToRef","clipChildren","_clipForChildren","_intersectsRect","globalAlpha","canvas","getDescendantsToRef","results","item","_isEnabled","contains","hoverCursor","isHitTestVisible","_additionalProcessing","_getAdaptDimTo","isDimensionFullyDefined","childSerializationObject","_parseFromContent","childData","transformedMeasure","_evaluatedMeasure","_clipChildren","clipContent","_clipContent","_shadowOffsetX","_shadowOffsetY","_shadowBlur","_previousShadowBlur","_shadowColor","accessibilityTag","_accessibilityTag","onAccessibilityTagChangedObservable","fontOffset","_fontOffset","_alpha","_alphaSet","highlightLineWidth","_highlightLineWidth","isHighlighted","_isHighlighted","_highlightColor","_scaleX","_scaleY","_rotation","transformCenterY","_transformCenterY","transformCenterX","_transformCenterX","_horizontalAlignment","_verticalAlignment","fixedRatio","_fixedRatio","fixedRatioMasterIsWidth","_fixedRatioMasterIsWidth","fromString","getValueInPixel","isNaN","_fontFamily","_resetFontCache","fontStyle","_fontStyle","_fontWeight","_style","onChangedObservable","_styleObserver","_isFontSizeInPercentage","_fontSize","isPercentage","fontSizeToUse","getValue","gradient","_gradient","_zIndex","_doNotRender","onIsVisibleChangedObservable","descendantsOnlyPadding","_descendantsOnlyPadding","_paddingLeft","_paddingRight","_paddingTop","_paddingBottom","_left","_top","_linkOffsetX","_linkOffsetY","isEnabled","recursivelyFirePointerOut","pointer","onEnabledStateChangedObservable","disabledColor","_disabledColor","disabledColorItem","_disabledColorItem","_tempPaddingMeasure","HORIZONTAL_ALIGNMENT_CENTER","VERTICAL_ALIGNMENT_CENTER","_wasDirty","_invertTransformMatrix","_transformedPosition","_isMatrixDirty","_fontSet","_dummyVector2","_evaluatedParentMeasure","_customData","_automaticSize","useBitmapCache","onWheelObservable","onDirtyObservable","onBeforeDrawObservable","onAfterDrawObservable","_tmpMeasureA","getAscendantOfClass","force","markAllAsDirty","getLocalCoordinates","globalCoordinates","getLocalCoordinatesToRef","getParentLocalCoordinates","moveToVector3","HORIZONTAL_ALIGNMENT_LEFT","VERTICAL_ALIGNMENT_TOP","setPadding","right","bottom","oldLeft","oldTop","newLeft","newTop","leftAndTopIgnoreAdaptiveScaling","rect","_transform","_computeAdditionalOffsetX","_computeAdditionalOffsetY","leftShadowOffset","rightShadowOffset","topShadowOffset","bottomShadowOffset","_font","_prepareFont","getUniqueId","rotate","_cachedOffsetX","_cachedOffsetY","_renderHighlight","_renderHighlightSpecific","strokeRect","_getColor","AllowAlphaInheritance","addAndTransformToRef","_preMeasure","_measure","_computeAlignment","parentWidth","parentHeight","HORIZONTAL_ALIGNMENT_RIGHT","VERTICAL_ALIGNMENT_BOTTOM","_clip","beginPath","_ClipMeasure","intersection","clip","_cacheData","putImageData","getImageData","transformCoordinates","canNotify","canNotifyClick","delete","_onWheelScroll","_getStyleProperty","propName","defaultValue","prop","_GetFontOffset","getDimension","serialization","controlType","cloned","animationIndex","parsedAnimation","internalClass","Parse","autoAnimate","autoAnimateFrom","autoAnimateTo","autoAnimateLoop","autoAnimateSpeed","_HORIZONTAL_ALIGNMENT_LEFT","_HORIZONTAL_ALIGNMENT_RIGHT","_HORIZONTAL_ALIGNMENT_CENTER","_VERTICAL_ALIGNMENT_TOP","_VERTICAL_ALIGNMENT_BOTTOM","_VERTICAL_ALIGNMENT_CENTER","_FontHeightSizes","getFontOffset","arc","closePath","AddHeader","Grid","_cells","columnCount","_columnDefinitions","rowCount","_rowDefinitions","_childControls","cells","getRowDefinition","getColumnDefinition","_rowDefinitionObservers","_columnDefinitionObservers","setRowDefinition","current","setColumnDefinition","getChildrenAt","column","cell","getChildCellInfo","_tag","_removeCell","childIndex","_offsetCell","previousKey","removeColumnDefinition","removeRowDefinition","goodContainer","_getGridDefinitions","definitionCallback","widths","heights","lefts","tops","availableWidth","globalWidthPercentage","availableHeight","globalHeightPercentage","rowDefinition","columnDefinition","moveTo","lineTo","tags","cd","unit","rd","columnValue","rowValue","cellInfo","rowNumber","substring","search","columnNumber","Image","detectPointerOnOpaqueOnly","_detectPointerOnOpaqueOnly","sliceLeft","_sliceLeft","sliceRight","_sliceRight","sliceTop","_sliceTop","sliceBottom","_sliceBottom","sourceLeft","_sourceLeft","sourceTop","_sourceTop","sourceWidth","_sourceWidth","sourceHeight","_sourceHeight","imageWidth","_imageWidth","imageHeight","_imageHeight","populateNinePatchSlicesFromImage","_populateNinePatchSlicesFromImage","_extractNinePatchSliceDataFromImage","isSVG","_isSVG","svgAttributesComputationCompleted","_svgAttributesComputationCompleted","autoScale","_autoScale","synchronizeSizeWithContent","stretch","_stretch","_rotate90","preserveProperties","_domImage","createCanvas","dataUrl","toDataURL","rotatedImage","_cellId","_handleRotationForSVGImage","_imageDataCache","srcImage","dstImage","_rotate90SourceProperties","onSVGAttributesComputedObservable","srcLeft","srcTop","srcWidth","domImage","srcHeight","dstLeft","dstTop","dstWidth","dstHeight","mult","_workingCanvas","imageData","_onImageLoaded","onload","onImageLoadedObservable","_source","SourceImgCache","_removeCacheUsage","get","timesUsed","_svgCheck","cachedData","img","loaded","waitingForLoadCallback","bind","createCanvasImage","waitingCallback","referrerPolicy","SVGSVGElement","lastIndexOf","svgsrc","elemid","svgExist","body","querySelector","svgDoc","contentDocument","vb","getAttribute","docwidth","docheight","elem","getElementById","_getSVGAttribs","svgImage","appendChild","svgobj","vb_width","vb_height","elem_bbox","getBBox","elem_matrix_a","elem_matrix_d","elem_matrix_e","elem_matrix_f","mainMatrix","transform","consolidate","f","cellWidth","cellHeight","cellId","STRETCH_FILL","pickedPixel","STRETCH_NONE","STRETCH_UNIFORM","STRETCH_NINE_PATCH","STRETCH_EXTEND","_prepareWorkingCanvasForOpaqueDetection","_drawImage","sx","sy","sw","sh","tx","ty","tw","th","getTransform","workingCanvasContext","ttx","tty","setTransform","naturalWidth","hRatio","vRatio","_renderNinePatch","leftWidth","topHeight","bottomHeight","rightWidth","centerWidth","centerHeight","targetCenterWidth","targetCenterHeight","centerLeftOffset","centerTopOffset","rightOffset","bottomOffset","Map","_thickness","_cornerRadius","cornerRadiusX","cornerRadiusY","cornerRadiusZ","cornerRadiusW","_cachedRadius","additionalWidth","additionalHeight","_getRectangleFill","_drawRoundedRect","_isVertical","spacing","_spacing","_doNotTrackManualChanges","_manualWidth","_manualHeight","ignoreLayoutWarnings","stackWidth","stackHeight","childrenCount","panelWidthChanged","panelHeightChanged","previousHeight","previousWidth","_getManualDim","manualWidth","manualHeight","lines","_lines","_resizeToFit","_textWrapping","onTextChangedObservable","_textHorizontalAlignment","textVerticalAlignment","_textVerticalAlignment","lineSpacing","_lineSpacing","outlineWidth","_outlineWidth","underline","_underline","lineThrough","_lineThrough","applyOutlineToUnderline","_applyOutlineToUnderline","outlineColor","_outlineColor","wordDivider","_wordDivider","forceResizeWidth","_forceResizeWidth","Clip","onLinesReadyObservable","_linesTemp","_breakLines","maxLineWidth","line","newWidth","updateInPlace","newHeight","internalValue","_drawText","textWidth","strokeText","fillText","_drawLine","xFrom","yFrom","xTo","yTo","currentStroke","_renderLines","lineJoin","miterLimit","refWidth","refHeight","Ellipsis","_line","_parseLineEllipsis","WordWrap","_parseLineWordWrap","WordWrapEllipsis","_parseLineWordWrapEllipsis","_parseLine","_getTextMetricsWidth","_getCharsToRemove","lineLength","charWidth","removeChars","characters","from","textMetrics","actualBoundingBoxLeft","actualBoundingBoxRight","words","wordSplittingFunction","testLine","testWidth","currentHeight","_computeHeightForLinesOf","lastLine","currentLine","linesToRemove","pop","rootY","ascent","descent","lineCount","computeExpectedHeight","_image","_textBlock","delegatePickingToChildren","alphaStore","textBlockName","imageName","iconImage","checkSizeRatio","_checkSizeRatio","isChecked","_isChecked","onIsCheckedChangedObservable","actualWidth","actualHeight","offsetWidth","offsetHeight","onValueChanged","checkbox","header","TextWrapper","_characters","txt","removePart","idxStart","idxEnd","insertTxt","newCharacters","charAt","idx","substr","temp","to","isWord","rWord","InputText","maxWidthInPixels","highligherOpacity","_highligherOpacity","onFocusSelectAll","_onFocusSelectAll","textHighlightColor","_textHighlightColor","marginInPixels","autoStretchWidth","_autoStretchWidth","focusedBackground","_focusedBackground","focusedColor","_focusedColor","placeholderColor","_placeholderColor","placeholderText","_placeholderText","deadKey","_deadKey","flag","highlightedText","_highlightedText","addKey","_addKey","currentKey","_currentKey","_textWrapper","_textHasChanged","_isFocused","_blinkIsEven","_cursorOffset","_isTextHighlightOn","_startHighlightIndex","_endHighlightIndex","_cursorIndex","_isPointerDown","promptMessage","disableMobilePrompt","onBeforeKeyAddObservable","onFocusObservable","onBlurObservable","onTextHighlightObservable","onTextCopyObservable","onTextCutObservable","onTextPasteObservable","onKeyboardEventProcessedObservable","_scrollLeft","_blinkTimeout","_onClipboardObserver","_onPointerDblTapObserver","_focusedBy","prompt","clipboardInfo","_onCopyText","_onCutText","_onPasteText","pointerInfo","_processDblClick","_selectAllText","focus","blur","_connectedVirtualKeyboard","processKey","keyCode","ctrlKey","metaKey","isTextHighlightOn","deletePosition","shiftKey","insertPosition","_updateValueFromCursorIndex","moveLeft","moveRight","_clickedCoordinate","setData","types","getData","clipTextLeft","_beforeRenderText","_textWidth","marginWidth","textLeft","rightPosition","absoluteCursorPosition","currentSize","previousDist","cursorOffsetText","cursorOffsetWidth","cursorLeft","highlightCursorOffsetWidth","highlightCursorLeft","textWrapper","ColorPicker","toHSVToRef","_tmpColor","_s","_v","_Epsilon","_pointerStartedOnSquare","_pointerStartedOnWheel","_squareLeft","_squareTop","_squareSize","_lastPointerDownId","_pointerIsDown","_updateSquareProps","wheelThickness","innerDiameter","squareSize","sqrt","_drawGradientSquare","hueValue","lgh","createLinearGradient","addColorStop","lgv","_drawCircle","_createColorWheelCanvas","maxDistSq","innerRadius","minDistSq","distSq","dist","ang","atan2","alphaRatio","alphaAmount","maxAlpha","minAlpha","lowerRadius","upperRadius","_colorWheelCanvas","_updateValueFromPointer","_isPointOnSquare","_isPointOnWheel","radiusSq","innerRadiusSq","dx","dy","pickerWidth","pickerHeight","headerHeight","lastColor","swatchLimit","numSwatchesPerLine","drawerMaxRows","rawSwatchSize","gutterSize","colGutters","swatchSize","drawerMaxSize","containerSize","buttonColor","buttonBackgroundColor","buttonBackgroundHoverColor","buttonBackgroundClickColor","buttonDisabledColor","buttonDisabledBackgroundColor","currentSwatchesOutlineColor","luminanceLimitColor","luminanceLimit","iconColorDark","iconColorLight","buttonFontSize","butEdit","inputFieldLabels","inputTextBackgroundColor","inputTextColor","swatchNumber","swatchDrawer","butSave","lastVal","activeField","editSwatchMode","dialogContainer","savedColors","topRow","initialRows","gutterCount","pickerPanel","panelHead","pickerPanelRows","CreateSimpleButton","headerColor3","closeIconColor","closePicker","currentSwatch","dialogBody","dialogBodyCols","pickerGrid","picker","editSwatches","updateValues","pickerBodyRight","pickerBodyRightRows","pickerSwatchesButtons","pickerButtonsCol","pickerSwatches","pickeSwatchesRows","activeSwatches","labelWidth","labelHeight","labelTextSize","newText","newSwatch","revertColor","swatchOutline","currentText","buttonGrid","buttonGridRows","buttonWidth","buttonHeight","butOK","butCancel","disableButton","setEditButtonVisibility","updateSwatches","pickerColorValues","currentColor","rgbValuesQuadrant","labelText","rValInt","updateInt","gValInt","bValInt","rValDec","updateFloat","gValDec","bValDec","hexValueQuadrant","hexVal","minusPound","inputField","pickedColor","field","channel","checkVal","test","newSwatchRGB","deleteSwatch","createSwatch","swatch","swatchColor","swatchLuminence","mode","thisButton","currentRows","thisRow","totalButtonsThisRow","buttonIterations","enableButton","disabled","val","newHexValue","checkHex","leadingZero","Ellipse","FocusableButton","_unfocusedColor","displose","InputTextArea","autoStretchHeight","_autoStretchHeight","maxHeightInPixels","_prevText","_updateCursorPosition","_highlightCursorInfo","initialStartIndex","initialRelativeStartIndex","initialLineIndex","_cursorInfo","globalStartIndex","globalEndIndex","relativeEndIndex","relativeStartIndex","currentLineIndex","alternativeProcessKey","code","rightDelta","upperLine","tmpIndex","relativeIndex","currentWidth","_contextForBreakLines","upperWidth","lineEnding","upperLineRelativeIndex","underLine","underWidth","underLineRelativeIndex","metrics","flushedLine","char","tmpLines","longerString","reduce","acc","valueLength","accLength","longerStringWidth","_availableWidth","textHeight","totalHeight","_availableHeight","tmpLength","_computeScroll","_clipTextLeft","_clipTextTop","selectedHeight","textTop","_scrollTop","deltaIndex","cursorTop","_resetBlinking","startLineIndex","endLineIndex","highlightRootY","highlightRootX","begin","leftOffsetWidth","selectedText","hightlightWidth","_clickedCoordinateX","_clickedCoordinateY","movementX","movementY","globalIndex","lastClickedCoordinateY","relativeCoordinateY","relativeXPosition","_evt","InputPassword","pwdTextWrapper","Line","dash","_dash","connectedControl","_connectedControl","_connectedControlDirtyObserver","_x1","_y1","x2","_x2","y2","_y2","_lineWidth","_effectiveX2","_effectiveY2","setLineDash","MultiLinePoint","multiLine","_multiLine","_x","_y","_point","_controlObserver","onPointUpdate","_mesh","_meshObserver","onAfterCameraRenderObservable","resetLinks","_translatePoint","xValue","_canvas","yValue","MultiLine","_points","getAt","reset","previousPoint","first","_minX","_minY","_maxX","_maxY","group","childRadio","offseHeight","radio","BaseSlider","displayThumb","_displayThumb","barOffset","_barOffset","barOffsetInPixels","thumbWidth","_thumbWidth","thumbWidthInPixels","isThumbClamped","_isThumbClamped","_effectiveBarOffset","_getThumbPosition","_backgroundBoxLength","_getThumbThickness","thumbThickness","_backgroundBoxThickness","_prepareRenderingData","_renderLeft","_renderTop","_renderWidth","_renderHeight","_effectiveThumbThickness","displayValueBar","_displayValueBar","borderColor","_borderColor","thumbColor","_thumbColor","isThumbCircle","_isThumbCircle","thumbPosition","_ScrollViewerWindow","freezeControls","_freezeControls","_restoreMeasures","_updateMeasures","_useBuckets","_makeBuckets","bucketWidth","_bucketWidth","bucketHeight","_bucketHeight","setBucketSizes","_buckets","_bucketLen","_dispatchInBuckets","_oldLeft","_oldTop","bStartX","_origLeft","origLeft","bEndX","bEndY","_origTop","origTop","bStartY","bucket","lstc","origLeftForChildren","origTopForChildren","_updateChildrenMeasures","_parentMeasure","_scrollChildren","_scrollChildrenWithBuckets","scrollLeft","scrollTop","parentClientWidth","parentClientHeight","ScrollBar","invertScrollDirection","_invertScrollDirection","_tempMeasure","_first","_originX","_originY","ImageScrollBar","backgroundImage","_backgroundBaseImage","num90RotationInVerticalMode","_backgroundImage","rotatedValue","thumbImage","_thumbBaseImage","_thumbImage","thumbLength","_thumbLength","thumbHeight","_thumbHeight","barImageHeight","_barImageHeight","ScrollViewer","horizontalBar","_horizontalBar","verticalBar","_verticalBar","_window","forceHorizontalBar","_forceHorizontalBar","_grid","_barSize","forceVerticalBar","_forceVerticalBar","isImageBased","_pointerIsOver","_wheelPrecision","_horizontalBarImageHeight","_verticalBarImageHeight","_oldWindowContentsWidth","_oldWindowContentsHeight","_useImageBar","_horizontalBarSpace","_verticalBarSpace","_dragSpace","_addBar","barColor","barBackground","resetWindow","_buildClientSizes","_clientWidth","_clientHeight","_updateScroller","_setWindowPosition","scrollBackground","_barColor","_barImage","hb","horizontalThumbImage","_horizontalBarImage","verticalThumbImage","_verticalBarImage","barSize","horizontalBarImageHeight","verticalBarImageHeight","_barBackground","barImage","_barBackgroundImage","horizontalBarImage","_horizontalBarBackgroundImage","verticalBarImage","_verticalBarBackgroundImage","windowContentsWidth","windowContentsHeight","_endLeft","_endTop","_attachWheel","barControl","barContainer","_onWheelObserver","ToggleButton","_group","isActive","_isActive","toActiveAnimation","toInactiveAnimation","onIsActiveChangedObservable","childToggle","pointerEnterActiveAnimation","pointerOutActiveAnimation","pointerDownActiveAnimation","pointerUpActiveAnimation","pointerEnterInactiveAnimation","pointerOutInactiveAnimation","pointerDownInactiveAnimation","pointerUpInactiveAnimation","VirtualKeyboard","onKeyPressObservable","defaultButtonWidth","defaultButtonHeight","defaultButtonPaddingLeft","defaultButtonPaddingRight","defaultButtonPaddingTop","defaultButtonPaddingBottom","defaultButtonColor","defaultButtonBackground","shiftButtonColor","selectedShiftThickness","shiftState","_currentlyConnectedInputText","_connectedInputTexts","_onKeyPressObserver","_createKey","propertySet","addKeysRow","propertySets","maxKey","properties","applyShiftState","rowContainer","button_tblock","connectedInputText","connect","input","inputTextAlreadyConnected","some","onFocusObserver","onBlurObserver","disconnect","filtered","_removeConnectedInputObservables","returnValue","stackPanel","DisplayGrid","displayMinorLines","_displayMinorLines","displayMajorLines","_displayMajorLines","minorLineTickness","_minorLineTickness","minorLineColor","_minorLineColor","majorLineTickness","_majorLineTickness","majorLineColor","_majorLineColor","majorLineFrequency","_majorLineFrequency","cellCountX","cellCountY","cellX","cellY","ImageBasedSlider","valueBarImage","_valueBarImage","isHorizontal","controlFirst","BaseGradient","_colorStops","_gradientDirty","_addColorStopsToCanvasGradient","_canvasGradient","_context","_createCanvasGradient","removeColorStop","colorStop","clearColorStops","colorStops","LinearGradient","_x0","_y0","RadialGradient","_r0","_r1","createRadialGradient","Vector2WithInfo","Matrix2D","m00","m01","m10","m11","m20","m21","Float32Array","fromValues","determinant","l0","l1","l2","l3","l4","l5","det","detDiv","det4","det5","other","r3","r4","r5","parentMatrix","TranslationToRef","_TempPreTranslationMatrix","ScalingToRef","_TempScalingMatrix","RotationToRef","_TempRotationMatrix","_TempPostTranslationMatrix","_TempCompose0","_TempCompose1","_TempCompose2","Identity","MathTools","DefaultRoundingPrecision","tmpRect","tmpRect2","tmpV1","tmpV2","Measure","addX","addY","addWidth","addHeight","MAX_VALUE","Style","ValueAndUnit","UNITMODE_PIXEL","negativeValueAllowed","_unit","_originalUnit","UNITMODE_PERCENTAGE","refValue","decimals","percentage","toFixed","pixels","match","_Regex","sourceValue","sourceUnit","_UNITMODE_PERCENTAGE","_UNITMODE_PIXEL"],"sourceRoot":""}