@babylonjs/gui 6.45.1 → 6.46.0
Sign up to get free protection for your applications and to get access to all the features.
- package/2D/controls/control.js +2 -1
- package/2D/controls/control.js.map +1 -1
- package/3D/materials/fluent/fluentMaterial.js +2 -1
- package/3D/materials/fluent/fluentMaterial.js.map +1 -1
- package/3D/materials/fluentBackplate/fluentBackplateMaterial.js +2 -1
- package/3D/materials/fluentBackplate/fluentBackplateMaterial.js.map +1 -1
- package/3D/materials/fluentButton/fluentButtonMaterial.js +2 -1
- package/3D/materials/fluentButton/fluentButtonMaterial.js.map +1 -1
- package/3D/materials/mrdl/mrdlBackglowMaterial.js +2 -1
- package/3D/materials/mrdl/mrdlBackglowMaterial.js.map +1 -1
- package/3D/materials/mrdl/mrdlBackplateMaterial.js +2 -1
- package/3D/materials/mrdl/mrdlBackplateMaterial.js.map +1 -1
- package/3D/materials/mrdl/mrdlFrontplateMaterial.js +2 -1
- package/3D/materials/mrdl/mrdlFrontplateMaterial.js.map +1 -1
- package/3D/materials/mrdl/mrdlInnerquadMaterial.js +2 -1
- package/3D/materials/mrdl/mrdlInnerquadMaterial.js.map +1 -1
- package/3D/materials/mrdl/mrdlSliderBarMaterial.js +2 -1
- package/3D/materials/mrdl/mrdlSliderBarMaterial.js.map +1 -1
- package/3D/materials/mrdl/mrdlSliderThumbMaterial.js +2 -1
- package/3D/materials/mrdl/mrdlSliderThumbMaterial.js.map +1 -1
- package/package.json +2 -2
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"control.js","sourceRoot":"","sources":["../../../../../dev/gui/src/2D/controls/control.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,UAAU,EAAE,2CAA6B;AAClD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,6CAA+B;AAElE,OAAO,EAAE,iBAAiB,EAAE,gDAAkC;AAC9D,OAAO,EAAE,MAAM,EAAE,uCAAyB;AAC1C,OAAO,EAAE,KAAK,EAAE,sCAAwB;AAMxC,OAAO,EAAE,YAAY,EAAE,MA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E;qCAGX;AAgBD;IADC,SAAS,EAAE;4CAGX;AAaD;IADC,SAAS,EAAE;wCAGX;AA8BD;IADC,SAAS,EAAE;qDAGX;AAgBD;IADC,SAAS,EAAE;0CAGX;AAqCD;IADC,SAAS,EAAE;2CAGX;AAqCD;IADC,SAAS,EAAE;yCAGX;AAqCD;IADC,SAAS,EAAE;4CAGX;AAqCD;IADC,SAAS,EAAE;mCAGX;AA4BD;IADC,SAAS,EAAE;kCAGX;AA4BD;IADC,SAAS,EAAE;0CAGX;AA4BD;IADC,SAAS,EAAE;0CAGX;AAmCD;IADC,SAAS,EAAE;wCAGX;AA6BD;IADC,SAAS,EAAE;4CAGX;AAYD;IADC,SAAS,EAAE;gDAGX;AAkBM;IADN,SAAS,EAAE;6CACiB;AAKtB;IADN,SAAS,EAAE;uDAC2B;AA24C3C,aAAa,CAAC,qBAAqB,EAAE,OAAO,CAAC,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\r\n/* eslint-disable @typescript-eslint/no-unused-vars */\r\nimport type { Nullable } from \"core/types\";\r\nimport type { Observer } from \"core/Misc/observable\";\r\nimport { Observable } from \"core/Misc/observable\";\r\nimport { Vector2, Vector3, Matrix } from \"core/Maths/math.vector\";\r\nimport type { PointerInfoBase } from \"core/Events/pointerEvents\";\r\nimport { PointerEventTypes } from \"core/Events/pointerEvents\";\r\nimport { Logger } from \"core/Misc/logger\";\r\nimport { Tools } from \"core/Misc/tools\";\r\nimport type { TransformNode } from \"core/Meshes/transformNode\";\r\nimport type { Scene } from \"core/scene\";\r\n\r\nimport type { Container } from \"./container\";\r\nimport type { AdvancedDynamicTexture } from \"../advancedDynamicTexture\";\r\nimport { ValueAndUnit } from \"../valueAndUnit\";\r\nimport { Measure } from \"../measure\";\r\nimport type { Style } from \"../style\";\r\nimport { Matrix2D, Vector2WithInfo } from \"../math2D\";\r\nimport { GetClass, RegisterClass } from \"core/Misc/typeStore\";\r\nimport { SerializationHelper, serialize } from \"core/Misc/decorators\";\r\nimport type { ICanvasGradient, ICanvasRenderingContext } from \"core/Engines/ICanvas\";\r\nimport { EngineStore } from \"core/Engines/engineStore\";\r\nimport type { IAccessibilityTag } from \"core/IAccessibilityTag\";\r\nimport type { IPointerEvent } from \"core/Events/deviceInputEvents\";\r\nimport type { IAnimatable } from \"core/Animations/animatable.interface\";\r\nimport type { Animation } from \"core/Animations/animation\";\r\nimport type { BaseGradient } from \"./gradient/BaseGradient\";\r\n\r\n/**\r\n * Root class used for all 2D controls\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#controls\r\n */\r\nexport class Control implements IAnimatable {\r\n /**\r\n * Gets or sets a boolean indicating if alpha must be an inherited value (false by default)\r\n */\r\n public static AllowAlphaInheritance = false;\r\n\r\n private _alpha = 1;\r\n private _alphaSet = false;\r\n private _zIndex = 0;\r\n /** @internal */\r\n public _host: AdvancedDynamicTexture;\r\n /** Gets or sets the control parent */\r\n public parent: Nullable<Container>;\r\n /** @internal */\r\n public _currentMeasure = Measure.Empty();\r\n /** @internal */\r\n public _tempPaddingMeasure = Measure.Empty();\r\n private _fontFamily = \"\";\r\n private _fontStyle = \"\";\r\n private _fontWeight = \"\";\r\n private _fontSize = new ValueAndUnit(18, ValueAndUnit.UNITMODE_PIXEL, false);\r\n private _font: string;\r\n /** @internal */\r\n public _width = new ValueAndUnit(1, ValueAndUnit.UNITMODE_PERCENTAGE, false);\r\n /** @internal */\r\n public _height = new ValueAndUnit(1, ValueAndUnit.UNITMODE_PERCENTAGE, false);\r\n /** @internal */\r\n protected _fontOffset: { ascent: number; height: number; descent: number };\r\n private _color = \"\";\r\n private _style: Nullable<Style> = null;\r\n private _styleObserver: Nullable<Observer<Style>>;\r\n /** @internal */\r\n protected _horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_CENTER;\r\n /** @internal */\r\n protected _verticalAlignment = Control.VERTICAL_ALIGNMENT_CENTER;\r\n /** @internal */\r\n protected _isDirty = true;\r\n /** @internal */\r\n protected _wasDirty = false;\r\n /** @internal */\r\n public _tempParentMeasure = Measure.Empty();\r\n /** @internal */\r\n public _prevCurrentMeasureTransformedIntoGlobalSpace = Measure.Empty();\r\n /** @internal */\r\n public _cachedParentMeasure = Measure.Empty();\r\n private _descendantsOnlyPadding = false;\r\n private _paddingLeft = new ValueAndUnit(0);\r\n private _paddingRight = new ValueAndUnit(0);\r\n private _paddingTop = new ValueAndUnit(0);\r\n private _paddingBottom = new ValueAndUnit(0);\r\n /** @internal */\r\n public _left = new ValueAndUnit(0);\r\n /** @internal */\r\n public _top = new ValueAndUnit(0);\r\n private _scaleX = 1.0;\r\n private _scaleY = 1.0;\r\n private _rotation = 0;\r\n private _transformCenterX = 0.5;\r\n private _transformCenterY = 0.5;\r\n /** @internal */\r\n public _transformMatrix = Matrix2D.Identity();\r\n /** @internal */\r\n protected _invertTransformMatrix = Matrix2D.Identity();\r\n /** @internal */\r\n protected _transformedPosition = Vector2.Zero();\r\n private _isMatrixDirty = true;\r\n private _cachedOffsetX: number;\r\n private _cachedOffsetY: number;\r\n private _isVisible = true;\r\n private _isHighlighted = false;\r\n private _highlightColor = \"#4affff\";\r\n protected _highlightLineWidth = 2;\r\n /** @internal */\r\n public _linkedMesh: Nullable<TransformNode>;\r\n private _fontSet = false;\r\n private _dummyVector2 = Vector2.Zero();\r\n private _downCount = 0;\r\n private _enterCount = -1;\r\n private _doNotRender = false;\r\n private _downPointerIds: { [id: number]: boolean } = {};\r\n private _evaluatedMeasure = new Measure(0, 0, 0, 0);\r\n private _evaluatedParentMeasure = new Measure(0, 0, 0, 0);\r\n protected _isEnabled = true;\r\n protected _disabledColor = \"#9a9a9a\";\r\n protected _disabledColorItem = \"#6a6a6a\";\r\n protected _isReadOnly = false;\r\n private _gradient: Nullable<BaseGradient> = null;\r\n /** @internal */\r\n protected _rebuildLayout = false;\r\n\r\n /**\r\n * Observable that fires when the control's enabled state changes\r\n */\r\n public onEnabledStateChangedObservable = new Observable<boolean>();\r\n\r\n /** @internal */\r\n public _customData: any = {};\r\n\r\n /** @internal */\r\n public _isClipped = false;\r\n\r\n /** @internal */\r\n public _automaticSize = false;\r\n\r\n /** @internal */\r\n public _tag: any;\r\n\r\n /**\r\n * Gets or sets the unique id of the node. Please note that this number will be updated when the control is added to a container\r\n */\r\n public uniqueId: number;\r\n\r\n /**\r\n * Gets or sets a boolean indicating if the control is readonly (default: false).\r\n * A readonly control will still raise pointer events but will not react to them\r\n */\r\n public get isReadOnly() {\r\n return this._isReadOnly;\r\n }\r\n\r\n public set isReadOnly(value: boolean) {\r\n this._isReadOnly = value;\r\n }\r\n\r\n /**\r\n * Gets the transformed measure, that is the bounding box of the control after applying all transformations\r\n */\r\n public get transformedMeasure(): Measure {\r\n return this._evaluatedMeasure;\r\n }\r\n\r\n /**\r\n * Gets or sets an object used to store user defined information for the node\r\n */\r\n @serialize()\r\n public metadata: any = null;\r\n\r\n /** Gets or sets a boolean indicating if the control can be hit with pointer events */\r\n @serialize()\r\n public isHitTestVisible = true;\r\n /** Gets or sets a boolean indicating if the control can block pointer events. False by default except on the following controls:\r\n * * Button controls (Button, RadioButton, ToggleButton)\r\n * * Checkbox\r\n * * ColorPicker\r\n * * InputText\r\n * * Slider\r\n */\r\n @serialize()\r\n public isPointerBlocker = false;\r\n /** Gets or sets a boolean indicating if the control can be focusable */\r\n @serialize()\r\n public isFocusInvisible = false;\r\n\r\n protected _clipChildren = true;\r\n /**\r\n * Sets/Gets a boolean indicating if the children are clipped to the current control bounds.\r\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\r\n */\r\n public set clipChildren(value: boolean) {\r\n this._clipChildren = value;\r\n }\r\n\r\n @serialize()\r\n public get clipChildren() {\r\n return this._clipChildren;\r\n }\r\n\r\n protected _clipContent = true;\r\n /**\r\n * Sets/Gets a boolean indicating that control content must be clipped\r\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\r\n */\r\n public set clipContent(value: boolean) {\r\n this._clipContent = value;\r\n }\r\n\r\n @serialize()\r\n public get clipContent() {\r\n return this._clipContent;\r\n }\r\n\r\n /**\r\n * Gets or sets a boolean indicating that the current control should cache its rendering (useful when the control does not change often)\r\n */\r\n @serialize()\r\n public useBitmapCache = false;\r\n\r\n private _cacheData: Nullable<ImageData>;\r\n\r\n private _shadowOffsetX = 0;\r\n /** Gets or sets a value indicating the offset to apply on X axis to render the shadow */\r\n @serialize()\r\n public get shadowOffsetX() {\r\n return this._shadowOffsetX;\r\n }\r\n\r\n public set shadowOffsetX(value: number) {\r\n if (this._shadowOffsetX === value) {\r\n return;\r\n }\r\n\r\n this._shadowOffsetX = value;\r\n this._markAsDirty();\r\n }\r\n\r\n private _shadowOffsetY = 0;\r\n /** Gets or sets a value indicating the offset to apply on Y axis to render the shadow */\r\n @serialize()\r\n public get shadowOffsetY() {\r\n return this._shadowOffsetY;\r\n }\r\n\r\n public set shadowOffsetY(value: number) {\r\n if (this._shadowOffsetY === value) {\r\n return;\r\n }\r\n\r\n this._shadowOffsetY = value;\r\n this._markAsDirty();\r\n }\r\n\r\n private _shadowBlur = 0;\r\n private _previousShadowBlur = 0;\r\n /** Gets or sets a value indicating the amount of blur to use to render the shadow */\r\n @serialize()\r\n public get shadowBlur() {\r\n return this._shadowBlur;\r\n }\r\n\r\n public set shadowBlur(value: number) {\r\n if (this._shadowBlur === value) {\r\n return;\r\n }\r\n\r\n this._previousShadowBlur = this._shadowBlur;\r\n\r\n this._shadowBlur = value;\r\n this._markAsDirty();\r\n }\r\n\r\n private _shadowColor = \"black\";\r\n /** Gets or sets a value indicating the color of the shadow (black by default ie. \"#000\") */\r\n @serialize()\r\n public get shadowColor() {\r\n return this._shadowColor;\r\n }\r\n\r\n public set shadowColor(value: string) {\r\n if (this._shadowColor === value) {\r\n return;\r\n }\r\n\r\n this._shadowColor = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /** Gets or sets the cursor to use when the control is hovered */\r\n @serialize()\r\n public hoverCursor = \"\";\r\n\r\n /** @internal */\r\n protected _linkOffsetX = new ValueAndUnit(0);\r\n /** @internal */\r\n protected _linkOffsetY = new ValueAndUnit(0);\r\n\r\n // Properties\r\n\r\n /** Gets the control type name */\r\n public get typeName(): string {\r\n return this._getTypeName();\r\n }\r\n\r\n /**\r\n * Get the current class name of the control.\r\n * @returns current class name\r\n */\r\n public getClassName(): string {\r\n return this._getTypeName();\r\n }\r\n\r\n /**\r\n * Gets or sets the accessibility tag to describe the control for accessibility purpose.\r\n * By default, GUI controls already indicate accessibility info, but one can override the info using this tag.\r\n */\r\n public set accessibilityTag(value: Nullable<IAccessibilityTag>) {\r\n this._accessibilityTag = value;\r\n this.onAccessibilityTagChangedObservable.notifyObservers(value);\r\n }\r\n\r\n public get accessibilityTag() {\r\n return this._accessibilityTag;\r\n }\r\n\r\n protected _accessibilityTag: Nullable<IAccessibilityTag> = null;\r\n\r\n /**\r\n * Observable that fires whenever the accessibility event of the control has changed\r\n */\r\n public onAccessibilityTagChangedObservable = new Observable<Nullable<IAccessibilityTag>>();\r\n\r\n /**\r\n * An event triggered when pointer wheel is scrolled\r\n */\r\n public onWheelObservable = new Observable<Vector2>();\r\n /**\r\n * An event triggered when the pointer moves over the control.\r\n */\r\n public onPointerMoveObservable = new Observable<Vector2>();\r\n\r\n /**\r\n * An event triggered when the pointer moves out of the control.\r\n */\r\n public onPointerOutObservable = new Observable<Control>();\r\n\r\n /**\r\n * An event triggered when the pointer taps the control\r\n */\r\n public onPointerDownObservable = new Observable<Vector2WithInfo>();\r\n\r\n /**\r\n * An event triggered when pointer up\r\n */\r\n public onPointerUpObservable = new Observable<Vector2WithInfo>();\r\n\r\n /**\r\n * An event triggered when a control is clicked on\r\n */\r\n public onPointerClickObservable = new Observable<Vector2WithInfo>();\r\n\r\n /**\r\n * An event triggered when pointer enters the control\r\n */\r\n public onPointerEnterObservable = new Observable<Control>();\r\n\r\n /**\r\n * An event triggered when the control is marked as dirty\r\n */\r\n public onDirtyObservable = new Observable<Control>();\r\n\r\n /**\r\n * An event triggered before drawing the control\r\n */\r\n public onBeforeDrawObservable = new Observable<Control>();\r\n\r\n /**\r\n * An event triggered after the control was drawn\r\n */\r\n public onAfterDrawObservable = new Observable<Control>();\r\n\r\n /**\r\n * An event triggered when the control has been disposed\r\n */\r\n public onDisposeObservable = new Observable<Control>();\r\n\r\n /**\r\n * An event triggered when the control isVisible is changed\r\n */\r\n public onIsVisibleChangedObservable = new Observable<boolean>();\r\n\r\n /**\r\n * Get the hosting AdvancedDynamicTexture\r\n */\r\n public get host(): AdvancedDynamicTexture {\r\n return this._host;\r\n }\r\n\r\n /** Gets or set information about font offsets (used to render and align text) */\r\n @serialize()\r\n public get fontOffset(): { ascent: number; height: number; descent: number } {\r\n return this._fontOffset;\r\n }\r\n\r\n public set fontOffset(offset: { ascent: number; height: number; descent: number }) {\r\n this._fontOffset = offset;\r\n }\r\n\r\n /** Gets or sets alpha value for the control (1 means opaque and 0 means entirely transparent) */\r\n @serialize()\r\n public get alpha(): number {\r\n return this._alpha;\r\n }\r\n\r\n public set alpha(value: number) {\r\n if (this._alpha === value) {\r\n return;\r\n }\r\n this._alphaSet = true;\r\n this._alpha = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /**\r\n * Gets or sets a number indicating size of stroke we want to highlight the control with (mostly for debugging purpose)\r\n */\r\n public get highlightLineWidth(): number {\r\n return this._highlightLineWidth;\r\n }\r\n\r\n public set highlightLineWidth(value: number) {\r\n if (this._highlightLineWidth === value) {\r\n return;\r\n }\r\n\r\n this._highlightLineWidth = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /**\r\n * Gets or sets a boolean indicating that we want to highlight the control (mostly for debugging purpose)\r\n */\r\n public get isHighlighted(): boolean {\r\n return this._isHighlighted;\r\n }\r\n\r\n public set isHighlighted(value: boolean) {\r\n if (this._isHighlighted === value) {\r\n return;\r\n }\r\n\r\n this._isHighlighted = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /**\r\n * Indicates if the control should be serialized. Defaults to true.\r\n */\r\n @serialize()\r\n public isSerializable: boolean = true;\r\n\r\n /**\r\n * Gets or sets a string defining the color to use for highlighting this control\r\n */\r\n public get highlightColor(): string {\r\n return this._highlightColor;\r\n }\r\n\r\n public set highlightColor(value: string) {\r\n if (this._highlightColor === value) {\r\n return;\r\n }\r\n\r\n this._highlightColor = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /** Gets or sets a value indicating the scale factor on X axis (1 by default)\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#rotation-and-scaling\r\n */\r\n @serialize()\r\n public get scaleX(): number {\r\n return this._scaleX;\r\n }\r\n\r\n public set scaleX(value: number) {\r\n if (this._scaleX === value) {\r\n return;\r\n }\r\n\r\n this._scaleX = value;\r\n this._markAsDirty();\r\n this._markMatrixAsDirty();\r\n }\r\n\r\n /** Gets or sets a value indicating the scale factor on Y axis (1 by default)\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#rotation-and-scaling\r\n */\r\n @serialize()\r\n public get scaleY(): number {\r\n return this._scaleY;\r\n }\r\n\r\n public set scaleY(value: number) {\r\n if (this._scaleY === value) {\r\n return;\r\n }\r\n\r\n this._scaleY = value;\r\n this._markAsDirty();\r\n this._markMatrixAsDirty();\r\n }\r\n\r\n /** Gets or sets the rotation angle (0 by default)\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#rotation-and-scaling\r\n */\r\n @serialize()\r\n public get rotation(): number {\r\n return this._rotation;\r\n }\r\n\r\n public set rotation(value: number) {\r\n if (this._rotation === value) {\r\n return;\r\n }\r\n\r\n this._rotation = value;\r\n this._markAsDirty();\r\n this._markMatrixAsDirty();\r\n }\r\n\r\n /** Gets or sets the transformation center on Y axis (0 by default)\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#rotation-and-scaling\r\n */\r\n @serialize()\r\n public get transformCenterY(): number {\r\n return this._transformCenterY;\r\n }\r\n\r\n public set transformCenterY(value: number) {\r\n if (this._transformCenterY === value) {\r\n return;\r\n }\r\n\r\n this._transformCenterY = value;\r\n this._markAsDirty();\r\n this._markMatrixAsDirty();\r\n }\r\n\r\n /** Gets or sets the transformation center on X axis (0 by default)\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#rotation-and-scaling\r\n */\r\n @serialize()\r\n public get transformCenterX(): number {\r\n return this._transformCenterX;\r\n }\r\n\r\n public set transformCenterX(value: number) {\r\n if (this._transformCenterX === value) {\r\n return;\r\n }\r\n\r\n this._transformCenterX = value;\r\n this._markAsDirty();\r\n this._markMatrixAsDirty();\r\n }\r\n\r\n /**\r\n * Gets or sets the horizontal alignment\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#alignments\r\n */\r\n @serialize()\r\n public get horizontalAlignment(): number {\r\n return this._horizontalAlignment;\r\n }\r\n\r\n public set horizontalAlignment(value: number) {\r\n if (this._horizontalAlignment === value) {\r\n return;\r\n }\r\n\r\n this._horizontalAlignment = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /**\r\n * Gets or sets the vertical alignment\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#alignments\r\n */\r\n @serialize()\r\n public get verticalAlignment(): number {\r\n return this._verticalAlignment;\r\n }\r\n\r\n public set verticalAlignment(value: number) {\r\n if (this._verticalAlignment === value) {\r\n return;\r\n }\r\n\r\n this._verticalAlignment = value;\r\n this._markAsDirty();\r\n }\r\n\r\n private _fixedRatio = 0;\r\n public set fixedRatio(value: number) {\r\n if (this._fixedRatio === value) {\r\n return;\r\n }\r\n\r\n this._fixedRatio = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /**\r\n * Gets or sets a fixed ratio for this control.\r\n * When different from 0, the ratio is used to compute the \"second\" dimension.\r\n * The first dimension used in the computation is the last one set (by setting width / widthInPixels or height / heightInPixels), and the\r\n * second dimension is computed as first dimension * fixedRatio\r\n */\r\n @serialize()\r\n public get fixedRatio(): number {\r\n return this._fixedRatio;\r\n }\r\n\r\n private _fixedRatioMasterIsWidth = true;\r\n set fixedRatioMasterIsWidth(value: boolean) {\r\n if (this._fixedRatioMasterIsWidth === value) {\r\n return;\r\n }\r\n this._fixedRatioMasterIsWidth = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /**\r\n * Gets or sets a boolean indicating that the fixed ratio is set on the width instead of the height. True by default.\r\n * When the height of a control is set, this property is changed to false.\r\n */\r\n @serialize()\r\n get fixedRatioMasterIsWidth(): boolean {\r\n return this._fixedRatioMasterIsWidth;\r\n }\r\n\r\n /**\r\n * Gets or sets control width\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\r\n */\r\n @serialize()\r\n public get width(): string | number {\r\n return this._width.toString(this._host);\r\n }\r\n\r\n public set width(value: string | number) {\r\n this._fixedRatioMasterIsWidth = true;\r\n\r\n if (this._width.toString(this._host) === value) {\r\n return;\r\n }\r\n\r\n if (this._width.fromString(value)) {\r\n this._markAsDirty();\r\n }\r\n }\r\n\r\n /**\r\n * Gets or sets the control width in pixel\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\r\n */\r\n public get widthInPixels(): number {\r\n return this._width.getValueInPixel(this._host, this._cachedParentMeasure.width);\r\n }\r\n\r\n public set widthInPixels(value: number) {\r\n if (isNaN(value)) {\r\n return;\r\n }\r\n this._fixedRatioMasterIsWidth = true;\r\n this.width = value + \"px\";\r\n }\r\n\r\n /**\r\n * Gets or sets control height\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\r\n */\r\n @serialize()\r\n public get height(): string | number {\r\n return this._height.toString(this._host);\r\n }\r\n\r\n public set height(value: string | number) {\r\n this._fixedRatioMasterIsWidth = false;\r\n\r\n if (this._height.toString(this._host) === value) {\r\n return;\r\n }\r\n\r\n if (this._height.fromString(value)) {\r\n this._markAsDirty();\r\n }\r\n }\r\n\r\n /**\r\n * Gets or sets control height in pixel\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\r\n */\r\n public get heightInPixels(): number {\r\n return this._height.getValueInPixel(this._host, this._cachedParentMeasure.height);\r\n }\r\n\r\n public set heightInPixels(value: number) {\r\n if (isNaN(value)) {\r\n return;\r\n }\r\n this._fixedRatioMasterIsWidth = false;\r\n this.height = value + \"px\";\r\n }\r\n\r\n /** Gets or set font family */\r\n public get fontFamily(): string {\r\n return this._fontFamily;\r\n }\r\n\r\n public set fontFamily(value: string) {\r\n if (this._fontFamily === value) {\r\n return;\r\n }\r\n\r\n this._fontFamily = value;\r\n this._resetFontCache();\r\n }\r\n\r\n /** Gets or sets font style */\r\n public get fontStyle(): string {\r\n return this._fontStyle;\r\n }\r\n\r\n public set fontStyle(value: string) {\r\n if (this._fontStyle === value) {\r\n return;\r\n }\r\n\r\n this._fontStyle = value;\r\n this._resetFontCache();\r\n }\r\n\r\n /** Gets or sets font weight */\r\n public get fontWeight(): string {\r\n return this._fontWeight;\r\n }\r\n\r\n public set fontWeight(value: string) {\r\n if (this._fontWeight === value) {\r\n return;\r\n }\r\n\r\n this._fontWeight = value;\r\n this._resetFontCache();\r\n }\r\n\r\n /**\r\n * Gets or sets style\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#styles\r\n */\r\n @serialize()\r\n public get style(): Nullable<Style> {\r\n return this._style;\r\n }\r\n\r\n public set style(value: Nullable<Style>) {\r\n if (this._style) {\r\n this._style.onChangedObservable.remove(this._styleObserver);\r\n this._styleObserver = null;\r\n }\r\n\r\n this._style = value;\r\n\r\n if (this._style) {\r\n this._styleObserver = this._style.onChangedObservable.add(() => {\r\n this._markAsDirty();\r\n this._resetFontCache();\r\n });\r\n }\r\n\r\n this._markAsDirty();\r\n this._resetFontCache();\r\n }\r\n\r\n /** @internal */\r\n public get _isFontSizeInPercentage(): boolean {\r\n return this._fontSize.isPercentage;\r\n }\r\n\r\n /** Gets or sets font size in pixels */\r\n public get fontSizeInPixels(): number {\r\n const fontSizeToUse = this._style ? this._style._fontSize : this._fontSize;\r\n\r\n if (fontSizeToUse.isPixel) {\r\n return fontSizeToUse.getValue(this._host);\r\n }\r\n\r\n return fontSizeToUse.getValueInPixel(this._host, this._tempParentMeasure.height || this._cachedParentMeasure.height);\r\n }\r\n\r\n public set fontSizeInPixels(value: number) {\r\n if (isNaN(value)) {\r\n return;\r\n }\r\n this.fontSize = value + \"px\";\r\n }\r\n\r\n /** Gets or sets font size */\r\n public get fontSize(): string | number {\r\n return this._fontSize.toString(this._host);\r\n }\r\n\r\n public set fontSize(value: string | number) {\r\n if (this._fontSize.toString(this._host) === value) {\r\n return;\r\n }\r\n\r\n if (this._fontSize.fromString(value)) {\r\n this._markAsDirty();\r\n this._resetFontCache();\r\n }\r\n }\r\n\r\n /** Gets or sets foreground color */\r\n @serialize()\r\n public get color(): string {\r\n return this._color;\r\n }\r\n\r\n public set color(value: string) {\r\n if (this._color === value) {\r\n return;\r\n }\r\n\r\n this._color = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /** Gets or sets gradient. Setting a gradient will override the color */\r\n @serialize()\r\n public get gradient(): Nullable<BaseGradient> {\r\n return this._gradient;\r\n }\r\n\r\n public set gradient(value: Nullable<BaseGradient>) {\r\n if (this._gradient === value) {\r\n return;\r\n }\r\n\r\n this._gradient = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /** Gets or sets z index which is used to reorder controls on the z axis */\r\n @serialize()\r\n public get zIndex(): number {\r\n return this._zIndex;\r\n }\r\n\r\n public set zIndex(value: number) {\r\n if (this.zIndex === value) {\r\n return;\r\n }\r\n\r\n this._zIndex = value;\r\n\r\n if (this.parent) {\r\n this.parent._reOrderControl(this);\r\n }\r\n }\r\n\r\n /** Gets or sets a boolean indicating if the control can be rendered */\r\n @serialize()\r\n public get notRenderable(): boolean {\r\n return this._doNotRender;\r\n }\r\n\r\n public set notRenderable(value: boolean) {\r\n if (this._doNotRender === value) {\r\n return;\r\n }\r\n\r\n this._doNotRender = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /** Gets or sets a boolean indicating if the control is visible */\r\n @serialize()\r\n public get isVisible(): boolean {\r\n return this._isVisible;\r\n }\r\n\r\n public set isVisible(value: boolean) {\r\n if (this._isVisible === value) {\r\n return;\r\n }\r\n\r\n this._isVisible = value;\r\n this._markAsDirty(true);\r\n\r\n this.onIsVisibleChangedObservable.notifyObservers(value);\r\n }\r\n\r\n /** Gets a boolean indicating that the control needs to update its rendering */\r\n public get isDirty(): boolean {\r\n return this._isDirty;\r\n }\r\n\r\n /**\r\n * Gets the current linked mesh (or null if none)\r\n */\r\n public get linkedMesh(): Nullable<TransformNode> {\r\n return this._linkedMesh;\r\n }\r\n\r\n /**\r\n * Gets or sets a value indicating the padding should work like in CSS.\r\n * Basically, it will add the padding amount on each side of the parent control for its children.\r\n */\r\n @serialize()\r\n public get descendantsOnlyPadding(): boolean {\r\n return this._descendantsOnlyPadding;\r\n }\r\n\r\n public set descendantsOnlyPadding(value: boolean) {\r\n if (this._descendantsOnlyPadding === value) {\r\n return;\r\n }\r\n\r\n this._descendantsOnlyPadding = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /**\r\n * Gets or sets a value indicating the padding to use on the left of the control\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\r\n */\r\n @serialize()\r\n public get paddingLeft(): string | number {\r\n return this._paddingLeft.toString(this._host);\r\n }\r\n\r\n public set paddingLeft(value: string | number) {\r\n if (this._paddingLeft.fromString(value)) {\r\n this._markAsDirty();\r\n }\r\n }\r\n\r\n /**\r\n * Gets or sets a value indicating the padding in pixels to use on the left of the control\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\r\n */\r\n public get paddingLeftInPixels(): number {\r\n return this._paddingLeft.getValueInPixel(this._host, this._cachedParentMeasure.width);\r\n }\r\n\r\n public set paddingLeftInPixels(value: number) {\r\n if (isNaN(value)) {\r\n return;\r\n }\r\n this.paddingLeft = value + \"px\";\r\n }\r\n\r\n /** @internal */\r\n public get _paddingLeftInPixels(): number {\r\n if (this._descendantsOnlyPadding) {\r\n return 0;\r\n }\r\n\r\n return this.paddingLeftInPixels;\r\n }\r\n\r\n /**\r\n * Gets or sets a value indicating the padding to use on the right of the control\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\r\n */\r\n @serialize()\r\n public get paddingRight(): string | number {\r\n return this._paddingRight.toString(this._host);\r\n }\r\n\r\n public set paddingRight(value: string | number) {\r\n if (this._paddingRight.fromString(value)) {\r\n this._markAsDirty();\r\n }\r\n }\r\n\r\n /**\r\n * Gets or sets a value indicating the padding in pixels to use on the right of the control\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\r\n */\r\n public get paddingRightInPixels(): number {\r\n return this._paddingRight.getValueInPixel(this._host, this._cachedParentMeasure.width);\r\n }\r\n\r\n public set paddingRightInPixels(value: number) {\r\n if (isNaN(value)) {\r\n return;\r\n }\r\n this.paddingRight = value + \"px\";\r\n }\r\n\r\n /** @internal */\r\n public get _paddingRightInPixels(): number {\r\n if (this._descendantsOnlyPadding) {\r\n return 0;\r\n }\r\n\r\n return this.paddingRightInPixels;\r\n }\r\n\r\n /**\r\n * Gets or sets a value indicating the padding to use on the top of the control\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\r\n */\r\n @serialize()\r\n public get paddingTop(): string | number {\r\n return this._paddingTop.toString(this._host);\r\n }\r\n\r\n public set paddingTop(value: string | number) {\r\n if (this._paddingTop.fromString(value)) {\r\n this._markAsDirty();\r\n }\r\n }\r\n\r\n /**\r\n * Gets or sets a value indicating the padding in pixels to use on the top of the control\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\r\n */\r\n public get paddingTopInPixels(): number {\r\n return this._paddingTop.getValueInPixel(this._host, this._cachedParentMeasure.height);\r\n }\r\n\r\n public set paddingTopInPixels(value: number) {\r\n if (isNaN(value)) {\r\n return;\r\n }\r\n this.paddingTop = value + \"px\";\r\n }\r\n\r\n /** @internal */\r\n public get _paddingTopInPixels(): number {\r\n if (this._descendantsOnlyPadding) {\r\n return 0;\r\n }\r\n\r\n return this.paddingTopInPixels;\r\n }\r\n\r\n /**\r\n * Gets or sets a value indicating the padding to use on the bottom of the control\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\r\n */\r\n @serialize()\r\n public get paddingBottom(): string | number {\r\n return this._paddingBottom.toString(this._host);\r\n }\r\n\r\n public set paddingBottom(value: string | number) {\r\n if (this._paddingBottom.fromString(value)) {\r\n this._markAsDirty();\r\n }\r\n }\r\n\r\n /**\r\n * Gets or sets a value indicating the padding in pixels to use on the bottom of the control\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\r\n */\r\n public get paddingBottomInPixels(): number {\r\n return this._paddingBottom.getValueInPixel(this._host, this._cachedParentMeasure.height);\r\n }\r\n\r\n public set paddingBottomInPixels(value: number) {\r\n if (isNaN(value)) {\r\n return;\r\n }\r\n this.paddingBottom = value + \"px\";\r\n }\r\n\r\n /** @internal */\r\n public get _paddingBottomInPixels(): number {\r\n if (this._descendantsOnlyPadding) {\r\n return 0;\r\n }\r\n\r\n return this.paddingBottomInPixels;\r\n }\r\n\r\n /**\r\n * Gets or sets a value indicating the left coordinate of the control\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\r\n */\r\n @serialize()\r\n public get left(): string | number {\r\n return this._left.toString(this._host);\r\n }\r\n\r\n public set left(value: string | number) {\r\n if (this._left.fromString(value)) {\r\n this._markAsDirty();\r\n }\r\n }\r\n\r\n /**\r\n * Gets or sets a value indicating the left coordinate in pixels of the control\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\r\n */\r\n public get leftInPixels(): number {\r\n return this._left.getValueInPixel(this._host, this._cachedParentMeasure.width);\r\n }\r\n\r\n public set leftInPixels(value: number) {\r\n if (isNaN(value)) {\r\n return;\r\n }\r\n this.left = value + \"px\";\r\n }\r\n\r\n /**\r\n * Gets or sets a value indicating the top coordinate of the control\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\r\n */\r\n @serialize()\r\n public get top(): string | number {\r\n return this._top.toString(this._host);\r\n }\r\n\r\n public set top(value: string | number) {\r\n if (this._top.fromString(value)) {\r\n this._markAsDirty();\r\n }\r\n }\r\n\r\n /**\r\n * Gets or sets a value indicating the top coordinate in pixels of the control\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\r\n */\r\n public get topInPixels(): number {\r\n return this._top.getValueInPixel(this._host, this._cachedParentMeasure.height);\r\n }\r\n\r\n public set topInPixels(value: number) {\r\n if (isNaN(value)) {\r\n return;\r\n }\r\n this.top = value + \"px\";\r\n }\r\n\r\n /**\r\n * Gets or sets a value indicating the offset on X axis to the linked mesh\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#tracking-positions\r\n */\r\n @serialize()\r\n public get linkOffsetX(): string | number {\r\n return this._linkOffsetX.toString(this._host);\r\n }\r\n\r\n public set linkOffsetX(value: string | number) {\r\n if (this._linkOffsetX.fromString(value)) {\r\n this._markAsDirty();\r\n }\r\n }\r\n\r\n /**\r\n * Gets or sets a value indicating the offset in pixels on X axis to the linked mesh\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#tracking-positions\r\n */\r\n public get linkOffsetXInPixels(): number {\r\n return this._linkOffsetX.getValueInPixel(this._host, this._cachedParentMeasure.width);\r\n }\r\n\r\n public set linkOffsetXInPixels(value: number) {\r\n if (isNaN(value)) {\r\n return;\r\n }\r\n this.linkOffsetX = value + \"px\";\r\n }\r\n\r\n /**\r\n * Gets or sets a value indicating the offset on Y axis to the linked mesh\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#tracking-positions\r\n */\r\n @serialize()\r\n public get linkOffsetY(): string | number {\r\n return this._linkOffsetY.toString(this._host);\r\n }\r\n\r\n public set linkOffsetY(value: string | number) {\r\n if (this._linkOffsetY.fromString(value)) {\r\n this._markAsDirty();\r\n }\r\n }\r\n\r\n /**\r\n * Gets or sets a value indicating the offset in pixels on Y axis to the linked mesh\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#tracking-positions\r\n */\r\n public get linkOffsetYInPixels(): number {\r\n return this._linkOffsetY.getValueInPixel(this._host, this._cachedParentMeasure.height);\r\n }\r\n\r\n public set linkOffsetYInPixels(value: number) {\r\n if (isNaN(value)) {\r\n return;\r\n }\r\n this.linkOffsetY = value + \"px\";\r\n }\r\n\r\n /** Gets the center coordinate on X axis */\r\n public get centerX(): number {\r\n return this._currentMeasure.left + this._currentMeasure.width / 2;\r\n }\r\n\r\n /** Gets the center coordinate on Y axis */\r\n public get centerY(): number {\r\n return this._currentMeasure.top + this._currentMeasure.height / 2;\r\n }\r\n\r\n /** Gets or sets if control is Enabled */\r\n @serialize()\r\n public get isEnabled(): boolean {\r\n return this._isEnabled;\r\n }\r\n\r\n public set isEnabled(value: boolean) {\r\n if (this._isEnabled === value) {\r\n return;\r\n }\r\n\r\n this._isEnabled = value;\r\n this._markAsDirty();\r\n // if this control or any of it's descendants are under a pointer, we need to fire a pointerOut event\r\n const recursivelyFirePointerOut = (control: Control) => {\r\n if (!control.host) {\r\n return;\r\n }\r\n for (const pointer in control.host._lastControlOver) {\r\n if (control === this.host._lastControlOver[pointer]) {\r\n control._onPointerOut(control, null, true);\r\n delete control.host._lastControlOver[pointer];\r\n }\r\n }\r\n if ((control as Container).children !== undefined) {\r\n (control as Container).children.forEach(recursivelyFirePointerOut);\r\n }\r\n };\r\n recursivelyFirePointerOut(this);\r\n this.onEnabledStateChangedObservable.notifyObservers(value);\r\n }\r\n /** Gets or sets background color of control if it's disabled. Only applies to Button class. */\r\n @serialize()\r\n public get disabledColor(): string {\r\n return this._disabledColor;\r\n }\r\n\r\n public set disabledColor(value: string) {\r\n if (this._disabledColor === value) {\r\n return;\r\n }\r\n\r\n this._disabledColor = value;\r\n this._markAsDirty();\r\n }\r\n /** Gets or sets front color of control if it's disabled. Only applies to Checkbox class. */\r\n @serialize()\r\n public get disabledColorItem(): string {\r\n return this._disabledColorItem;\r\n }\r\n\r\n public set disabledColorItem(value: string) {\r\n if (this._disabledColorItem === value) {\r\n return;\r\n }\r\n\r\n this._disabledColorItem = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /**\r\n * Gets/sets the overlap group of the control.\r\n * Controls with overlapGroup set to a number can be deoverlapped.\r\n * Controls with overlapGroup set to undefined are not deoverlapped.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#deoverlapping\r\n */\r\n @serialize()\r\n public overlapGroup?: number;\r\n /**\r\n * Gets/sets the deoverlap movement multiplier\r\n */\r\n @serialize()\r\n public overlapDeltaMultiplier?: number;\r\n\r\n /**\r\n * Array of animations\r\n */\r\n animations: Nullable<Animation[]> = null;\r\n\r\n // Functions\r\n\r\n /**\r\n * Creates a new control\r\n * @param name defines the name of the control\r\n */\r\n constructor(\r\n /** defines the name of the control */\r\n public name?: string\r\n ) {}\r\n\r\n /** @internal */\r\n protected _getTypeName(): string {\r\n return \"Control\";\r\n }\r\n\r\n /**\r\n * Gets the first ascendant in the hierarchy of the given type\r\n * @param className defines the required type\r\n * @returns the ascendant or null if not found\r\n */\r\n public getAscendantOfClass(className: string): Nullable<Control> {\r\n if (!this.parent) {\r\n return null;\r\n }\r\n\r\n if (this.parent.getClassName() === className) {\r\n return this.parent;\r\n }\r\n\r\n return this.parent.getAscendantOfClass(className);\r\n }\r\n\r\n /**\r\n * Mark control element as dirty\r\n * @param force force non visible elements to be marked too\r\n */\r\n public markAsDirty(force = false): void {\r\n this._markAsDirty(force);\r\n }\r\n\r\n /**\r\n * Mark the element and its children as dirty\r\n */\r\n public markAllAsDirty(): void {\r\n this._markAllAsDirty();\r\n }\r\n\r\n /** @internal */\r\n public _resetFontCache(): void {\r\n this._fontSet = true;\r\n this._markAsDirty();\r\n }\r\n\r\n /**\r\n * Determines if a container is an ascendant of the current control\r\n * @param container defines the container to look for\r\n * @returns true if the container is one of the ascendant of the control\r\n */\r\n public isAscendant(container: Control): boolean {\r\n if (!this.parent) {\r\n return false;\r\n }\r\n\r\n if (this.parent === container) {\r\n return true;\r\n }\r\n\r\n return this.parent.isAscendant(container);\r\n }\r\n\r\n /**\r\n * Gets coordinates in local control space\r\n * @param globalCoordinates defines the coordinates to transform\r\n * @returns the new coordinates in local space\r\n */\r\n public getLocalCoordinates(globalCoordinates: Vector2): Vector2 {\r\n const result = Vector2.Zero();\r\n\r\n this.getLocalCoordinatesToRef(globalCoordinates, result);\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Gets coordinates in local control space\r\n * @param globalCoordinates defines the coordinates to transform\r\n * @param result defines the target vector2 where to store the result\r\n * @returns the current control\r\n */\r\n public getLocalCoordinatesToRef(globalCoordinates: Vector2, result: Vector2): Control {\r\n result.x = globalCoordinates.x - this._currentMeasure.left;\r\n result.y = globalCoordinates.y - this._currentMeasure.top;\r\n return this;\r\n }\r\n\r\n /**\r\n * Gets coordinates in parent local control space\r\n * @param globalCoordinates defines the coordinates to transform\r\n * @returns the new coordinates in parent local space\r\n */\r\n public getParentLocalCoordinates(globalCoordinates: Vector2): Vector2 {\r\n const result = Vector2.Zero();\r\n\r\n result.x = globalCoordinates.x - this._cachedParentMeasure.left;\r\n result.y = globalCoordinates.y - this._cachedParentMeasure.top;\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Move the current control to a vector3 position projected onto the screen.\r\n * @param position defines the target position\r\n * @param scene defines the hosting scene\r\n */\r\n public moveToVector3(position: Vector3, scene: Scene): void {\r\n if (!this._host || this.parent !== this._host._rootContainer) {\r\n Tools.Error(\"Cannot move a control to a vector3 if the control is not at root level\");\r\n return;\r\n }\r\n\r\n this.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;\r\n this.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP;\r\n\r\n const globalViewport = this._host._getGlobalViewport();\r\n const projectedPosition = Vector3.Project(position, Matrix.IdentityReadOnly, scene.getTransformMatrix(), globalViewport);\r\n\r\n this._moveToProjectedPosition(projectedPosition);\r\n\r\n if (projectedPosition.z < 0 || projectedPosition.z > 1) {\r\n this.notRenderable = true;\r\n return;\r\n }\r\n this.notRenderable = false;\r\n }\r\n\r\n /**\r\n * Will store all controls that have this control as ascendant in a given array\r\n * @param results defines the array where to store the descendants\r\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\r\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\r\n */\r\n public getDescendantsToRef(results: Control[], directDescendantsOnly: boolean = false, predicate?: (control: Control) => boolean): void {\r\n // Do nothing by default\r\n }\r\n\r\n /**\r\n * Will return all controls that have this control as ascendant\r\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\r\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\r\n * @returns all child controls\r\n */\r\n public getDescendants(directDescendantsOnly?: boolean, predicate?: (control: Control) => boolean): Control[] {\r\n const results: Control[] = [];\r\n\r\n this.getDescendantsToRef(results, directDescendantsOnly, predicate);\r\n\r\n return results;\r\n }\r\n\r\n /**\r\n * Link current control with a target mesh\r\n * @param mesh defines the mesh to link with\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#tracking-positions\r\n */\r\n public linkWithMesh(mesh: Nullable<TransformNode>): void {\r\n if (!this._host || (this.parent && this.parent !== this._host._rootContainer)) {\r\n if (mesh) {\r\n Tools.Error(\"Cannot link a control to a mesh if the control is not at root level\");\r\n }\r\n return;\r\n }\r\n\r\n const index = this._host._linkedControls.indexOf(this);\r\n if (index !== -1) {\r\n this._linkedMesh = mesh;\r\n if (!mesh) {\r\n this._host._linkedControls.splice(index, 1);\r\n }\r\n return;\r\n } else if (!mesh) {\r\n return;\r\n }\r\n\r\n this.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;\r\n this.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP;\r\n this._linkedMesh = mesh;\r\n this._host._linkedControls.push(this);\r\n }\r\n\r\n /**\r\n * Shorthand function to set the top, right, bottom, and left padding values on the control.\r\n * @param { string | number} paddingTop - The value of the top padding.\r\n * @param { string | number} paddingRight - The value of the right padding. If omitted, top is used.\r\n * @param { string | number} paddingBottom - The value of the bottom padding. If omitted, top is used.\r\n * @param { string | number} paddingLeft - The value of the left padding. If omitted, right is used.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\r\n */\r\n public setPadding(paddingTop: string | number, paddingRight?: string | number, paddingBottom?: string | number, paddingLeft?: string | number) {\r\n const top = paddingTop;\r\n const right = paddingRight ?? top;\r\n const bottom = paddingBottom ?? top;\r\n const left = paddingLeft ?? right;\r\n\r\n this.paddingTop = top;\r\n this.paddingRight = right;\r\n this.paddingBottom = bottom;\r\n this.paddingLeft = left;\r\n }\r\n\r\n /**\r\n * Shorthand funtion to set the top, right, bottom, and left padding values in pixels on the control.\r\n * @param { number} paddingTop - The value in pixels of the top padding.\r\n * @param { number} paddingRight - The value in pixels of the right padding. If omitted, top is used.\r\n * @param { number} paddingBottom - The value in pixels of the bottom padding. If omitted, top is used.\r\n * @param { number} paddingLeft - The value in pixels of the left padding. If omitted, right is used.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\r\n */\r\n public setPaddingInPixels(paddingTop: number, paddingRight?: number, paddingBottom?: number, paddingLeft?: number) {\r\n const top = paddingTop;\r\n const right = paddingRight ?? top;\r\n const bottom = paddingBottom ?? top;\r\n const left = paddingLeft ?? right;\r\n\r\n this.paddingTopInPixels = top;\r\n this.paddingRightInPixels = right;\r\n this.paddingBottomInPixels = bottom;\r\n this.paddingLeftInPixels = left;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _moveToProjectedPosition(projectedPosition: Vector3): void {\r\n const oldLeft = this._left.getValue(this._host);\r\n const oldTop = this._top.getValue(this._host);\r\n\r\n const parentMeasure = this.parent?._currentMeasure;\r\n if (parentMeasure) {\r\n this._processMeasures(parentMeasure, this._host.getContext());\r\n }\r\n\r\n let newLeft = projectedPosition.x + this._linkOffsetX.getValue(this._host) - this._currentMeasure.width / 2;\r\n let newTop = projectedPosition.y + this._linkOffsetY.getValue(this._host) - this._currentMeasure.height / 2;\r\n\r\n const leftAndTopIgnoreAdaptiveScaling = this._left.ignoreAdaptiveScaling && this._top.ignoreAdaptiveScaling;\r\n if (leftAndTopIgnoreAdaptiveScaling) {\r\n if (Math.abs(newLeft - oldLeft) < 0.5) {\r\n newLeft = oldLeft;\r\n }\r\n\r\n if (Math.abs(newTop - oldTop) < 0.5) {\r\n newTop = oldTop;\r\n }\r\n }\r\n\r\n if (!leftAndTopIgnoreAdaptiveScaling && oldLeft === newLeft && oldTop === newTop) {\r\n return;\r\n }\r\n\r\n this.left = newLeft + \"px\";\r\n this.top = newTop + \"px\";\r\n\r\n this._left.ignoreAdaptiveScaling = true;\r\n this._top.ignoreAdaptiveScaling = true;\r\n this._markAsDirty();\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _offsetLeft(offset: number) {\r\n this._isDirty = true;\r\n this._currentMeasure.left += offset;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _offsetTop(offset: number) {\r\n this._isDirty = true;\r\n this._currentMeasure.top += offset;\r\n }\r\n\r\n /** @internal */\r\n public _markMatrixAsDirty(): void {\r\n this._isMatrixDirty = true;\r\n this._flagDescendantsAsMatrixDirty();\r\n }\r\n\r\n /** @internal */\r\n public _flagDescendantsAsMatrixDirty(): void {\r\n // No child\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _intersectsRect(rect: Measure, context?: ICanvasRenderingContext) {\r\n // make sure we are transformed correctly before checking intersections. no-op if nothing is dirty.\r\n this._transform(context);\r\n if (this._evaluatedMeasure.left >= rect.left + rect.width) {\r\n return false;\r\n }\r\n\r\n if (this._evaluatedMeasure.top >= rect.top + rect.height) {\r\n return false;\r\n }\r\n\r\n if (this._evaluatedMeasure.left + this._evaluatedMeasure.width <= rect.left) {\r\n return false;\r\n }\r\n\r\n if (this._evaluatedMeasure.top + this._evaluatedMeasure.height <= rect.top) {\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /** @internal */\r\n protected _computeAdditionalOffsetX() {\r\n return 0;\r\n }\r\n\r\n /** @internal */\r\n protected _computeAdditionalOffsetY() {\r\n return 0;\r\n }\r\n\r\n /** @internal */\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n public invalidateRect() {\r\n this._transform();\r\n if (this.host && this.host.useInvalidateRectOptimization) {\r\n // Rotate by transform to get the measure transformed to global space\r\n this._currentMeasure.transformToRef(this._transformMatrix, this._tmpMeasureA);\r\n // get the boudning box of the current measure and last frames measure in global space and invalidate it\r\n // the previous measure is used to properly clear a control that is scaled down\r\n Measure.CombineToRef(this._tmpMeasureA, this._prevCurrentMeasureTransformedIntoGlobalSpace, this._tmpMeasureA);\r\n\r\n // Expand rect based on shadows\r\n const shadowOffsetX = this.shadowOffsetX;\r\n const shadowOffsetY = this.shadowOffsetY;\r\n const shadowBlur = Math.max(this._previousShadowBlur, this.shadowBlur);\r\n\r\n const leftShadowOffset = Math.min(Math.min(shadowOffsetX, 0) - shadowBlur * 2, 0);\r\n const rightShadowOffset = Math.max(Math.max(shadowOffsetX, 0) + shadowBlur * 2, 0);\r\n const topShadowOffset = Math.min(Math.min(shadowOffsetY, 0) - shadowBlur * 2, 0);\r\n const bottomShadowOffset = Math.max(Math.max(shadowOffsetY, 0) + shadowBlur * 2, 0);\r\n\r\n const offsetX = this._computeAdditionalOffsetX();\r\n const offsetY = this._computeAdditionalOffsetY();\r\n\r\n this.host.invalidateRect(\r\n Math.floor(this._tmpMeasureA.left + leftShadowOffset - offsetX),\r\n Math.floor(this._tmpMeasureA.top + topShadowOffset - offsetY),\r\n Math.ceil(this._tmpMeasureA.left + this._tmpMeasureA.width + rightShadowOffset + offsetX),\r\n Math.ceil(this._tmpMeasureA.top + this._tmpMeasureA.height + bottomShadowOffset + offsetY)\r\n );\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _markAsDirty(force = false): void {\r\n if (!this._isVisible && !force) {\r\n return;\r\n }\r\n\r\n this._isDirty = true;\r\n this._markMatrixAsDirty();\r\n\r\n // Redraw only this rectangle\r\n if (this._host) {\r\n this._host.markAsDirty();\r\n }\r\n }\r\n\r\n /** @internal */\r\n public _markAllAsDirty(): void {\r\n this._markAsDirty();\r\n\r\n if (this._font) {\r\n this._prepareFont();\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _link(host: AdvancedDynamicTexture): void {\r\n this._host = host;\r\n if (this._host) {\r\n this.uniqueId = this._host.getScene()!.getUniqueId();\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n protected _transform(context?: ICanvasRenderingContext): void {\r\n if (!this._isMatrixDirty && this._scaleX === 1 && this._scaleY === 1 && this._rotation === 0) {\r\n return;\r\n }\r\n\r\n // postTranslate\r\n const offsetX = this._currentMeasure.width * this._transformCenterX + this._currentMeasure.left;\r\n const offsetY = this._currentMeasure.height * this._transformCenterY + this._currentMeasure.top;\r\n if (context) {\r\n context.translate(offsetX, offsetY);\r\n\r\n // rotate\r\n context.rotate(this._rotation);\r\n\r\n // scale\r\n context.scale(this._scaleX, this._scaleY);\r\n\r\n // preTranslate\r\n context.translate(-offsetX, -offsetY);\r\n }\r\n // Need to update matrices?\r\n if (this._isMatrixDirty || this._cachedOffsetX !== offsetX || this._cachedOffsetY !== offsetY) {\r\n this._cachedOffsetX = offsetX;\r\n this._cachedOffsetY = offsetY;\r\n this._isMatrixDirty = false;\r\n this._flagDescendantsAsMatrixDirty();\r\n\r\n Matrix2D.ComposeToRef(-offsetX, -offsetY, this._rotation, this._scaleX, this._scaleY, this.parent ? this.parent._transformMatrix : null, this._transformMatrix);\r\n\r\n this._transformMatrix.invertToRef(this._invertTransformMatrix);\r\n this._currentMeasure.transformToRef(this._transformMatrix, this._evaluatedMeasure);\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _renderHighlight(context: ICanvasRenderingContext): void {\r\n if (!this.isHighlighted) {\r\n return;\r\n }\r\n\r\n context.save();\r\n context.strokeStyle = this._highlightColor;\r\n context.lineWidth = this._highlightLineWidth;\r\n\r\n this._renderHighlightSpecific(context);\r\n context.restore();\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _renderHighlightSpecific(context: ICanvasRenderingContext): void {\r\n context.strokeRect(this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);\r\n }\r\n\r\n protected _getColor(context: ICanvasRenderingContext): string | ICanvasGradient {\r\n return this.gradient ? this.gradient.getCanvasGradient(context) : this.color;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n protected _applyStates(context: ICanvasRenderingContext): void {\r\n if (this._isFontSizeInPercentage) {\r\n this._fontSet = true;\r\n }\r\n\r\n if (this._host && this._host.useSmallestIdeal && !this._font) {\r\n this._fontSet = true;\r\n }\r\n\r\n if (this._fontSet) {\r\n this._prepareFont();\r\n this._fontSet = false;\r\n }\r\n\r\n if (this._font) {\r\n context.font = this._font;\r\n }\r\n\r\n if (this._color || this.gradient) {\r\n context.fillStyle = this._getColor(context);\r\n }\r\n\r\n if (Control.AllowAlphaInheritance) {\r\n context.globalAlpha *= this._alpha;\r\n } else if (this._alphaSet) {\r\n context.globalAlpha = this.parent && !this.parent.renderToIntermediateTexture ? this.parent.alpha * this._alpha : this._alpha;\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _layout(parentMeasure: Measure, context: ICanvasRenderingContext): boolean {\r\n if (!this.isDirty && (!this.isVisible || this.notRenderable)) {\r\n return false;\r\n }\r\n\r\n if (this._isDirty || !this._cachedParentMeasure.isEqualsTo(parentMeasure)) {\r\n this.host._numLayoutCalls++;\r\n\r\n this._currentMeasure.addAndTransformToRef(\r\n this._transformMatrix,\r\n -this._paddingLeftInPixels | 0,\r\n -this._paddingTopInPixels | 0,\r\n this._paddingRightInPixels | 0,\r\n this._paddingBottomInPixels | 0,\r\n this._prevCurrentMeasureTransformedIntoGlobalSpace\r\n );\r\n\r\n context.save();\r\n\r\n this._applyStates(context);\r\n\r\n let rebuildCount = 0;\r\n do {\r\n this._rebuildLayout = false;\r\n this._processMeasures(parentMeasure, context);\r\n rebuildCount++;\r\n } while (this._rebuildLayout && rebuildCount < 3);\r\n\r\n if (rebuildCount >= 3) {\r\n Logger.Error(`Layout cycle detected in GUI (Control name=${this.name}, uniqueId=${this.uniqueId})`);\r\n }\r\n\r\n context.restore();\r\n this.invalidateRect();\r\n this._evaluateClippingState(parentMeasure);\r\n }\r\n\r\n this._wasDirty = this._isDirty;\r\n this._isDirty = false;\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n protected _processMeasures(parentMeasure: Measure, context: ICanvasRenderingContext): void {\r\n this._tempPaddingMeasure.copyFrom(parentMeasure);\r\n\r\n // Apply padding if in correct mode\r\n if (this.parent && this.parent.descendantsOnlyPadding) {\r\n this._tempPaddingMeasure.left += this.parent.paddingLeftInPixels;\r\n this._tempPaddingMeasure.top += this.parent.paddingTopInPixels;\r\n this._tempPaddingMeasure.width -= this.parent.paddingLeftInPixels + this.parent.paddingRightInPixels;\r\n this._tempPaddingMeasure.height -= this.parent.paddingTopInPixels + this.parent.paddingBottomInPixels;\r\n }\r\n\r\n this._currentMeasure.copyFrom(this._tempPaddingMeasure);\r\n\r\n // Let children take some pre-measurement actions\r\n this._preMeasure(this._tempPaddingMeasure, context);\r\n\r\n this._measure();\r\n\r\n // Let children take some post-measurement actions\r\n this._postMeasure(this._tempPaddingMeasure, context);\r\n\r\n this._computeAlignment(this._tempPaddingMeasure, context);\r\n\r\n // Convert to int values\r\n this._currentMeasure.left = this._currentMeasure.left | 0;\r\n this._currentMeasure.top = this._currentMeasure.top | 0;\r\n this._currentMeasure.width = this._currentMeasure.width | 0;\r\n this._currentMeasure.height = this._currentMeasure.height | 0;\r\n\r\n // Let children add more features\r\n this._additionalProcessing(this._tempPaddingMeasure, context);\r\n\r\n this._cachedParentMeasure.copyFrom(this._tempPaddingMeasure);\r\n\r\n this._currentMeasure.transformToRef(this._transformMatrix, this._evaluatedMeasure);\r\n if (this.onDirtyObservable.hasObservers()) {\r\n this.onDirtyObservable.notifyObservers(this);\r\n }\r\n }\r\n\r\n protected _evaluateClippingState(parentMeasure: Measure) {\r\n // Since transformMatrix is used here, we need to have it freshly computed\r\n this._transform();\r\n this._currentMeasure.transformToRef(this._transformMatrix, this._evaluatedMeasure);\r\n if (this.parent && this.parent.clipChildren) {\r\n parentMeasure.transformToRef(this.parent._transformMatrix, this._evaluatedParentMeasure);\r\n // Early clip\r\n if (this._evaluatedMeasure.left > this._evaluatedParentMeasure.left + this._evaluatedParentMeasure.width) {\r\n this._isClipped = true;\r\n return;\r\n }\r\n\r\n if (this._evaluatedMeasure.left + this._evaluatedMeasure.width < this._evaluatedParentMeasure.left) {\r\n this._isClipped = true;\r\n return;\r\n }\r\n\r\n if (this._evaluatedMeasure.top > this._evaluatedParentMeasure.top + this._evaluatedParentMeasure.height) {\r\n this._isClipped = true;\r\n return;\r\n }\r\n\r\n if (this._evaluatedMeasure.top + this._evaluatedMeasure.height < this._evaluatedParentMeasure.top) {\r\n this._isClipped = true;\r\n return;\r\n }\r\n }\r\n\r\n this._isClipped = false;\r\n }\r\n\r\n /** @internal */\r\n public _measure(): void {\r\n // Width / Height\r\n if (this._width.isPixel) {\r\n this._currentMeasure.width = this._width.getValue(this._host);\r\n } else {\r\n this._currentMeasure.width *= this._width.getValue(this._host);\r\n }\r\n\r\n if (this._height.isPixel) {\r\n this._currentMeasure.height = this._height.getValue(this._host);\r\n } else {\r\n this._currentMeasure.height *= this._height.getValue(this._host);\r\n }\r\n\r\n if (this._fixedRatio !== 0) {\r\n if (this._fixedRatioMasterIsWidth) {\r\n this._currentMeasure.height = this._currentMeasure.width * this._fixedRatio;\r\n } else {\r\n this._currentMeasure.width = this._currentMeasure.height * this._fixedRatio;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n protected _computeAlignment(parentMeasure: Measure, context: ICanvasRenderingContext): void {\r\n const width = this._currentMeasure.width;\r\n const height = this._currentMeasure.height;\r\n\r\n const parentWidth = parentMeasure.width;\r\n const parentHeight = parentMeasure.height;\r\n\r\n // Left / top\r\n let x = 0;\r\n let y = 0;\r\n\r\n switch (this.horizontalAlignment) {\r\n case Control.HORIZONTAL_ALIGNMENT_LEFT:\r\n x = 0;\r\n break;\r\n case Control.HORIZONTAL_ALIGNMENT_RIGHT:\r\n x = parentWidth - width;\r\n break;\r\n case Control.HORIZONTAL_ALIGNMENT_CENTER:\r\n x = (parentWidth - width) / 2;\r\n break;\r\n }\r\n\r\n switch (this.verticalAlignment) {\r\n case Control.VERTICAL_ALIGNMENT_TOP:\r\n y = 0;\r\n break;\r\n case Control.VERTICAL_ALIGNMENT_BOTTOM:\r\n y = parentHeight - height;\r\n break;\r\n case Control.VERTICAL_ALIGNMENT_CENTER:\r\n y = (parentHeight - height) / 2;\r\n break;\r\n }\r\n\r\n if (!this.descendantsOnlyPadding) {\r\n if (this._paddingLeft.isPixel) {\r\n this._currentMeasure.left += this._paddingLeft.getValue(this._host);\r\n this._currentMeasure.width -= this._paddingLeft.getValue(this._host);\r\n } else {\r\n this._currentMeasure.left += parentWidth * this._paddingLeft.getValue(this._host);\r\n this._currentMeasure.width -= parentWidth * this._paddingLeft.getValue(this._host);\r\n }\r\n\r\n if (this._paddingRight.isPixel) {\r\n this._currentMeasure.width -= this._paddingRight.getValue(this._host);\r\n } else {\r\n this._currentMeasure.width -= parentWidth * this._paddingRight.getValue(this._host);\r\n }\r\n\r\n if (this._paddingTop.isPixel) {\r\n this._currentMeasure.top += this._paddingTop.getValue(this._host);\r\n this._currentMeasure.height -= this._paddingTop.getValue(this._host);\r\n } else {\r\n this._currentMeasure.top += parentHeight * this._paddingTop.getValue(this._host);\r\n this._currentMeasure.height -= parentHeight * this._paddingTop.getValue(this._host);\r\n }\r\n\r\n if (this._paddingBottom.isPixel) {\r\n this._currentMeasure.height -= this._paddingBottom.getValue(this._host);\r\n } else {\r\n this._currentMeasure.height -= parentHeight * this._paddingBottom.getValue(this._host);\r\n }\r\n }\r\n\r\n if (this._left.isPixel) {\r\n this._currentMeasure.left += this._left.getValue(this._host);\r\n } else {\r\n this._currentMeasure.left += parentWidth * this._left.getValue(this._host);\r\n }\r\n\r\n if (this._top.isPixel) {\r\n this._currentMeasure.top += this._top.getValue(this._host);\r\n } else {\r\n this._currentMeasure.top += parentHeight * this._top.getValue(this._host);\r\n }\r\n\r\n this._currentMeasure.left += x;\r\n this._currentMeasure.top += y;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n protected _preMeasure(parentMeasure: Measure, context: ICanvasRenderingContext): void {\r\n // Do nothing\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n protected _postMeasure(parentMeasure: Measure, context: ICanvasRenderingContext): void {\r\n // Do nothing\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n protected _additionalProcessing(parentMeasure: Measure, context: ICanvasRenderingContext): void {\r\n // Do nothing\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n protected _clipForChildren(context: ICanvasRenderingContext): void {\r\n // DO nothing\r\n }\r\n\r\n private static _ClipMeasure = new Measure(0, 0, 0, 0);\r\n private _tmpMeasureA = new Measure(0, 0, 0, 0);\r\n private _clip(context: ICanvasRenderingContext, invalidatedRectangle?: Nullable<Measure>) {\r\n context.beginPath();\r\n Control._ClipMeasure.copyFrom(this._currentMeasure);\r\n if (invalidatedRectangle) {\r\n // Rotate the invalidated rect into the control's space\r\n invalidatedRectangle.transformToRef(this._invertTransformMatrix, this._tmpMeasureA);\r\n\r\n // Get the intersection of the rect in context space and the current context\r\n const intersection = new Measure(0, 0, 0, 0);\r\n intersection.left = Math.max(this._tmpMeasureA.left, this._currentMeasure.left);\r\n intersection.top = Math.max(this._tmpMeasureA.top, this._currentMeasure.top);\r\n intersection.width = Math.min(this._tmpMeasureA.left + this._tmpMeasureA.width, this._currentMeasure.left + this._currentMeasure.width) - intersection.left;\r\n intersection.height = Math.min(this._tmpMeasureA.top + this._tmpMeasureA.height, this._currentMeasure.top + this._currentMeasure.height) - intersection.top;\r\n Control._ClipMeasure.copyFrom(intersection);\r\n }\r\n\r\n if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {\r\n const shadowOffsetX = this.shadowOffsetX;\r\n const shadowOffsetY = this.shadowOffsetY;\r\n const shadowBlur = this.shadowBlur;\r\n\r\n const leftShadowOffset = Math.min(Math.min(shadowOffsetX, 0) - shadowBlur * 2, 0);\r\n const rightShadowOffset = Math.max(Math.max(shadowOffsetX, 0) + shadowBlur * 2, 0);\r\n const topShadowOffset = Math.min(Math.min(shadowOffsetY, 0) - shadowBlur * 2, 0);\r\n const bottomShadowOffset = Math.max(Math.max(shadowOffsetY, 0) + shadowBlur * 2, 0);\r\n\r\n context.rect(\r\n Control._ClipMeasure.left + leftShadowOffset,\r\n Control._ClipMeasure.top + topShadowOffset,\r\n Control._ClipMeasure.width + rightShadowOffset - leftShadowOffset,\r\n Control._ClipMeasure.height + bottomShadowOffset - topShadowOffset\r\n );\r\n } else {\r\n context.rect(Control._ClipMeasure.left, Control._ClipMeasure.top, Control._ClipMeasure.width, Control._ClipMeasure.height);\r\n }\r\n\r\n context.clip();\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _render(context: ICanvasRenderingContext, invalidatedRectangle?: Nullable<Measure>): boolean {\r\n if (!this.isVisible || this.notRenderable || this._isClipped) {\r\n this._isDirty = false;\r\n return false;\r\n }\r\n\r\n this.host._numRenderCalls++;\r\n\r\n context.save();\r\n\r\n this._applyStates(context);\r\n\r\n // Transform\r\n this._transform(context);\r\n\r\n // Clip\r\n if (this.clipContent) {\r\n this._clip(context, invalidatedRectangle);\r\n }\r\n\r\n if (this.onBeforeDrawObservable.hasObservers()) {\r\n this.onBeforeDrawObservable.notifyObservers(this);\r\n }\r\n\r\n if (this.useBitmapCache && !this._wasDirty && this._cacheData) {\r\n context.putImageData(this._cacheData, this._currentMeasure.left, this._currentMeasure.top);\r\n } else {\r\n this._draw(context, invalidatedRectangle);\r\n }\r\n\r\n if (this.useBitmapCache && this._wasDirty) {\r\n this._cacheData = context.getImageData(this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);\r\n }\r\n\r\n this._renderHighlight(context);\r\n\r\n if (this.onAfterDrawObservable.hasObservers()) {\r\n this.onAfterDrawObservable.notifyObservers(this);\r\n }\r\n\r\n context.restore();\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _draw(context: ICanvasRenderingContext, invalidatedRectangle?: Nullable<Measure>): void {\r\n // Do nothing\r\n }\r\n\r\n /**\r\n * Tests if a given coordinates belong to the current control\r\n * @param x defines x coordinate to test\r\n * @param y defines y coordinate to test\r\n * @returns true if the coordinates are inside the control\r\n */\r\n public contains(x: number, y: number): boolean {\r\n // Invert transform\r\n this._invertTransformMatrix.transformCoordinates(x, y, this._transformedPosition);\r\n\r\n x = this._transformedPosition.x;\r\n y = this._transformedPosition.y;\r\n\r\n // Check\r\n if (x < this._currentMeasure.left) {\r\n return false;\r\n }\r\n\r\n if (x > this._currentMeasure.left + this._currentMeasure.width) {\r\n return false;\r\n }\r\n\r\n if (y < this._currentMeasure.top) {\r\n return false;\r\n }\r\n\r\n if (y > this._currentMeasure.top + this._currentMeasure.height) {\r\n return false;\r\n }\r\n\r\n if (this.isPointerBlocker) {\r\n this._host._shouldBlockPointer = true;\r\n }\r\n return true;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _processPicking(x: number, y: number, pi: Nullable<PointerInfoBase>, type: number, pointerId: number, buttonIndex: number, deltaX?: number, deltaY?: number): boolean {\r\n if (!this._isEnabled) {\r\n return false;\r\n }\r\n if (!this.isHitTestVisible || !this.isVisible || this._doNotRender) {\r\n return false;\r\n }\r\n\r\n if (!this.contains(x, y)) {\r\n return false;\r\n }\r\n\r\n this._processObservables(type, x, y, pi, pointerId, buttonIndex, deltaX, deltaY);\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _onPointerMove(target: Control, coordinates: Vector2, pointerId: number, pi: Nullable<PointerInfoBase>): void {\r\n const canNotify: boolean = this.onPointerMoveObservable.notifyObservers(coordinates, -1, target, this, pi);\r\n\r\n if (canNotify && this.parent != null && !this.isPointerBlocker) {\r\n this.parent._onPointerMove(target, coordinates, pointerId, pi);\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _onPointerEnter(target: Control, pi: Nullable<PointerInfoBase>): boolean {\r\n if (!this._isEnabled) {\r\n return false;\r\n }\r\n if (this._enterCount > 0) {\r\n return false;\r\n }\r\n\r\n if (this._enterCount === -1) {\r\n // -1 is for touch input, we are now sure we are with a mouse or pencil\r\n this._enterCount = 0;\r\n }\r\n this._enterCount++;\r\n\r\n const canNotify: boolean = this.onPointerEnterObservable.notifyObservers(this, -1, target, this, pi);\r\n\r\n if (canNotify && this.parent != null && !this.isPointerBlocker) {\r\n this.parent._onPointerEnter(target, pi);\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _onPointerOut(target: Control, pi: Nullable<PointerInfoBase>, force = false): void {\r\n if (!force && (!this._isEnabled || target === this)) {\r\n return;\r\n }\r\n this._enterCount = 0;\r\n\r\n let canNotify: boolean = true;\r\n\r\n if (!target.isAscendant(this)) {\r\n canNotify = this.onPointerOutObservable.notifyObservers(this, -1, target, this, pi);\r\n }\r\n\r\n if (canNotify && this.parent != null && !this.isPointerBlocker) {\r\n this.parent._onPointerOut(target, pi, force);\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _onPointerDown(target: Control, coordinates: Vector2, pointerId: number, buttonIndex: number, pi: Nullable<PointerInfoBase>): boolean {\r\n // Prevent pointerout to lose control context.\r\n // Event redundancy is checked inside the function.\r\n this._onPointerEnter(this, pi);\r\n\r\n if (this._downCount !== 0) {\r\n return false;\r\n }\r\n\r\n this._downCount++;\r\n\r\n this._downPointerIds[pointerId] = true;\r\n\r\n const canNotify: boolean = this.onPointerDownObservable.notifyObservers(new Vector2WithInfo(coordinates, buttonIndex), -1, target, this, pi);\r\n\r\n if (canNotify && this.parent != null && !this.isPointerBlocker) {\r\n this.parent._onPointerDown(target, coordinates, pointerId, buttonIndex, pi);\r\n }\r\n\r\n if (pi && this.uniqueId !== this._host.rootContainer.uniqueId) {\r\n this._host._capturedPointerIds.add((pi.event as IPointerEvent).pointerId);\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _onPointerUp(target: Control, coordinates: Vector2, pointerId: number, buttonIndex: number, notifyClick: boolean, pi?: Nullable<PointerInfoBase>): void {\r\n if (!this._isEnabled) {\r\n return;\r\n }\r\n this._downCount = 0;\r\n\r\n delete this._downPointerIds[pointerId];\r\n\r\n let canNotifyClick: boolean = notifyClick;\r\n if (notifyClick && (this._enterCount > 0 || this._enterCount === -1)) {\r\n canNotifyClick = this.onPointerClickObservable.notifyObservers(new Vector2WithInfo(coordinates, buttonIndex), -1, target, this, pi);\r\n }\r\n const canNotify: boolean = this.onPointerUpObservable.notifyObservers(new Vector2WithInfo(coordinates, buttonIndex), -1, target, this, pi);\r\n\r\n if (canNotify && this.parent != null && !this.isPointerBlocker) {\r\n this.parent._onPointerUp(target, coordinates, pointerId, buttonIndex, canNotifyClick, pi);\r\n }\r\n\r\n if (pi && this.uniqueId !== this._host.rootContainer.uniqueId) {\r\n this._host._capturedPointerIds.delete((pi.event as IPointerEvent).pointerId);\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _forcePointerUp(pointerId: Nullable<number> = null) {\r\n if (pointerId !== null) {\r\n this._onPointerUp(this, Vector2.Zero(), pointerId, 0, true);\r\n } else {\r\n for (const key in this._downPointerIds) {\r\n this._onPointerUp(this, Vector2.Zero(), +key as number, 0, true);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _onWheelScroll(deltaX?: number, deltaY?: number): void {\r\n if (!this._isEnabled) {\r\n return;\r\n }\r\n const canNotify: boolean = this.onWheelObservable.notifyObservers(new Vector2(deltaX, deltaY));\r\n\r\n if (canNotify && this.parent != null) {\r\n this.parent._onWheelScroll(deltaX, deltaY);\r\n }\r\n }\r\n\r\n /** @internal */\r\n public _onCanvasBlur(): void {}\r\n\r\n /**\r\n * @internal\r\n */\r\n public _processObservables(\r\n type: number,\r\n x: number,\r\n y: number,\r\n pi: Nullable<PointerInfoBase>,\r\n pointerId: number,\r\n buttonIndex: number,\r\n deltaX?: number,\r\n deltaY?: number\r\n ): boolean {\r\n if (!this._isEnabled) {\r\n return false;\r\n }\r\n this._dummyVector2.copyFromFloats(x, y);\r\n if (type === PointerEventTypes.POINTERMOVE) {\r\n this._onPointerMove(this, this._dummyVector2, pointerId, pi);\r\n\r\n const previousControlOver = this._host._lastControlOver[pointerId];\r\n if (previousControlOver && previousControlOver !== this) {\r\n previousControlOver._onPointerOut(this, pi);\r\n }\r\n\r\n if (previousControlOver !== this) {\r\n this._onPointerEnter(this, pi);\r\n }\r\n\r\n this._host._lastControlOver[pointerId] = this;\r\n return true;\r\n }\r\n\r\n if (type === PointerEventTypes.POINTERDOWN) {\r\n this._onPointerDown(this, this._dummyVector2, pointerId, buttonIndex, pi);\r\n this._host._registerLastControlDown(this, pointerId);\r\n this._host._lastPickedControl = this;\r\n return true;\r\n }\r\n\r\n if (type === PointerEventTypes.POINTERUP) {\r\n if (this._host._lastControlDown[pointerId]) {\r\n this._host._lastControlDown[pointerId]._onPointerUp(this, this._dummyVector2, pointerId, buttonIndex, true, pi);\r\n }\r\n delete this._host._lastControlDown[pointerId];\r\n return true;\r\n }\r\n\r\n if (type === PointerEventTypes.POINTERWHEEL) {\r\n if (this._host._lastControlOver[pointerId]) {\r\n this._host._lastControlOver[pointerId]._onWheelScroll(deltaX, deltaY);\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n private _getStyleProperty(propName: \"fontStyle\" | \"fontWeight\" | \"fontFamily\", defaultValue: string): string {\r\n const prop = (this._style && this._style[propName]) ?? this[propName];\r\n if (!prop && this.parent) {\r\n return this.parent._getStyleProperty(propName, defaultValue);\r\n } else if (!this.parent) {\r\n return defaultValue;\r\n } else {\r\n return prop;\r\n }\r\n }\r\n\r\n private _prepareFont() {\r\n if (!this._font && !this._fontSet) {\r\n return;\r\n }\r\n\r\n this._font =\r\n this._getStyleProperty(\"fontStyle\", \"\") +\r\n \" \" +\r\n this._getStyleProperty(\"fontWeight\", \"\") +\r\n \" \" +\r\n this.fontSizeInPixels +\r\n \"px \" +\r\n this._getStyleProperty(\"fontFamily\", \"Arial\");\r\n\r\n this._fontOffset = Control._GetFontOffset(this._font);\r\n\r\n //children need to be refreshed\r\n this.getDescendants().forEach((child) => child._markAllAsDirty());\r\n }\r\n\r\n /**\r\n * A control has a dimension fully defined if that dimension doesn't depend on the parent's dimension.\r\n * As an example, a control that has dimensions in pixels is fully defined, while in percentage is not fully defined.\r\n * @param dim the dimension to check (width or height)\r\n * @returns if the dimension is fully defined\r\n */\r\n public isDimensionFullyDefined(dim: \"width\" | \"height\"): boolean {\r\n return this.getDimension(dim).isPixel;\r\n }\r\n\r\n /**\r\n * Gets the dimension of the control along a specified axis\r\n * @param dim the dimension to retrieve (width or height)\r\n * @returns the dimension value along the specified axis\r\n */\r\n public getDimension(dim: \"width\" | \"height\"): ValueAndUnit {\r\n if (dim === \"width\") {\r\n return this._width;\r\n } else {\r\n return this._height;\r\n }\r\n }\r\n\r\n /**\r\n * Clones a control and its descendants\r\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\r\n * @returns the cloned control\r\n */\r\n public clone(host?: AdvancedDynamicTexture): Control {\r\n const serialization: any = {};\r\n this.serialize(serialization, true);\r\n\r\n const controlType = Tools.Instantiate(\"BABYLON.GUI.\" + serialization.className);\r\n const cloned = new controlType();\r\n cloned.parse(serialization, host);\r\n\r\n return cloned;\r\n }\r\n\r\n /**\r\n * Parses a serialized object into this control\r\n * @param serializedObject the object with the serialized properties\r\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\r\n * @returns this control\r\n */\r\n public parse(serializedObject: any, host?: AdvancedDynamicTexture): Control {\r\n SerializationHelper.Parse(() => this, serializedObject, null);\r\n\r\n this.name = serializedObject.name;\r\n\r\n this._parseFromContent(serializedObject, host ?? this._host);\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Serializes the current control\r\n * @param serializationObject defined the JSON serialized object\r\n * @param force if the control should be serialized even if the isSerializable flag is set to false (default false)\r\n */\r\n public serialize(serializationObject: any, force: boolean = false) {\r\n if (!this.isSerializable && !force) {\r\n return;\r\n }\r\n SerializationHelper.Serialize(this, serializationObject);\r\n serializationObject.name = this.name;\r\n serializationObject.className = this.getClassName();\r\n\r\n // Call prepareFont to guarantee the font is properly set before serializing\r\n this._prepareFont();\r\n if (this._font) {\r\n serializationObject.fontFamily = this._fontFamily;\r\n serializationObject.fontSize = this.fontSize;\r\n serializationObject.fontWeight = this.fontWeight;\r\n serializationObject.fontStyle = this.fontStyle;\r\n }\r\n\r\n if (this._gradient) {\r\n serializationObject.gradient = {};\r\n this._gradient.serialize(serializationObject.gradient);\r\n }\r\n\r\n // Animations\r\n SerializationHelper.AppendSerializedAnimations(this, serializationObject);\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _parseFromContent(serializedObject: any, host: AdvancedDynamicTexture) {\r\n if (serializedObject.fontFamily) {\r\n this.fontFamily = serializedObject.fontFamily;\r\n }\r\n\r\n if (serializedObject.fontSize) {\r\n this.fontSize = serializedObject.fontSize;\r\n }\r\n\r\n if (serializedObject.fontWeight) {\r\n this.fontWeight = serializedObject.fontWeight;\r\n }\r\n\r\n if (serializedObject.fontStyle) {\r\n this.fontStyle = serializedObject.fontStyle;\r\n }\r\n\r\n // Gradient\r\n if (serializedObject.gradient) {\r\n const className = Tools.Instantiate(\"BABYLON.GUI.\" + serializedObject.gradient.className);\r\n this._gradient = new className();\r\n this._gradient?.parse(serializedObject.gradient);\r\n }\r\n\r\n // Animations\r\n if (serializedObject.animations) {\r\n this.animations = [];\r\n for (let animationIndex = 0; animationIndex < serializedObject.animations.length; animationIndex++) {\r\n const parsedAnimation = serializedObject.animations[animationIndex];\r\n const internalClass = GetClass(\"BABYLON.Animation\");\r\n if (internalClass) {\r\n this.animations.push(internalClass.Parse(parsedAnimation));\r\n }\r\n }\r\n\r\n if (serializedObject.autoAnimate && this._host && this._host.getScene()) {\r\n this._host\r\n .getScene()!\r\n .beginAnimation(\r\n this,\r\n serializedObject.autoAnimateFrom,\r\n serializedObject.autoAnimateTo,\r\n serializedObject.autoAnimateLoop,\r\n serializedObject.autoAnimateSpeed || 1.0\r\n );\r\n }\r\n }\r\n\r\n this.fixedRatioMasterIsWidth = serializedObject.fixedRatioMasterIsWidth ?? this.fixedRatioMasterIsWidth;\r\n }\r\n\r\n /** Releases associated resources */\r\n public dispose() {\r\n this.onDirtyObservable.clear();\r\n this.onBeforeDrawObservable.clear();\r\n this.onAfterDrawObservable.clear();\r\n this.onPointerDownObservable.clear();\r\n this.onPointerEnterObservable.clear();\r\n this.onPointerMoveObservable.clear();\r\n this.onPointerOutObservable.clear();\r\n this.onPointerUpObservable.clear();\r\n this.onPointerClickObservable.clear();\r\n this.onWheelObservable.clear();\r\n\r\n if (this._styleObserver && this._style) {\r\n this._style.onChangedObservable.remove(this._styleObserver);\r\n this._styleObserver = null;\r\n }\r\n\r\n if (this.parent) {\r\n this.parent.removeControl(this);\r\n this.parent = null;\r\n }\r\n\r\n if (this._host) {\r\n const index = this._host._linkedControls.indexOf(this);\r\n if (index > -1) {\r\n this.linkWithMesh(null);\r\n }\r\n }\r\n\r\n // Callback\r\n this.onDisposeObservable.notifyObservers(this);\r\n this.onDisposeObservable.clear();\r\n }\r\n\r\n // Statics\r\n private static _HORIZONTAL_ALIGNMENT_LEFT = 0;\r\n private static _HORIZONTAL_ALIGNMENT_RIGHT = 1;\r\n private static _HORIZONTAL_ALIGNMENT_CENTER = 2;\r\n\r\n private static _VERTICAL_ALIGNMENT_TOP = 0;\r\n private static _VERTICAL_ALIGNMENT_BOTTOM = 1;\r\n private static _VERTICAL_ALIGNMENT_CENTER = 2;\r\n\r\n /** HORIZONTAL_ALIGNMENT_LEFT */\r\n public static get HORIZONTAL_ALIGNMENT_LEFT(): number {\r\n return Control._HORIZONTAL_ALIGNMENT_LEFT;\r\n }\r\n\r\n /** HORIZONTAL_ALIGNMENT_RIGHT */\r\n public static get HORIZONTAL_ALIGNMENT_RIGHT(): number {\r\n return Control._HORIZONTAL_ALIGNMENT_RIGHT;\r\n }\r\n\r\n /** HORIZONTAL_ALIGNMENT_CENTER */\r\n public static get HORIZONTAL_ALIGNMENT_CENTER(): number {\r\n return Control._HORIZONTAL_ALIGNMENT_CENTER;\r\n }\r\n\r\n /** VERTICAL_ALIGNMENT_TOP */\r\n public static get VERTICAL_ALIGNMENT_TOP(): number {\r\n return Control._VERTICAL_ALIGNMENT_TOP;\r\n }\r\n\r\n /** VERTICAL_ALIGNMENT_BOTTOM */\r\n public static get VERTICAL_ALIGNMENT_BOTTOM(): number {\r\n return Control._VERTICAL_ALIGNMENT_BOTTOM;\r\n }\r\n\r\n /** VERTICAL_ALIGNMENT_CENTER */\r\n public static get VERTICAL_ALIGNMENT_CENTER(): number {\r\n return Control._VERTICAL_ALIGNMENT_CENTER;\r\n }\r\n\r\n private static _FontHeightSizes: { [key: string]: { ascent: number; height: number; descent: number } } = {};\r\n\r\n /**\r\n * @internal\r\n */\r\n public static _GetFontOffset(font: string): { ascent: number; height: number; descent: number } {\r\n if (Control._FontHeightSizes[font]) {\r\n return Control._FontHeightSizes[font];\r\n }\r\n\r\n const engine = EngineStore.LastCreatedEngine;\r\n if (!engine) {\r\n throw new Error(\"Invalid engine. Unable to create a canvas.\");\r\n }\r\n\r\n const result = engine.getFontOffset(font);\r\n Control._FontHeightSizes[font] = result;\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a Control from parsed data\r\n * @param serializedObject defines parsed data\r\n * @param host defines the hosting AdvancedDynamicTexture\r\n * @returns a new Control\r\n */\r\n public static Parse(serializedObject: any, host: AdvancedDynamicTexture): Control {\r\n const controlType = Tools.Instantiate(\"BABYLON.GUI.\" + serializedObject.className);\r\n const control = SerializationHelper.Parse(() => new controlType(), serializedObject, null);\r\n\r\n control.name = serializedObject.name;\r\n\r\n control._parseFromContent(serializedObject, host);\r\n\r\n return control;\r\n }\r\n\r\n public static AddHeader: (control: Control, text: string, size: string | number, options: { isHorizontal: boolean; controlFirst: boolean }) => any = () => {};\r\n\r\n /**\r\n * @internal\r\n */\r\n protected static drawEllipse(x: number, y: number, width: number, height: number, context: ICanvasRenderingContext): void {\r\n context.translate(x, y);\r\n context.scale(width, height);\r\n\r\n context.beginPath();\r\n context.arc(0, 0, 1, 0, 2 * Math.PI);\r\n context.closePath();\r\n\r\n context.scale(1 / width, 1 / height);\r\n context.translate(-x, -y);\r\n }\r\n\r\n /**\r\n * Returns true if the control is ready to be used\r\n * @returns\r\n */\r\n public isReady(): boolean {\r\n // Most controls are ready by default, so the default implementation is to return true\r\n return true;\r\n }\r\n}\r\nRegisterClass(\"BABYLON.GUI.Control\", Control);\r\n"]}
|
1
|
+
{"version":3,"file":"control.js","sourceRoot":"","sources":["../../../../../dev/gui/src/2D/controls/control.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,UAAU,EAAE,2CAA6B;AAClD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,6CAA+B;AAElE,OAAO,EAAE,iBAAiB,EAAE,gDAAkC;AAC9D,OAAO,EAAE,MAAM,EAAE,uCAAyB;AAC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,EAAE;oCAGX;AA8DD;IADC,SAAS,EAAE;oCAGX;AAaD;IADC,SAAS,EAAE;uCAGX;AAaD;IADC,SAAS,EAAE;qCAGX;AAgBD;IADC,SAAS,EAAE;4CAGX;AAaD;IADC,SAAS,EAAE;wCAGX;AA8BD;IADC,SAAS,EAAE;qDAGX;AAgBD;IADC,SAAS,EAAE;0CAGX;AAqCD;IADC,SAAS,EAAE;2CAGX;AAqCD;IADC,SAAS,EAAE;yCAGX;AAqCD;IADC,SAAS,EAAE;4CAGX;AAqCD;IADC,SAAS,EAAE;mCAGX;AA4BD;IADC,SAAS,EAAE;kCAGX;AA4BD;IADC,SAAS,EAAE;0CAGX;AA4BD;IADC,SAAS,EAAE;0CAGX;AAmCD;IADC,SAAS,EAAE;wCAGX;AA6BD;IADC,SAAS,EAAE;4CAGX;AAYD;IADC,SAAS,EAAE;gDAGX;AAkBM;IADN,SAAS,EAAE;6CACiB;AAKtB;IADN,SAAS,EAAE;uDAC2B;AA24C3C,aAAa,CAAC,qBAAqB,EAAE,OAAO,CAAC,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\r\n/* eslint-disable @typescript-eslint/no-unused-vars */\r\nimport type { Nullable } from \"core/types\";\r\nimport type { Observer } from \"core/Misc/observable\";\r\nimport { Observable } from \"core/Misc/observable\";\r\nimport { Vector2, Vector3, Matrix } from \"core/Maths/math.vector\";\r\nimport type { PointerInfoBase } from \"core/Events/pointerEvents\";\r\nimport { PointerEventTypes } from \"core/Events/pointerEvents\";\r\nimport { Logger } from \"core/Misc/logger\";\r\nimport { Tools } from \"core/Misc/tools\";\r\nimport type { TransformNode } from \"core/Meshes/transformNode\";\r\nimport type { Scene } from \"core/scene\";\r\n\r\nimport type { Container } from \"./container\";\r\nimport type { AdvancedDynamicTexture } from \"../advancedDynamicTexture\";\r\nimport { ValueAndUnit } from \"../valueAndUnit\";\r\nimport { Measure } from \"../measure\";\r\nimport type { Style } from \"../style\";\r\nimport { Matrix2D, Vector2WithInfo } from \"../math2D\";\r\nimport { GetClass, RegisterClass } from \"core/Misc/typeStore\";\r\nimport { serialize } from \"core/Misc/decorators\";\r\nimport { SerializationHelper } from \"core/Misc/decorators.serialization\";\r\nimport type { ICanvasGradient, ICanvasRenderingContext } from \"core/Engines/ICanvas\";\r\nimport { EngineStore } from \"core/Engines/engineStore\";\r\nimport type { IAccessibilityTag } from \"core/IAccessibilityTag\";\r\nimport type { IPointerEvent } from \"core/Events/deviceInputEvents\";\r\nimport type { IAnimatable } from \"core/Animations/animatable.interface\";\r\nimport type { Animation } from \"core/Animations/animation\";\r\nimport type { BaseGradient } from \"./gradient/BaseGradient\";\r\n\r\n/**\r\n * Root class used for all 2D controls\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#controls\r\n */\r\nexport class Control implements IAnimatable {\r\n /**\r\n * Gets or sets a boolean indicating if alpha must be an inherited value (false by default)\r\n */\r\n public static AllowAlphaInheritance = false;\r\n\r\n private _alpha = 1;\r\n private _alphaSet = false;\r\n private _zIndex = 0;\r\n /** @internal */\r\n public _host: AdvancedDynamicTexture;\r\n /** Gets or sets the control parent */\r\n public parent: Nullable<Container>;\r\n /** @internal */\r\n public _currentMeasure = Measure.Empty();\r\n /** @internal */\r\n public _tempPaddingMeasure = Measure.Empty();\r\n private _fontFamily = \"\";\r\n private _fontStyle = \"\";\r\n private _fontWeight = \"\";\r\n private _fontSize = new ValueAndUnit(18, ValueAndUnit.UNITMODE_PIXEL, false);\r\n private _font: string;\r\n /** @internal */\r\n public _width = new ValueAndUnit(1, ValueAndUnit.UNITMODE_PERCENTAGE, false);\r\n /** @internal */\r\n public _height = new ValueAndUnit(1, ValueAndUnit.UNITMODE_PERCENTAGE, false);\r\n /** @internal */\r\n protected _fontOffset: { ascent: number; height: number; descent: number };\r\n private _color = \"\";\r\n private _style: Nullable<Style> = null;\r\n private _styleObserver: Nullable<Observer<Style>>;\r\n /** @internal */\r\n protected _horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_CENTER;\r\n /** @internal */\r\n protected _verticalAlignment = Control.VERTICAL_ALIGNMENT_CENTER;\r\n /** @internal */\r\n protected _isDirty = true;\r\n /** @internal */\r\n protected _wasDirty = false;\r\n /** @internal */\r\n public _tempParentMeasure = Measure.Empty();\r\n /** @internal */\r\n public _prevCurrentMeasureTransformedIntoGlobalSpace = Measure.Empty();\r\n /** @internal */\r\n public _cachedParentMeasure = Measure.Empty();\r\n private _descendantsOnlyPadding = false;\r\n private _paddingLeft = new ValueAndUnit(0);\r\n private _paddingRight = new ValueAndUnit(0);\r\n private _paddingTop = new ValueAndUnit(0);\r\n private _paddingBottom = new ValueAndUnit(0);\r\n /** @internal */\r\n public _left = new ValueAndUnit(0);\r\n /** @internal */\r\n public _top = new ValueAndUnit(0);\r\n private _scaleX = 1.0;\r\n private _scaleY = 1.0;\r\n private _rotation = 0;\r\n private _transformCenterX = 0.5;\r\n private _transformCenterY = 0.5;\r\n /** @internal */\r\n public _transformMatrix = Matrix2D.Identity();\r\n /** @internal */\r\n protected _invertTransformMatrix = Matrix2D.Identity();\r\n /** @internal */\r\n protected _transformedPosition = Vector2.Zero();\r\n private _isMatrixDirty = true;\r\n private _cachedOffsetX: number;\r\n private _cachedOffsetY: number;\r\n private _isVisible = true;\r\n private _isHighlighted = false;\r\n private _highlightColor = \"#4affff\";\r\n protected _highlightLineWidth = 2;\r\n /** @internal */\r\n public _linkedMesh: Nullable<TransformNode>;\r\n private _fontSet = false;\r\n private _dummyVector2 = Vector2.Zero();\r\n private _downCount = 0;\r\n private _enterCount = -1;\r\n private _doNotRender = false;\r\n private _downPointerIds: { [id: number]: boolean } = {};\r\n private _evaluatedMeasure = new Measure(0, 0, 0, 0);\r\n private _evaluatedParentMeasure = new Measure(0, 0, 0, 0);\r\n protected _isEnabled = true;\r\n protected _disabledColor = \"#9a9a9a\";\r\n protected _disabledColorItem = \"#6a6a6a\";\r\n protected _isReadOnly = false;\r\n private _gradient: Nullable<BaseGradient> = null;\r\n /** @internal */\r\n protected _rebuildLayout = false;\r\n\r\n /**\r\n * Observable that fires when the control's enabled state changes\r\n */\r\n public onEnabledStateChangedObservable = new Observable<boolean>();\r\n\r\n /** @internal */\r\n public _customData: any = {};\r\n\r\n /** @internal */\r\n public _isClipped = false;\r\n\r\n /** @internal */\r\n public _automaticSize = false;\r\n\r\n /** @internal */\r\n public _tag: any;\r\n\r\n /**\r\n * Gets or sets the unique id of the node. Please note that this number will be updated when the control is added to a container\r\n */\r\n public uniqueId: number;\r\n\r\n /**\r\n * Gets or sets a boolean indicating if the control is readonly (default: false).\r\n * A readonly control will still raise pointer events but will not react to them\r\n */\r\n public get isReadOnly() {\r\n return this._isReadOnly;\r\n }\r\n\r\n public set isReadOnly(value: boolean) {\r\n this._isReadOnly = value;\r\n }\r\n\r\n /**\r\n * Gets the transformed measure, that is the bounding box of the control after applying all transformations\r\n */\r\n public get transformedMeasure(): Measure {\r\n return this._evaluatedMeasure;\r\n }\r\n\r\n /**\r\n * Gets or sets an object used to store user defined information for the node\r\n */\r\n @serialize()\r\n public metadata: any = null;\r\n\r\n /** Gets or sets a boolean indicating if the control can be hit with pointer events */\r\n @serialize()\r\n public isHitTestVisible = true;\r\n /** Gets or sets a boolean indicating if the control can block pointer events. False by default except on the following controls:\r\n * * Button controls (Button, RadioButton, ToggleButton)\r\n * * Checkbox\r\n * * ColorPicker\r\n * * InputText\r\n * * Slider\r\n */\r\n @serialize()\r\n public isPointerBlocker = false;\r\n /** Gets or sets a boolean indicating if the control can be focusable */\r\n @serialize()\r\n public isFocusInvisible = false;\r\n\r\n protected _clipChildren = true;\r\n /**\r\n * Sets/Gets a boolean indicating if the children are clipped to the current control bounds.\r\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\r\n */\r\n public set clipChildren(value: boolean) {\r\n this._clipChildren = value;\r\n }\r\n\r\n @serialize()\r\n public get clipChildren() {\r\n return this._clipChildren;\r\n }\r\n\r\n protected _clipContent = true;\r\n /**\r\n * Sets/Gets a boolean indicating that control content must be clipped\r\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\r\n */\r\n public set clipContent(value: boolean) {\r\n this._clipContent = value;\r\n }\r\n\r\n @serialize()\r\n public get clipContent() {\r\n return this._clipContent;\r\n }\r\n\r\n /**\r\n * Gets or sets a boolean indicating that the current control should cache its rendering (useful when the control does not change often)\r\n */\r\n @serialize()\r\n public useBitmapCache = false;\r\n\r\n private _cacheData: Nullable<ImageData>;\r\n\r\n private _shadowOffsetX = 0;\r\n /** Gets or sets a value indicating the offset to apply on X axis to render the shadow */\r\n @serialize()\r\n public get shadowOffsetX() {\r\n return this._shadowOffsetX;\r\n }\r\n\r\n public set shadowOffsetX(value: number) {\r\n if (this._shadowOffsetX === value) {\r\n return;\r\n }\r\n\r\n this._shadowOffsetX = value;\r\n this._markAsDirty();\r\n }\r\n\r\n private _shadowOffsetY = 0;\r\n /** Gets or sets a value indicating the offset to apply on Y axis to render the shadow */\r\n @serialize()\r\n public get shadowOffsetY() {\r\n return this._shadowOffsetY;\r\n }\r\n\r\n public set shadowOffsetY(value: number) {\r\n if (this._shadowOffsetY === value) {\r\n return;\r\n }\r\n\r\n this._shadowOffsetY = value;\r\n this._markAsDirty();\r\n }\r\n\r\n private _shadowBlur = 0;\r\n private _previousShadowBlur = 0;\r\n /** Gets or sets a value indicating the amount of blur to use to render the shadow */\r\n @serialize()\r\n public get shadowBlur() {\r\n return this._shadowBlur;\r\n }\r\n\r\n public set shadowBlur(value: number) {\r\n if (this._shadowBlur === value) {\r\n return;\r\n }\r\n\r\n this._previousShadowBlur = this._shadowBlur;\r\n\r\n this._shadowBlur = value;\r\n this._markAsDirty();\r\n }\r\n\r\n private _shadowColor = \"black\";\r\n /** Gets or sets a value indicating the color of the shadow (black by default ie. \"#000\") */\r\n @serialize()\r\n public get shadowColor() {\r\n return this._shadowColor;\r\n }\r\n\r\n public set shadowColor(value: string) {\r\n if (this._shadowColor === value) {\r\n return;\r\n }\r\n\r\n this._shadowColor = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /** Gets or sets the cursor to use when the control is hovered */\r\n @serialize()\r\n public hoverCursor = \"\";\r\n\r\n /** @internal */\r\n protected _linkOffsetX = new ValueAndUnit(0);\r\n /** @internal */\r\n protected _linkOffsetY = new ValueAndUnit(0);\r\n\r\n // Properties\r\n\r\n /** Gets the control type name */\r\n public get typeName(): string {\r\n return this._getTypeName();\r\n }\r\n\r\n /**\r\n * Get the current class name of the control.\r\n * @returns current class name\r\n */\r\n public getClassName(): string {\r\n return this._getTypeName();\r\n }\r\n\r\n /**\r\n * Gets or sets the accessibility tag to describe the control for accessibility purpose.\r\n * By default, GUI controls already indicate accessibility info, but one can override the info using this tag.\r\n */\r\n public set accessibilityTag(value: Nullable<IAccessibilityTag>) {\r\n this._accessibilityTag = value;\r\n this.onAccessibilityTagChangedObservable.notifyObservers(value);\r\n }\r\n\r\n public get accessibilityTag() {\r\n return this._accessibilityTag;\r\n }\r\n\r\n protected _accessibilityTag: Nullable<IAccessibilityTag> = null;\r\n\r\n /**\r\n * Observable that fires whenever the accessibility event of the control has changed\r\n */\r\n public onAccessibilityTagChangedObservable = new Observable<Nullable<IAccessibilityTag>>();\r\n\r\n /**\r\n * An event triggered when pointer wheel is scrolled\r\n */\r\n public onWheelObservable = new Observable<Vector2>();\r\n /**\r\n * An event triggered when the pointer moves over the control.\r\n */\r\n public onPointerMoveObservable = new Observable<Vector2>();\r\n\r\n /**\r\n * An event triggered when the pointer moves out of the control.\r\n */\r\n public onPointerOutObservable = new Observable<Control>();\r\n\r\n /**\r\n * An event triggered when the pointer taps the control\r\n */\r\n public onPointerDownObservable = new Observable<Vector2WithInfo>();\r\n\r\n /**\r\n * An event triggered when pointer up\r\n */\r\n public onPointerUpObservable = new Observable<Vector2WithInfo>();\r\n\r\n /**\r\n * An event triggered when a control is clicked on\r\n */\r\n public onPointerClickObservable = new Observable<Vector2WithInfo>();\r\n\r\n /**\r\n * An event triggered when pointer enters the control\r\n */\r\n public onPointerEnterObservable = new Observable<Control>();\r\n\r\n /**\r\n * An event triggered when the control is marked as dirty\r\n */\r\n public onDirtyObservable = new Observable<Control>();\r\n\r\n /**\r\n * An event triggered before drawing the control\r\n */\r\n public onBeforeDrawObservable = new Observable<Control>();\r\n\r\n /**\r\n * An event triggered after the control was drawn\r\n */\r\n public onAfterDrawObservable = new Observable<Control>();\r\n\r\n /**\r\n * An event triggered when the control has been disposed\r\n */\r\n public onDisposeObservable = new Observable<Control>();\r\n\r\n /**\r\n * An event triggered when the control isVisible is changed\r\n */\r\n public onIsVisibleChangedObservable = new Observable<boolean>();\r\n\r\n /**\r\n * Get the hosting AdvancedDynamicTexture\r\n */\r\n public get host(): AdvancedDynamicTexture {\r\n return this._host;\r\n }\r\n\r\n /** Gets or set information about font offsets (used to render and align text) */\r\n @serialize()\r\n public get fontOffset(): { ascent: number; height: number; descent: number } {\r\n return this._fontOffset;\r\n }\r\n\r\n public set fontOffset(offset: { ascent: number; height: number; descent: number }) {\r\n this._fontOffset = offset;\r\n }\r\n\r\n /** Gets or sets alpha value for the control (1 means opaque and 0 means entirely transparent) */\r\n @serialize()\r\n public get alpha(): number {\r\n return this._alpha;\r\n }\r\n\r\n public set alpha(value: number) {\r\n if (this._alpha === value) {\r\n return;\r\n }\r\n this._alphaSet = true;\r\n this._alpha = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /**\r\n * Gets or sets a number indicating size of stroke we want to highlight the control with (mostly for debugging purpose)\r\n */\r\n public get highlightLineWidth(): number {\r\n return this._highlightLineWidth;\r\n }\r\n\r\n public set highlightLineWidth(value: number) {\r\n if (this._highlightLineWidth === value) {\r\n return;\r\n }\r\n\r\n this._highlightLineWidth = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /**\r\n * Gets or sets a boolean indicating that we want to highlight the control (mostly for debugging purpose)\r\n */\r\n public get isHighlighted(): boolean {\r\n return this._isHighlighted;\r\n }\r\n\r\n public set isHighlighted(value: boolean) {\r\n if (this._isHighlighted === value) {\r\n return;\r\n }\r\n\r\n this._isHighlighted = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /**\r\n * Indicates if the control should be serialized. Defaults to true.\r\n */\r\n @serialize()\r\n public isSerializable: boolean = true;\r\n\r\n /**\r\n * Gets or sets a string defining the color to use for highlighting this control\r\n */\r\n public get highlightColor(): string {\r\n return this._highlightColor;\r\n }\r\n\r\n public set highlightColor(value: string) {\r\n if (this._highlightColor === value) {\r\n return;\r\n }\r\n\r\n this._highlightColor = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /** Gets or sets a value indicating the scale factor on X axis (1 by default)\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#rotation-and-scaling\r\n */\r\n @serialize()\r\n public get scaleX(): number {\r\n return this._scaleX;\r\n }\r\n\r\n public set scaleX(value: number) {\r\n if (this._scaleX === value) {\r\n return;\r\n }\r\n\r\n this._scaleX = value;\r\n this._markAsDirty();\r\n this._markMatrixAsDirty();\r\n }\r\n\r\n /** Gets or sets a value indicating the scale factor on Y axis (1 by default)\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#rotation-and-scaling\r\n */\r\n @serialize()\r\n public get scaleY(): number {\r\n return this._scaleY;\r\n }\r\n\r\n public set scaleY(value: number) {\r\n if (this._scaleY === value) {\r\n return;\r\n }\r\n\r\n this._scaleY = value;\r\n this._markAsDirty();\r\n this._markMatrixAsDirty();\r\n }\r\n\r\n /** Gets or sets the rotation angle (0 by default)\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#rotation-and-scaling\r\n */\r\n @serialize()\r\n public get rotation(): number {\r\n return this._rotation;\r\n }\r\n\r\n public set rotation(value: number) {\r\n if (this._rotation === value) {\r\n return;\r\n }\r\n\r\n this._rotation = value;\r\n this._markAsDirty();\r\n this._markMatrixAsDirty();\r\n }\r\n\r\n /** Gets or sets the transformation center on Y axis (0 by default)\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#rotation-and-scaling\r\n */\r\n @serialize()\r\n public get transformCenterY(): number {\r\n return this._transformCenterY;\r\n }\r\n\r\n public set transformCenterY(value: number) {\r\n if (this._transformCenterY === value) {\r\n return;\r\n }\r\n\r\n this._transformCenterY = value;\r\n this._markAsDirty();\r\n this._markMatrixAsDirty();\r\n }\r\n\r\n /** Gets or sets the transformation center on X axis (0 by default)\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#rotation-and-scaling\r\n */\r\n @serialize()\r\n public get transformCenterX(): number {\r\n return this._transformCenterX;\r\n }\r\n\r\n public set transformCenterX(value: number) {\r\n if (this._transformCenterX === value) {\r\n return;\r\n }\r\n\r\n this._transformCenterX = value;\r\n this._markAsDirty();\r\n this._markMatrixAsDirty();\r\n }\r\n\r\n /**\r\n * Gets or sets the horizontal alignment\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#alignments\r\n */\r\n @serialize()\r\n public get horizontalAlignment(): number {\r\n return this._horizontalAlignment;\r\n }\r\n\r\n public set horizontalAlignment(value: number) {\r\n if (this._horizontalAlignment === value) {\r\n return;\r\n }\r\n\r\n this._horizontalAlignment = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /**\r\n * Gets or sets the vertical alignment\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#alignments\r\n */\r\n @serialize()\r\n public get verticalAlignment(): number {\r\n return this._verticalAlignment;\r\n }\r\n\r\n public set verticalAlignment(value: number) {\r\n if (this._verticalAlignment === value) {\r\n return;\r\n }\r\n\r\n this._verticalAlignment = value;\r\n this._markAsDirty();\r\n }\r\n\r\n private _fixedRatio = 0;\r\n public set fixedRatio(value: number) {\r\n if (this._fixedRatio === value) {\r\n return;\r\n }\r\n\r\n this._fixedRatio = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /**\r\n * Gets or sets a fixed ratio for this control.\r\n * When different from 0, the ratio is used to compute the \"second\" dimension.\r\n * The first dimension used in the computation is the last one set (by setting width / widthInPixels or height / heightInPixels), and the\r\n * second dimension is computed as first dimension * fixedRatio\r\n */\r\n @serialize()\r\n public get fixedRatio(): number {\r\n return this._fixedRatio;\r\n }\r\n\r\n private _fixedRatioMasterIsWidth = true;\r\n set fixedRatioMasterIsWidth(value: boolean) {\r\n if (this._fixedRatioMasterIsWidth === value) {\r\n return;\r\n }\r\n this._fixedRatioMasterIsWidth = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /**\r\n * Gets or sets a boolean indicating that the fixed ratio is set on the width instead of the height. True by default.\r\n * When the height of a control is set, this property is changed to false.\r\n */\r\n @serialize()\r\n get fixedRatioMasterIsWidth(): boolean {\r\n return this._fixedRatioMasterIsWidth;\r\n }\r\n\r\n /**\r\n * Gets or sets control width\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\r\n */\r\n @serialize()\r\n public get width(): string | number {\r\n return this._width.toString(this._host);\r\n }\r\n\r\n public set width(value: string | number) {\r\n this._fixedRatioMasterIsWidth = true;\r\n\r\n if (this._width.toString(this._host) === value) {\r\n return;\r\n }\r\n\r\n if (this._width.fromString(value)) {\r\n this._markAsDirty();\r\n }\r\n }\r\n\r\n /**\r\n * Gets or sets the control width in pixel\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\r\n */\r\n public get widthInPixels(): number {\r\n return this._width.getValueInPixel(this._host, this._cachedParentMeasure.width);\r\n }\r\n\r\n public set widthInPixels(value: number) {\r\n if (isNaN(value)) {\r\n return;\r\n }\r\n this._fixedRatioMasterIsWidth = true;\r\n this.width = value + \"px\";\r\n }\r\n\r\n /**\r\n * Gets or sets control height\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\r\n */\r\n @serialize()\r\n public get height(): string | number {\r\n return this._height.toString(this._host);\r\n }\r\n\r\n public set height(value: string | number) {\r\n this._fixedRatioMasterIsWidth = false;\r\n\r\n if (this._height.toString(this._host) === value) {\r\n return;\r\n }\r\n\r\n if (this._height.fromString(value)) {\r\n this._markAsDirty();\r\n }\r\n }\r\n\r\n /**\r\n * Gets or sets control height in pixel\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\r\n */\r\n public get heightInPixels(): number {\r\n return this._height.getValueInPixel(this._host, this._cachedParentMeasure.height);\r\n }\r\n\r\n public set heightInPixels(value: number) {\r\n if (isNaN(value)) {\r\n return;\r\n }\r\n this._fixedRatioMasterIsWidth = false;\r\n this.height = value + \"px\";\r\n }\r\n\r\n /** Gets or set font family */\r\n public get fontFamily(): string {\r\n return this._fontFamily;\r\n }\r\n\r\n public set fontFamily(value: string) {\r\n if (this._fontFamily === value) {\r\n return;\r\n }\r\n\r\n this._fontFamily = value;\r\n this._resetFontCache();\r\n }\r\n\r\n /** Gets or sets font style */\r\n public get fontStyle(): string {\r\n return this._fontStyle;\r\n }\r\n\r\n public set fontStyle(value: string) {\r\n if (this._fontStyle === value) {\r\n return;\r\n }\r\n\r\n this._fontStyle = value;\r\n this._resetFontCache();\r\n }\r\n\r\n /** Gets or sets font weight */\r\n public get fontWeight(): string {\r\n return this._fontWeight;\r\n }\r\n\r\n public set fontWeight(value: string) {\r\n if (this._fontWeight === value) {\r\n return;\r\n }\r\n\r\n this._fontWeight = value;\r\n this._resetFontCache();\r\n }\r\n\r\n /**\r\n * Gets or sets style\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#styles\r\n */\r\n @serialize()\r\n public get style(): Nullable<Style> {\r\n return this._style;\r\n }\r\n\r\n public set style(value: Nullable<Style>) {\r\n if (this._style) {\r\n this._style.onChangedObservable.remove(this._styleObserver);\r\n this._styleObserver = null;\r\n }\r\n\r\n this._style = value;\r\n\r\n if (this._style) {\r\n this._styleObserver = this._style.onChangedObservable.add(() => {\r\n this._markAsDirty();\r\n this._resetFontCache();\r\n });\r\n }\r\n\r\n this._markAsDirty();\r\n this._resetFontCache();\r\n }\r\n\r\n /** @internal */\r\n public get _isFontSizeInPercentage(): boolean {\r\n return this._fontSize.isPercentage;\r\n }\r\n\r\n /** Gets or sets font size in pixels */\r\n public get fontSizeInPixels(): number {\r\n const fontSizeToUse = this._style ? this._style._fontSize : this._fontSize;\r\n\r\n if (fontSizeToUse.isPixel) {\r\n return fontSizeToUse.getValue(this._host);\r\n }\r\n\r\n return fontSizeToUse.getValueInPixel(this._host, this._tempParentMeasure.height || this._cachedParentMeasure.height);\r\n }\r\n\r\n public set fontSizeInPixels(value: number) {\r\n if (isNaN(value)) {\r\n return;\r\n }\r\n this.fontSize = value + \"px\";\r\n }\r\n\r\n /** Gets or sets font size */\r\n public get fontSize(): string | number {\r\n return this._fontSize.toString(this._host);\r\n }\r\n\r\n public set fontSize(value: string | number) {\r\n if (this._fontSize.toString(this._host) === value) {\r\n return;\r\n }\r\n\r\n if (this._fontSize.fromString(value)) {\r\n this._markAsDirty();\r\n this._resetFontCache();\r\n }\r\n }\r\n\r\n /** Gets or sets foreground color */\r\n @serialize()\r\n public get color(): string {\r\n return this._color;\r\n }\r\n\r\n public set color(value: string) {\r\n if (this._color === value) {\r\n return;\r\n }\r\n\r\n this._color = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /** Gets or sets gradient. Setting a gradient will override the color */\r\n @serialize()\r\n public get gradient(): Nullable<BaseGradient> {\r\n return this._gradient;\r\n }\r\n\r\n public set gradient(value: Nullable<BaseGradient>) {\r\n if (this._gradient === value) {\r\n return;\r\n }\r\n\r\n this._gradient = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /** Gets or sets z index which is used to reorder controls on the z axis */\r\n @serialize()\r\n public get zIndex(): number {\r\n return this._zIndex;\r\n }\r\n\r\n public set zIndex(value: number) {\r\n if (this.zIndex === value) {\r\n return;\r\n }\r\n\r\n this._zIndex = value;\r\n\r\n if (this.parent) {\r\n this.parent._reOrderControl(this);\r\n }\r\n }\r\n\r\n /** Gets or sets a boolean indicating if the control can be rendered */\r\n @serialize()\r\n public get notRenderable(): boolean {\r\n return this._doNotRender;\r\n }\r\n\r\n public set notRenderable(value: boolean) {\r\n if (this._doNotRender === value) {\r\n return;\r\n }\r\n\r\n this._doNotRender = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /** Gets or sets a boolean indicating if the control is visible */\r\n @serialize()\r\n public get isVisible(): boolean {\r\n return this._isVisible;\r\n }\r\n\r\n public set isVisible(value: boolean) {\r\n if (this._isVisible === value) {\r\n return;\r\n }\r\n\r\n this._isVisible = value;\r\n this._markAsDirty(true);\r\n\r\n this.onIsVisibleChangedObservable.notifyObservers(value);\r\n }\r\n\r\n /** Gets a boolean indicating that the control needs to update its rendering */\r\n public get isDirty(): boolean {\r\n return this._isDirty;\r\n }\r\n\r\n /**\r\n * Gets the current linked mesh (or null if none)\r\n */\r\n public get linkedMesh(): Nullable<TransformNode> {\r\n return this._linkedMesh;\r\n }\r\n\r\n /**\r\n * Gets or sets a value indicating the padding should work like in CSS.\r\n * Basically, it will add the padding amount on each side of the parent control for its children.\r\n */\r\n @serialize()\r\n public get descendantsOnlyPadding(): boolean {\r\n return this._descendantsOnlyPadding;\r\n }\r\n\r\n public set descendantsOnlyPadding(value: boolean) {\r\n if (this._descendantsOnlyPadding === value) {\r\n return;\r\n }\r\n\r\n this._descendantsOnlyPadding = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /**\r\n * Gets or sets a value indicating the padding to use on the left of the control\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\r\n */\r\n @serialize()\r\n public get paddingLeft(): string | number {\r\n return this._paddingLeft.toString(this._host);\r\n }\r\n\r\n public set paddingLeft(value: string | number) {\r\n if (this._paddingLeft.fromString(value)) {\r\n this._markAsDirty();\r\n }\r\n }\r\n\r\n /**\r\n * Gets or sets a value indicating the padding in pixels to use on the left of the control\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\r\n */\r\n public get paddingLeftInPixels(): number {\r\n return this._paddingLeft.getValueInPixel(this._host, this._cachedParentMeasure.width);\r\n }\r\n\r\n public set paddingLeftInPixels(value: number) {\r\n if (isNaN(value)) {\r\n return;\r\n }\r\n this.paddingLeft = value + \"px\";\r\n }\r\n\r\n /** @internal */\r\n public get _paddingLeftInPixels(): number {\r\n if (this._descendantsOnlyPadding) {\r\n return 0;\r\n }\r\n\r\n return this.paddingLeftInPixels;\r\n }\r\n\r\n /**\r\n * Gets or sets a value indicating the padding to use on the right of the control\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\r\n */\r\n @serialize()\r\n public get paddingRight(): string | number {\r\n return this._paddingRight.toString(this._host);\r\n }\r\n\r\n public set paddingRight(value: string | number) {\r\n if (this._paddingRight.fromString(value)) {\r\n this._markAsDirty();\r\n }\r\n }\r\n\r\n /**\r\n * Gets or sets a value indicating the padding in pixels to use on the right of the control\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\r\n */\r\n public get paddingRightInPixels(): number {\r\n return this._paddingRight.getValueInPixel(this._host, this._cachedParentMeasure.width);\r\n }\r\n\r\n public set paddingRightInPixels(value: number) {\r\n if (isNaN(value)) {\r\n return;\r\n }\r\n this.paddingRight = value + \"px\";\r\n }\r\n\r\n /** @internal */\r\n public get _paddingRightInPixels(): number {\r\n if (this._descendantsOnlyPadding) {\r\n return 0;\r\n }\r\n\r\n return this.paddingRightInPixels;\r\n }\r\n\r\n /**\r\n * Gets or sets a value indicating the padding to use on the top of the control\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\r\n */\r\n @serialize()\r\n public get paddingTop(): string | number {\r\n return this._paddingTop.toString(this._host);\r\n }\r\n\r\n public set paddingTop(value: string | number) {\r\n if (this._paddingTop.fromString(value)) {\r\n this._markAsDirty();\r\n }\r\n }\r\n\r\n /**\r\n * Gets or sets a value indicating the padding in pixels to use on the top of the control\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\r\n */\r\n public get paddingTopInPixels(): number {\r\n return this._paddingTop.getValueInPixel(this._host, this._cachedParentMeasure.height);\r\n }\r\n\r\n public set paddingTopInPixels(value: number) {\r\n if (isNaN(value)) {\r\n return;\r\n }\r\n this.paddingTop = value + \"px\";\r\n }\r\n\r\n /** @internal */\r\n public get _paddingTopInPixels(): number {\r\n if (this._descendantsOnlyPadding) {\r\n return 0;\r\n }\r\n\r\n return this.paddingTopInPixels;\r\n }\r\n\r\n /**\r\n * Gets or sets a value indicating the padding to use on the bottom of the control\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\r\n */\r\n @serialize()\r\n public get paddingBottom(): string | number {\r\n return this._paddingBottom.toString(this._host);\r\n }\r\n\r\n public set paddingBottom(value: string | number) {\r\n if (this._paddingBottom.fromString(value)) {\r\n this._markAsDirty();\r\n }\r\n }\r\n\r\n /**\r\n * Gets or sets a value indicating the padding in pixels to use on the bottom of the control\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\r\n */\r\n public get paddingBottomInPixels(): number {\r\n return this._paddingBottom.getValueInPixel(this._host, this._cachedParentMeasure.height);\r\n }\r\n\r\n public set paddingBottomInPixels(value: number) {\r\n if (isNaN(value)) {\r\n return;\r\n }\r\n this.paddingBottom = value + \"px\";\r\n }\r\n\r\n /** @internal */\r\n public get _paddingBottomInPixels(): number {\r\n if (this._descendantsOnlyPadding) {\r\n return 0;\r\n }\r\n\r\n return this.paddingBottomInPixels;\r\n }\r\n\r\n /**\r\n * Gets or sets a value indicating the left coordinate of the control\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\r\n */\r\n @serialize()\r\n public get left(): string | number {\r\n return this._left.toString(this._host);\r\n }\r\n\r\n public set left(value: string | number) {\r\n if (this._left.fromString(value)) {\r\n this._markAsDirty();\r\n }\r\n }\r\n\r\n /**\r\n * Gets or sets a value indicating the left coordinate in pixels of the control\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\r\n */\r\n public get leftInPixels(): number {\r\n return this._left.getValueInPixel(this._host, this._cachedParentMeasure.width);\r\n }\r\n\r\n public set leftInPixels(value: number) {\r\n if (isNaN(value)) {\r\n return;\r\n }\r\n this.left = value + \"px\";\r\n }\r\n\r\n /**\r\n * Gets or sets a value indicating the top coordinate of the control\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\r\n */\r\n @serialize()\r\n public get top(): string | number {\r\n return this._top.toString(this._host);\r\n }\r\n\r\n public set top(value: string | number) {\r\n if (this._top.fromString(value)) {\r\n this._markAsDirty();\r\n }\r\n }\r\n\r\n /**\r\n * Gets or sets a value indicating the top coordinate in pixels of the control\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\r\n */\r\n public get topInPixels(): number {\r\n return this._top.getValueInPixel(this._host, this._cachedParentMeasure.height);\r\n }\r\n\r\n public set topInPixels(value: number) {\r\n if (isNaN(value)) {\r\n return;\r\n }\r\n this.top = value + \"px\";\r\n }\r\n\r\n /**\r\n * Gets or sets a value indicating the offset on X axis to the linked mesh\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#tracking-positions\r\n */\r\n @serialize()\r\n public get linkOffsetX(): string | number {\r\n return this._linkOffsetX.toString(this._host);\r\n }\r\n\r\n public set linkOffsetX(value: string | number) {\r\n if (this._linkOffsetX.fromString(value)) {\r\n this._markAsDirty();\r\n }\r\n }\r\n\r\n /**\r\n * Gets or sets a value indicating the offset in pixels on X axis to the linked mesh\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#tracking-positions\r\n */\r\n public get linkOffsetXInPixels(): number {\r\n return this._linkOffsetX.getValueInPixel(this._host, this._cachedParentMeasure.width);\r\n }\r\n\r\n public set linkOffsetXInPixels(value: number) {\r\n if (isNaN(value)) {\r\n return;\r\n }\r\n this.linkOffsetX = value + \"px\";\r\n }\r\n\r\n /**\r\n * Gets or sets a value indicating the offset on Y axis to the linked mesh\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#tracking-positions\r\n */\r\n @serialize()\r\n public get linkOffsetY(): string | number {\r\n return this._linkOffsetY.toString(this._host);\r\n }\r\n\r\n public set linkOffsetY(value: string | number) {\r\n if (this._linkOffsetY.fromString(value)) {\r\n this._markAsDirty();\r\n }\r\n }\r\n\r\n /**\r\n * Gets or sets a value indicating the offset in pixels on Y axis to the linked mesh\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#tracking-positions\r\n */\r\n public get linkOffsetYInPixels(): number {\r\n return this._linkOffsetY.getValueInPixel(this._host, this._cachedParentMeasure.height);\r\n }\r\n\r\n public set linkOffsetYInPixels(value: number) {\r\n if (isNaN(value)) {\r\n return;\r\n }\r\n this.linkOffsetY = value + \"px\";\r\n }\r\n\r\n /** Gets the center coordinate on X axis */\r\n public get centerX(): number {\r\n return this._currentMeasure.left + this._currentMeasure.width / 2;\r\n }\r\n\r\n /** Gets the center coordinate on Y axis */\r\n public get centerY(): number {\r\n return this._currentMeasure.top + this._currentMeasure.height / 2;\r\n }\r\n\r\n /** Gets or sets if control is Enabled */\r\n @serialize()\r\n public get isEnabled(): boolean {\r\n return this._isEnabled;\r\n }\r\n\r\n public set isEnabled(value: boolean) {\r\n if (this._isEnabled === value) {\r\n return;\r\n }\r\n\r\n this._isEnabled = value;\r\n this._markAsDirty();\r\n // if this control or any of it's descendants are under a pointer, we need to fire a pointerOut event\r\n const recursivelyFirePointerOut = (control: Control) => {\r\n if (!control.host) {\r\n return;\r\n }\r\n for (const pointer in control.host._lastControlOver) {\r\n if (control === this.host._lastControlOver[pointer]) {\r\n control._onPointerOut(control, null, true);\r\n delete control.host._lastControlOver[pointer];\r\n }\r\n }\r\n if ((control as Container).children !== undefined) {\r\n (control as Container).children.forEach(recursivelyFirePointerOut);\r\n }\r\n };\r\n recursivelyFirePointerOut(this);\r\n this.onEnabledStateChangedObservable.notifyObservers(value);\r\n }\r\n /** Gets or sets background color of control if it's disabled. Only applies to Button class. */\r\n @serialize()\r\n public get disabledColor(): string {\r\n return this._disabledColor;\r\n }\r\n\r\n public set disabledColor(value: string) {\r\n if (this._disabledColor === value) {\r\n return;\r\n }\r\n\r\n this._disabledColor = value;\r\n this._markAsDirty();\r\n }\r\n /** Gets or sets front color of control if it's disabled. Only applies to Checkbox class. */\r\n @serialize()\r\n public get disabledColorItem(): string {\r\n return this._disabledColorItem;\r\n }\r\n\r\n public set disabledColorItem(value: string) {\r\n if (this._disabledColorItem === value) {\r\n return;\r\n }\r\n\r\n this._disabledColorItem = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /**\r\n * Gets/sets the overlap group of the control.\r\n * Controls with overlapGroup set to a number can be deoverlapped.\r\n * Controls with overlapGroup set to undefined are not deoverlapped.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#deoverlapping\r\n */\r\n @serialize()\r\n public overlapGroup?: number;\r\n /**\r\n * Gets/sets the deoverlap movement multiplier\r\n */\r\n @serialize()\r\n public overlapDeltaMultiplier?: number;\r\n\r\n /**\r\n * Array of animations\r\n */\r\n animations: Nullable<Animation[]> = null;\r\n\r\n // Functions\r\n\r\n /**\r\n * Creates a new control\r\n * @param name defines the name of the control\r\n */\r\n constructor(\r\n /** defines the name of the control */\r\n public name?: string\r\n ) {}\r\n\r\n /** @internal */\r\n protected _getTypeName(): string {\r\n return \"Control\";\r\n }\r\n\r\n /**\r\n * Gets the first ascendant in the hierarchy of the given type\r\n * @param className defines the required type\r\n * @returns the ascendant or null if not found\r\n */\r\n public getAscendantOfClass(className: string): Nullable<Control> {\r\n if (!this.parent) {\r\n return null;\r\n }\r\n\r\n if (this.parent.getClassName() === className) {\r\n return this.parent;\r\n }\r\n\r\n return this.parent.getAscendantOfClass(className);\r\n }\r\n\r\n /**\r\n * Mark control element as dirty\r\n * @param force force non visible elements to be marked too\r\n */\r\n public markAsDirty(force = false): void {\r\n this._markAsDirty(force);\r\n }\r\n\r\n /**\r\n * Mark the element and its children as dirty\r\n */\r\n public markAllAsDirty(): void {\r\n this._markAllAsDirty();\r\n }\r\n\r\n /** @internal */\r\n public _resetFontCache(): void {\r\n this._fontSet = true;\r\n this._markAsDirty();\r\n }\r\n\r\n /**\r\n * Determines if a container is an ascendant of the current control\r\n * @param container defines the container to look for\r\n * @returns true if the container is one of the ascendant of the control\r\n */\r\n public isAscendant(container: Control): boolean {\r\n if (!this.parent) {\r\n return false;\r\n }\r\n\r\n if (this.parent === container) {\r\n return true;\r\n }\r\n\r\n return this.parent.isAscendant(container);\r\n }\r\n\r\n /**\r\n * Gets coordinates in local control space\r\n * @param globalCoordinates defines the coordinates to transform\r\n * @returns the new coordinates in local space\r\n */\r\n public getLocalCoordinates(globalCoordinates: Vector2): Vector2 {\r\n const result = Vector2.Zero();\r\n\r\n this.getLocalCoordinatesToRef(globalCoordinates, result);\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Gets coordinates in local control space\r\n * @param globalCoordinates defines the coordinates to transform\r\n * @param result defines the target vector2 where to store the result\r\n * @returns the current control\r\n */\r\n public getLocalCoordinatesToRef(globalCoordinates: Vector2, result: Vector2): Control {\r\n result.x = globalCoordinates.x - this._currentMeasure.left;\r\n result.y = globalCoordinates.y - this._currentMeasure.top;\r\n return this;\r\n }\r\n\r\n /**\r\n * Gets coordinates in parent local control space\r\n * @param globalCoordinates defines the coordinates to transform\r\n * @returns the new coordinates in parent local space\r\n */\r\n public getParentLocalCoordinates(globalCoordinates: Vector2): Vector2 {\r\n const result = Vector2.Zero();\r\n\r\n result.x = globalCoordinates.x - this._cachedParentMeasure.left;\r\n result.y = globalCoordinates.y - this._cachedParentMeasure.top;\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Move the current control to a vector3 position projected onto the screen.\r\n * @param position defines the target position\r\n * @param scene defines the hosting scene\r\n */\r\n public moveToVector3(position: Vector3, scene: Scene): void {\r\n if (!this._host || this.parent !== this._host._rootContainer) {\r\n Tools.Error(\"Cannot move a control to a vector3 if the control is not at root level\");\r\n return;\r\n }\r\n\r\n this.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;\r\n this.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP;\r\n\r\n const globalViewport = this._host._getGlobalViewport();\r\n const projectedPosition = Vector3.Project(position, Matrix.IdentityReadOnly, scene.getTransformMatrix(), globalViewport);\r\n\r\n this._moveToProjectedPosition(projectedPosition);\r\n\r\n if (projectedPosition.z < 0 || projectedPosition.z > 1) {\r\n this.notRenderable = true;\r\n return;\r\n }\r\n this.notRenderable = false;\r\n }\r\n\r\n /**\r\n * Will store all controls that have this control as ascendant in a given array\r\n * @param results defines the array where to store the descendants\r\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\r\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\r\n */\r\n public getDescendantsToRef(results: Control[], directDescendantsOnly: boolean = false, predicate?: (control: Control) => boolean): void {\r\n // Do nothing by default\r\n }\r\n\r\n /**\r\n * Will return all controls that have this control as ascendant\r\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\r\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\r\n * @returns all child controls\r\n */\r\n public getDescendants(directDescendantsOnly?: boolean, predicate?: (control: Control) => boolean): Control[] {\r\n const results: Control[] = [];\r\n\r\n this.getDescendantsToRef(results, directDescendantsOnly, predicate);\r\n\r\n return results;\r\n }\r\n\r\n /**\r\n * Link current control with a target mesh\r\n * @param mesh defines the mesh to link with\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#tracking-positions\r\n */\r\n public linkWithMesh(mesh: Nullable<TransformNode>): void {\r\n if (!this._host || (this.parent && this.parent !== this._host._rootContainer)) {\r\n if (mesh) {\r\n Tools.Error(\"Cannot link a control to a mesh if the control is not at root level\");\r\n }\r\n return;\r\n }\r\n\r\n const index = this._host._linkedControls.indexOf(this);\r\n if (index !== -1) {\r\n this._linkedMesh = mesh;\r\n if (!mesh) {\r\n this._host._linkedControls.splice(index, 1);\r\n }\r\n return;\r\n } else if (!mesh) {\r\n return;\r\n }\r\n\r\n this.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;\r\n this.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP;\r\n this._linkedMesh = mesh;\r\n this._host._linkedControls.push(this);\r\n }\r\n\r\n /**\r\n * Shorthand function to set the top, right, bottom, and left padding values on the control.\r\n * @param { string | number} paddingTop - The value of the top padding.\r\n * @param { string | number} paddingRight - The value of the right padding. If omitted, top is used.\r\n * @param { string | number} paddingBottom - The value of the bottom padding. If omitted, top is used.\r\n * @param { string | number} paddingLeft - The value of the left padding. If omitted, right is used.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\r\n */\r\n public setPadding(paddingTop: string | number, paddingRight?: string | number, paddingBottom?: string | number, paddingLeft?: string | number) {\r\n const top = paddingTop;\r\n const right = paddingRight ?? top;\r\n const bottom = paddingBottom ?? top;\r\n const left = paddingLeft ?? right;\r\n\r\n this.paddingTop = top;\r\n this.paddingRight = right;\r\n this.paddingBottom = bottom;\r\n this.paddingLeft = left;\r\n }\r\n\r\n /**\r\n * Shorthand funtion to set the top, right, bottom, and left padding values in pixels on the control.\r\n * @param { number} paddingTop - The value in pixels of the top padding.\r\n * @param { number} paddingRight - The value in pixels of the right padding. If omitted, top is used.\r\n * @param { number} paddingBottom - The value in pixels of the bottom padding. If omitted, top is used.\r\n * @param { number} paddingLeft - The value in pixels of the left padding. If omitted, right is used.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size\r\n */\r\n public setPaddingInPixels(paddingTop: number, paddingRight?: number, paddingBottom?: number, paddingLeft?: number) {\r\n const top = paddingTop;\r\n const right = paddingRight ?? top;\r\n const bottom = paddingBottom ?? top;\r\n const left = paddingLeft ?? right;\r\n\r\n this.paddingTopInPixels = top;\r\n this.paddingRightInPixels = right;\r\n this.paddingBottomInPixels = bottom;\r\n this.paddingLeftInPixels = left;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _moveToProjectedPosition(projectedPosition: Vector3): void {\r\n const oldLeft = this._left.getValue(this._host);\r\n const oldTop = this._top.getValue(this._host);\r\n\r\n const parentMeasure = this.parent?._currentMeasure;\r\n if (parentMeasure) {\r\n this._processMeasures(parentMeasure, this._host.getContext());\r\n }\r\n\r\n let newLeft = projectedPosition.x + this._linkOffsetX.getValue(this._host) - this._currentMeasure.width / 2;\r\n let newTop = projectedPosition.y + this._linkOffsetY.getValue(this._host) - this._currentMeasure.height / 2;\r\n\r\n const leftAndTopIgnoreAdaptiveScaling = this._left.ignoreAdaptiveScaling && this._top.ignoreAdaptiveScaling;\r\n if (leftAndTopIgnoreAdaptiveScaling) {\r\n if (Math.abs(newLeft - oldLeft) < 0.5) {\r\n newLeft = oldLeft;\r\n }\r\n\r\n if (Math.abs(newTop - oldTop) < 0.5) {\r\n newTop = oldTop;\r\n }\r\n }\r\n\r\n if (!leftAndTopIgnoreAdaptiveScaling && oldLeft === newLeft && oldTop === newTop) {\r\n return;\r\n }\r\n\r\n this.left = newLeft + \"px\";\r\n this.top = newTop + \"px\";\r\n\r\n this._left.ignoreAdaptiveScaling = true;\r\n this._top.ignoreAdaptiveScaling = true;\r\n this._markAsDirty();\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _offsetLeft(offset: number) {\r\n this._isDirty = true;\r\n this._currentMeasure.left += offset;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _offsetTop(offset: number) {\r\n this._isDirty = true;\r\n this._currentMeasure.top += offset;\r\n }\r\n\r\n /** @internal */\r\n public _markMatrixAsDirty(): void {\r\n this._isMatrixDirty = true;\r\n this._flagDescendantsAsMatrixDirty();\r\n }\r\n\r\n /** @internal */\r\n public _flagDescendantsAsMatrixDirty(): void {\r\n // No child\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _intersectsRect(rect: Measure, context?: ICanvasRenderingContext) {\r\n // make sure we are transformed correctly before checking intersections. no-op if nothing is dirty.\r\n this._transform(context);\r\n if (this._evaluatedMeasure.left >= rect.left + rect.width) {\r\n return false;\r\n }\r\n\r\n if (this._evaluatedMeasure.top >= rect.top + rect.height) {\r\n return false;\r\n }\r\n\r\n if (this._evaluatedMeasure.left + this._evaluatedMeasure.width <= rect.left) {\r\n return false;\r\n }\r\n\r\n if (this._evaluatedMeasure.top + this._evaluatedMeasure.height <= rect.top) {\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /** @internal */\r\n protected _computeAdditionalOffsetX() {\r\n return 0;\r\n }\r\n\r\n /** @internal */\r\n protected _computeAdditionalOffsetY() {\r\n return 0;\r\n }\r\n\r\n /** @internal */\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n public invalidateRect() {\r\n this._transform();\r\n if (this.host && this.host.useInvalidateRectOptimization) {\r\n // Rotate by transform to get the measure transformed to global space\r\n this._currentMeasure.transformToRef(this._transformMatrix, this._tmpMeasureA);\r\n // get the boudning box of the current measure and last frames measure in global space and invalidate it\r\n // the previous measure is used to properly clear a control that is scaled down\r\n Measure.CombineToRef(this._tmpMeasureA, this._prevCurrentMeasureTransformedIntoGlobalSpace, this._tmpMeasureA);\r\n\r\n // Expand rect based on shadows\r\n const shadowOffsetX = this.shadowOffsetX;\r\n const shadowOffsetY = this.shadowOffsetY;\r\n const shadowBlur = Math.max(this._previousShadowBlur, this.shadowBlur);\r\n\r\n const leftShadowOffset = Math.min(Math.min(shadowOffsetX, 0) - shadowBlur * 2, 0);\r\n const rightShadowOffset = Math.max(Math.max(shadowOffsetX, 0) + shadowBlur * 2, 0);\r\n const topShadowOffset = Math.min(Math.min(shadowOffsetY, 0) - shadowBlur * 2, 0);\r\n const bottomShadowOffset = Math.max(Math.max(shadowOffsetY, 0) + shadowBlur * 2, 0);\r\n\r\n const offsetX = this._computeAdditionalOffsetX();\r\n const offsetY = this._computeAdditionalOffsetY();\r\n\r\n this.host.invalidateRect(\r\n Math.floor(this._tmpMeasureA.left + leftShadowOffset - offsetX),\r\n Math.floor(this._tmpMeasureA.top + topShadowOffset - offsetY),\r\n Math.ceil(this._tmpMeasureA.left + this._tmpMeasureA.width + rightShadowOffset + offsetX),\r\n Math.ceil(this._tmpMeasureA.top + this._tmpMeasureA.height + bottomShadowOffset + offsetY)\r\n );\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _markAsDirty(force = false): void {\r\n if (!this._isVisible && !force) {\r\n return;\r\n }\r\n\r\n this._isDirty = true;\r\n this._markMatrixAsDirty();\r\n\r\n // Redraw only this rectangle\r\n if (this._host) {\r\n this._host.markAsDirty();\r\n }\r\n }\r\n\r\n /** @internal */\r\n public _markAllAsDirty(): void {\r\n this._markAsDirty();\r\n\r\n if (this._font) {\r\n this._prepareFont();\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _link(host: AdvancedDynamicTexture): void {\r\n this._host = host;\r\n if (this._host) {\r\n this.uniqueId = this._host.getScene()!.getUniqueId();\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n protected _transform(context?: ICanvasRenderingContext): void {\r\n if (!this._isMatrixDirty && this._scaleX === 1 && this._scaleY === 1 && this._rotation === 0) {\r\n return;\r\n }\r\n\r\n // postTranslate\r\n const offsetX = this._currentMeasure.width * this._transformCenterX + this._currentMeasure.left;\r\n const offsetY = this._currentMeasure.height * this._transformCenterY + this._currentMeasure.top;\r\n if (context) {\r\n context.translate(offsetX, offsetY);\r\n\r\n // rotate\r\n context.rotate(this._rotation);\r\n\r\n // scale\r\n context.scale(this._scaleX, this._scaleY);\r\n\r\n // preTranslate\r\n context.translate(-offsetX, -offsetY);\r\n }\r\n // Need to update matrices?\r\n if (this._isMatrixDirty || this._cachedOffsetX !== offsetX || this._cachedOffsetY !== offsetY) {\r\n this._cachedOffsetX = offsetX;\r\n this._cachedOffsetY = offsetY;\r\n this._isMatrixDirty = false;\r\n this._flagDescendantsAsMatrixDirty();\r\n\r\n Matrix2D.ComposeToRef(-offsetX, -offsetY, this._rotation, this._scaleX, this._scaleY, this.parent ? this.parent._transformMatrix : null, this._transformMatrix);\r\n\r\n this._transformMatrix.invertToRef(this._invertTransformMatrix);\r\n this._currentMeasure.transformToRef(this._transformMatrix, this._evaluatedMeasure);\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _renderHighlight(context: ICanvasRenderingContext): void {\r\n if (!this.isHighlighted) {\r\n return;\r\n }\r\n\r\n context.save();\r\n context.strokeStyle = this._highlightColor;\r\n context.lineWidth = this._highlightLineWidth;\r\n\r\n this._renderHighlightSpecific(context);\r\n context.restore();\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _renderHighlightSpecific(context: ICanvasRenderingContext): void {\r\n context.strokeRect(this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);\r\n }\r\n\r\n protected _getColor(context: ICanvasRenderingContext): string | ICanvasGradient {\r\n return this.gradient ? this.gradient.getCanvasGradient(context) : this.color;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n protected _applyStates(context: ICanvasRenderingContext): void {\r\n if (this._isFontSizeInPercentage) {\r\n this._fontSet = true;\r\n }\r\n\r\n if (this._host && this._host.useSmallestIdeal && !this._font) {\r\n this._fontSet = true;\r\n }\r\n\r\n if (this._fontSet) {\r\n this._prepareFont();\r\n this._fontSet = false;\r\n }\r\n\r\n if (this._font) {\r\n context.font = this._font;\r\n }\r\n\r\n if (this._color || this.gradient) {\r\n context.fillStyle = this._getColor(context);\r\n }\r\n\r\n if (Control.AllowAlphaInheritance) {\r\n context.globalAlpha *= this._alpha;\r\n } else if (this._alphaSet) {\r\n context.globalAlpha = this.parent && !this.parent.renderToIntermediateTexture ? this.parent.alpha * this._alpha : this._alpha;\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _layout(parentMeasure: Measure, context: ICanvasRenderingContext): boolean {\r\n if (!this.isDirty && (!this.isVisible || this.notRenderable)) {\r\n return false;\r\n }\r\n\r\n if (this._isDirty || !this._cachedParentMeasure.isEqualsTo(parentMeasure)) {\r\n this.host._numLayoutCalls++;\r\n\r\n this._currentMeasure.addAndTransformToRef(\r\n this._transformMatrix,\r\n -this._paddingLeftInPixels | 0,\r\n -this._paddingTopInPixels | 0,\r\n this._paddingRightInPixels | 0,\r\n this._paddingBottomInPixels | 0,\r\n this._prevCurrentMeasureTransformedIntoGlobalSpace\r\n );\r\n\r\n context.save();\r\n\r\n this._applyStates(context);\r\n\r\n let rebuildCount = 0;\r\n do {\r\n this._rebuildLayout = false;\r\n this._processMeasures(parentMeasure, context);\r\n rebuildCount++;\r\n } while (this._rebuildLayout && rebuildCount < 3);\r\n\r\n if (rebuildCount >= 3) {\r\n Logger.Error(`Layout cycle detected in GUI (Control name=${this.name}, uniqueId=${this.uniqueId})`);\r\n }\r\n\r\n context.restore();\r\n this.invalidateRect();\r\n this._evaluateClippingState(parentMeasure);\r\n }\r\n\r\n this._wasDirty = this._isDirty;\r\n this._isDirty = false;\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n protected _processMeasures(parentMeasure: Measure, context: ICanvasRenderingContext): void {\r\n this._tempPaddingMeasure.copyFrom(parentMeasure);\r\n\r\n // Apply padding if in correct mode\r\n if (this.parent && this.parent.descendantsOnlyPadding) {\r\n this._tempPaddingMeasure.left += this.parent.paddingLeftInPixels;\r\n this._tempPaddingMeasure.top += this.parent.paddingTopInPixels;\r\n this._tempPaddingMeasure.width -= this.parent.paddingLeftInPixels + this.parent.paddingRightInPixels;\r\n this._tempPaddingMeasure.height -= this.parent.paddingTopInPixels + this.parent.paddingBottomInPixels;\r\n }\r\n\r\n this._currentMeasure.copyFrom(this._tempPaddingMeasure);\r\n\r\n // Let children take some pre-measurement actions\r\n this._preMeasure(this._tempPaddingMeasure, context);\r\n\r\n this._measure();\r\n\r\n // Let children take some post-measurement actions\r\n this._postMeasure(this._tempPaddingMeasure, context);\r\n\r\n this._computeAlignment(this._tempPaddingMeasure, context);\r\n\r\n // Convert to int values\r\n this._currentMeasure.left = this._currentMeasure.left | 0;\r\n this._currentMeasure.top = this._currentMeasure.top | 0;\r\n this._currentMeasure.width = this._currentMeasure.width | 0;\r\n this._currentMeasure.height = this._currentMeasure.height | 0;\r\n\r\n // Let children add more features\r\n this._additionalProcessing(this._tempPaddingMeasure, context);\r\n\r\n this._cachedParentMeasure.copyFrom(this._tempPaddingMeasure);\r\n\r\n this._currentMeasure.transformToRef(this._transformMatrix, this._evaluatedMeasure);\r\n if (this.onDirtyObservable.hasObservers()) {\r\n this.onDirtyObservable.notifyObservers(this);\r\n }\r\n }\r\n\r\n protected _evaluateClippingState(parentMeasure: Measure) {\r\n // Since transformMatrix is used here, we need to have it freshly computed\r\n this._transform();\r\n this._currentMeasure.transformToRef(this._transformMatrix, this._evaluatedMeasure);\r\n if (this.parent && this.parent.clipChildren) {\r\n parentMeasure.transformToRef(this.parent._transformMatrix, this._evaluatedParentMeasure);\r\n // Early clip\r\n if (this._evaluatedMeasure.left > this._evaluatedParentMeasure.left + this._evaluatedParentMeasure.width) {\r\n this._isClipped = true;\r\n return;\r\n }\r\n\r\n if (this._evaluatedMeasure.left + this._evaluatedMeasure.width < this._evaluatedParentMeasure.left) {\r\n this._isClipped = true;\r\n return;\r\n }\r\n\r\n if (this._evaluatedMeasure.top > this._evaluatedParentMeasure.top + this._evaluatedParentMeasure.height) {\r\n this._isClipped = true;\r\n return;\r\n }\r\n\r\n if (this._evaluatedMeasure.top + this._evaluatedMeasure.height < this._evaluatedParentMeasure.top) {\r\n this._isClipped = true;\r\n return;\r\n }\r\n }\r\n\r\n this._isClipped = false;\r\n }\r\n\r\n /** @internal */\r\n public _measure(): void {\r\n // Width / Height\r\n if (this._width.isPixel) {\r\n this._currentMeasure.width = this._width.getValue(this._host);\r\n } else {\r\n this._currentMeasure.width *= this._width.getValue(this._host);\r\n }\r\n\r\n if (this._height.isPixel) {\r\n this._currentMeasure.height = this._height.getValue(this._host);\r\n } else {\r\n this._currentMeasure.height *= this._height.getValue(this._host);\r\n }\r\n\r\n if (this._fixedRatio !== 0) {\r\n if (this._fixedRatioMasterIsWidth) {\r\n this._currentMeasure.height = this._currentMeasure.width * this._fixedRatio;\r\n } else {\r\n this._currentMeasure.width = this._currentMeasure.height * this._fixedRatio;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n protected _computeAlignment(parentMeasure: Measure, context: ICanvasRenderingContext): void {\r\n const width = this._currentMeasure.width;\r\n const height = this._currentMeasure.height;\r\n\r\n const parentWidth = parentMeasure.width;\r\n const parentHeight = parentMeasure.height;\r\n\r\n // Left / top\r\n let x = 0;\r\n let y = 0;\r\n\r\n switch (this.horizontalAlignment) {\r\n case Control.HORIZONTAL_ALIGNMENT_LEFT:\r\n x = 0;\r\n break;\r\n case Control.HORIZONTAL_ALIGNMENT_RIGHT:\r\n x = parentWidth - width;\r\n break;\r\n case Control.HORIZONTAL_ALIGNMENT_CENTER:\r\n x = (parentWidth - width) / 2;\r\n break;\r\n }\r\n\r\n switch (this.verticalAlignment) {\r\n case Control.VERTICAL_ALIGNMENT_TOP:\r\n y = 0;\r\n break;\r\n case Control.VERTICAL_ALIGNMENT_BOTTOM:\r\n y = parentHeight - height;\r\n break;\r\n case Control.VERTICAL_ALIGNMENT_CENTER:\r\n y = (parentHeight - height) / 2;\r\n break;\r\n }\r\n\r\n if (!this.descendantsOnlyPadding) {\r\n if (this._paddingLeft.isPixel) {\r\n this._currentMeasure.left += this._paddingLeft.getValue(this._host);\r\n this._currentMeasure.width -= this._paddingLeft.getValue(this._host);\r\n } else {\r\n this._currentMeasure.left += parentWidth * this._paddingLeft.getValue(this._host);\r\n this._currentMeasure.width -= parentWidth * this._paddingLeft.getValue(this._host);\r\n }\r\n\r\n if (this._paddingRight.isPixel) {\r\n this._currentMeasure.width -= this._paddingRight.getValue(this._host);\r\n } else {\r\n this._currentMeasure.width -= parentWidth * this._paddingRight.getValue(this._host);\r\n }\r\n\r\n if (this._paddingTop.isPixel) {\r\n this._currentMeasure.top += this._paddingTop.getValue(this._host);\r\n this._currentMeasure.height -= this._paddingTop.getValue(this._host);\r\n } else {\r\n this._currentMeasure.top += parentHeight * this._paddingTop.getValue(this._host);\r\n this._currentMeasure.height -= parentHeight * this._paddingTop.getValue(this._host);\r\n }\r\n\r\n if (this._paddingBottom.isPixel) {\r\n this._currentMeasure.height -= this._paddingBottom.getValue(this._host);\r\n } else {\r\n this._currentMeasure.height -= parentHeight * this._paddingBottom.getValue(this._host);\r\n }\r\n }\r\n\r\n if (this._left.isPixel) {\r\n this._currentMeasure.left += this._left.getValue(this._host);\r\n } else {\r\n this._currentMeasure.left += parentWidth * this._left.getValue(this._host);\r\n }\r\n\r\n if (this._top.isPixel) {\r\n this._currentMeasure.top += this._top.getValue(this._host);\r\n } else {\r\n this._currentMeasure.top += parentHeight * this._top.getValue(this._host);\r\n }\r\n\r\n this._currentMeasure.left += x;\r\n this._currentMeasure.top += y;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n protected _preMeasure(parentMeasure: Measure, context: ICanvasRenderingContext): void {\r\n // Do nothing\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n protected _postMeasure(parentMeasure: Measure, context: ICanvasRenderingContext): void {\r\n // Do nothing\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n protected _additionalProcessing(parentMeasure: Measure, context: ICanvasRenderingContext): void {\r\n // Do nothing\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n protected _clipForChildren(context: ICanvasRenderingContext): void {\r\n // DO nothing\r\n }\r\n\r\n private static _ClipMeasure = new Measure(0, 0, 0, 0);\r\n private _tmpMeasureA = new Measure(0, 0, 0, 0);\r\n private _clip(context: ICanvasRenderingContext, invalidatedRectangle?: Nullable<Measure>) {\r\n context.beginPath();\r\n Control._ClipMeasure.copyFrom(this._currentMeasure);\r\n if (invalidatedRectangle) {\r\n // Rotate the invalidated rect into the control's space\r\n invalidatedRectangle.transformToRef(this._invertTransformMatrix, this._tmpMeasureA);\r\n\r\n // Get the intersection of the rect in context space and the current context\r\n const intersection = new Measure(0, 0, 0, 0);\r\n intersection.left = Math.max(this._tmpMeasureA.left, this._currentMeasure.left);\r\n intersection.top = Math.max(this._tmpMeasureA.top, this._currentMeasure.top);\r\n intersection.width = Math.min(this._tmpMeasureA.left + this._tmpMeasureA.width, this._currentMeasure.left + this._currentMeasure.width) - intersection.left;\r\n intersection.height = Math.min(this._tmpMeasureA.top + this._tmpMeasureA.height, this._currentMeasure.top + this._currentMeasure.height) - intersection.top;\r\n Control._ClipMeasure.copyFrom(intersection);\r\n }\r\n\r\n if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {\r\n const shadowOffsetX = this.shadowOffsetX;\r\n const shadowOffsetY = this.shadowOffsetY;\r\n const shadowBlur = this.shadowBlur;\r\n\r\n const leftShadowOffset = Math.min(Math.min(shadowOffsetX, 0) - shadowBlur * 2, 0);\r\n const rightShadowOffset = Math.max(Math.max(shadowOffsetX, 0) + shadowBlur * 2, 0);\r\n const topShadowOffset = Math.min(Math.min(shadowOffsetY, 0) - shadowBlur * 2, 0);\r\n const bottomShadowOffset = Math.max(Math.max(shadowOffsetY, 0) + shadowBlur * 2, 0);\r\n\r\n context.rect(\r\n Control._ClipMeasure.left + leftShadowOffset,\r\n Control._ClipMeasure.top + topShadowOffset,\r\n Control._ClipMeasure.width + rightShadowOffset - leftShadowOffset,\r\n Control._ClipMeasure.height + bottomShadowOffset - topShadowOffset\r\n );\r\n } else {\r\n context.rect(Control._ClipMeasure.left, Control._ClipMeasure.top, Control._ClipMeasure.width, Control._ClipMeasure.height);\r\n }\r\n\r\n context.clip();\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _render(context: ICanvasRenderingContext, invalidatedRectangle?: Nullable<Measure>): boolean {\r\n if (!this.isVisible || this.notRenderable || this._isClipped) {\r\n this._isDirty = false;\r\n return false;\r\n }\r\n\r\n this.host._numRenderCalls++;\r\n\r\n context.save();\r\n\r\n this._applyStates(context);\r\n\r\n // Transform\r\n this._transform(context);\r\n\r\n // Clip\r\n if (this.clipContent) {\r\n this._clip(context, invalidatedRectangle);\r\n }\r\n\r\n if (this.onBeforeDrawObservable.hasObservers()) {\r\n this.onBeforeDrawObservable.notifyObservers(this);\r\n }\r\n\r\n if (this.useBitmapCache && !this._wasDirty && this._cacheData) {\r\n context.putImageData(this._cacheData, this._currentMeasure.left, this._currentMeasure.top);\r\n } else {\r\n this._draw(context, invalidatedRectangle);\r\n }\r\n\r\n if (this.useBitmapCache && this._wasDirty) {\r\n this._cacheData = context.getImageData(this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);\r\n }\r\n\r\n this._renderHighlight(context);\r\n\r\n if (this.onAfterDrawObservable.hasObservers()) {\r\n this.onAfterDrawObservable.notifyObservers(this);\r\n }\r\n\r\n context.restore();\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _draw(context: ICanvasRenderingContext, invalidatedRectangle?: Nullable<Measure>): void {\r\n // Do nothing\r\n }\r\n\r\n /**\r\n * Tests if a given coordinates belong to the current control\r\n * @param x defines x coordinate to test\r\n * @param y defines y coordinate to test\r\n * @returns true if the coordinates are inside the control\r\n */\r\n public contains(x: number, y: number): boolean {\r\n // Invert transform\r\n this._invertTransformMatrix.transformCoordinates(x, y, this._transformedPosition);\r\n\r\n x = this._transformedPosition.x;\r\n y = this._transformedPosition.y;\r\n\r\n // Check\r\n if (x < this._currentMeasure.left) {\r\n return false;\r\n }\r\n\r\n if (x > this._currentMeasure.left + this._currentMeasure.width) {\r\n return false;\r\n }\r\n\r\n if (y < this._currentMeasure.top) {\r\n return false;\r\n }\r\n\r\n if (y > this._currentMeasure.top + this._currentMeasure.height) {\r\n return false;\r\n }\r\n\r\n if (this.isPointerBlocker) {\r\n this._host._shouldBlockPointer = true;\r\n }\r\n return true;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _processPicking(x: number, y: number, pi: Nullable<PointerInfoBase>, type: number, pointerId: number, buttonIndex: number, deltaX?: number, deltaY?: number): boolean {\r\n if (!this._isEnabled) {\r\n return false;\r\n }\r\n if (!this.isHitTestVisible || !this.isVisible || this._doNotRender) {\r\n return false;\r\n }\r\n\r\n if (!this.contains(x, y)) {\r\n return false;\r\n }\r\n\r\n this._processObservables(type, x, y, pi, pointerId, buttonIndex, deltaX, deltaY);\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _onPointerMove(target: Control, coordinates: Vector2, pointerId: number, pi: Nullable<PointerInfoBase>): void {\r\n const canNotify: boolean = this.onPointerMoveObservable.notifyObservers(coordinates, -1, target, this, pi);\r\n\r\n if (canNotify && this.parent != null && !this.isPointerBlocker) {\r\n this.parent._onPointerMove(target, coordinates, pointerId, pi);\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _onPointerEnter(target: Control, pi: Nullable<PointerInfoBase>): boolean {\r\n if (!this._isEnabled) {\r\n return false;\r\n }\r\n if (this._enterCount > 0) {\r\n return false;\r\n }\r\n\r\n if (this._enterCount === -1) {\r\n // -1 is for touch input, we are now sure we are with a mouse or pencil\r\n this._enterCount = 0;\r\n }\r\n this._enterCount++;\r\n\r\n const canNotify: boolean = this.onPointerEnterObservable.notifyObservers(this, -1, target, this, pi);\r\n\r\n if (canNotify && this.parent != null && !this.isPointerBlocker) {\r\n this.parent._onPointerEnter(target, pi);\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _onPointerOut(target: Control, pi: Nullable<PointerInfoBase>, force = false): void {\r\n if (!force && (!this._isEnabled || target === this)) {\r\n return;\r\n }\r\n this._enterCount = 0;\r\n\r\n let canNotify: boolean = true;\r\n\r\n if (!target.isAscendant(this)) {\r\n canNotify = this.onPointerOutObservable.notifyObservers(this, -1, target, this, pi);\r\n }\r\n\r\n if (canNotify && this.parent != null && !this.isPointerBlocker) {\r\n this.parent._onPointerOut(target, pi, force);\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _onPointerDown(target: Control, coordinates: Vector2, pointerId: number, buttonIndex: number, pi: Nullable<PointerInfoBase>): boolean {\r\n // Prevent pointerout to lose control context.\r\n // Event redundancy is checked inside the function.\r\n this._onPointerEnter(this, pi);\r\n\r\n if (this._downCount !== 0) {\r\n return false;\r\n }\r\n\r\n this._downCount++;\r\n\r\n this._downPointerIds[pointerId] = true;\r\n\r\n const canNotify: boolean = this.onPointerDownObservable.notifyObservers(new Vector2WithInfo(coordinates, buttonIndex), -1, target, this, pi);\r\n\r\n if (canNotify && this.parent != null && !this.isPointerBlocker) {\r\n this.parent._onPointerDown(target, coordinates, pointerId, buttonIndex, pi);\r\n }\r\n\r\n if (pi && this.uniqueId !== this._host.rootContainer.uniqueId) {\r\n this._host._capturedPointerIds.add((pi.event as IPointerEvent).pointerId);\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _onPointerUp(target: Control, coordinates: Vector2, pointerId: number, buttonIndex: number, notifyClick: boolean, pi?: Nullable<PointerInfoBase>): void {\r\n if (!this._isEnabled) {\r\n return;\r\n }\r\n this._downCount = 0;\r\n\r\n delete this._downPointerIds[pointerId];\r\n\r\n let canNotifyClick: boolean = notifyClick;\r\n if (notifyClick && (this._enterCount > 0 || this._enterCount === -1)) {\r\n canNotifyClick = this.onPointerClickObservable.notifyObservers(new Vector2WithInfo(coordinates, buttonIndex), -1, target, this, pi);\r\n }\r\n const canNotify: boolean = this.onPointerUpObservable.notifyObservers(new Vector2WithInfo(coordinates, buttonIndex), -1, target, this, pi);\r\n\r\n if (canNotify && this.parent != null && !this.isPointerBlocker) {\r\n this.parent._onPointerUp(target, coordinates, pointerId, buttonIndex, canNotifyClick, pi);\r\n }\r\n\r\n if (pi && this.uniqueId !== this._host.rootContainer.uniqueId) {\r\n this._host._capturedPointerIds.delete((pi.event as IPointerEvent).pointerId);\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _forcePointerUp(pointerId: Nullable<number> = null) {\r\n if (pointerId !== null) {\r\n this._onPointerUp(this, Vector2.Zero(), pointerId, 0, true);\r\n } else {\r\n for (const key in this._downPointerIds) {\r\n this._onPointerUp(this, Vector2.Zero(), +key as number, 0, true);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _onWheelScroll(deltaX?: number, deltaY?: number): void {\r\n if (!this._isEnabled) {\r\n return;\r\n }\r\n const canNotify: boolean = this.onWheelObservable.notifyObservers(new Vector2(deltaX, deltaY));\r\n\r\n if (canNotify && this.parent != null) {\r\n this.parent._onWheelScroll(deltaX, deltaY);\r\n }\r\n }\r\n\r\n /** @internal */\r\n public _onCanvasBlur(): void {}\r\n\r\n /**\r\n * @internal\r\n */\r\n public _processObservables(\r\n type: number,\r\n x: number,\r\n y: number,\r\n pi: Nullable<PointerInfoBase>,\r\n pointerId: number,\r\n buttonIndex: number,\r\n deltaX?: number,\r\n deltaY?: number\r\n ): boolean {\r\n if (!this._isEnabled) {\r\n return false;\r\n }\r\n this._dummyVector2.copyFromFloats(x, y);\r\n if (type === PointerEventTypes.POINTERMOVE) {\r\n this._onPointerMove(this, this._dummyVector2, pointerId, pi);\r\n\r\n const previousControlOver = this._host._lastControlOver[pointerId];\r\n if (previousControlOver && previousControlOver !== this) {\r\n previousControlOver._onPointerOut(this, pi);\r\n }\r\n\r\n if (previousControlOver !== this) {\r\n this._onPointerEnter(this, pi);\r\n }\r\n\r\n this._host._lastControlOver[pointerId] = this;\r\n return true;\r\n }\r\n\r\n if (type === PointerEventTypes.POINTERDOWN) {\r\n this._onPointerDown(this, this._dummyVector2, pointerId, buttonIndex, pi);\r\n this._host._registerLastControlDown(this, pointerId);\r\n this._host._lastPickedControl = this;\r\n return true;\r\n }\r\n\r\n if (type === PointerEventTypes.POINTERUP) {\r\n if (this._host._lastControlDown[pointerId]) {\r\n this._host._lastControlDown[pointerId]._onPointerUp(this, this._dummyVector2, pointerId, buttonIndex, true, pi);\r\n }\r\n delete this._host._lastControlDown[pointerId];\r\n return true;\r\n }\r\n\r\n if (type === PointerEventTypes.POINTERWHEEL) {\r\n if (this._host._lastControlOver[pointerId]) {\r\n this._host._lastControlOver[pointerId]._onWheelScroll(deltaX, deltaY);\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n private _getStyleProperty(propName: \"fontStyle\" | \"fontWeight\" | \"fontFamily\", defaultValue: string): string {\r\n const prop = (this._style && this._style[propName]) ?? this[propName];\r\n if (!prop && this.parent) {\r\n return this.parent._getStyleProperty(propName, defaultValue);\r\n } else if (!this.parent) {\r\n return defaultValue;\r\n } else {\r\n return prop;\r\n }\r\n }\r\n\r\n private _prepareFont() {\r\n if (!this._font && !this._fontSet) {\r\n return;\r\n }\r\n\r\n this._font =\r\n this._getStyleProperty(\"fontStyle\", \"\") +\r\n \" \" +\r\n this._getStyleProperty(\"fontWeight\", \"\") +\r\n \" \" +\r\n this.fontSizeInPixels +\r\n \"px \" +\r\n this._getStyleProperty(\"fontFamily\", \"Arial\");\r\n\r\n this._fontOffset = Control._GetFontOffset(this._font);\r\n\r\n //children need to be refreshed\r\n this.getDescendants().forEach((child) => child._markAllAsDirty());\r\n }\r\n\r\n /**\r\n * A control has a dimension fully defined if that dimension doesn't depend on the parent's dimension.\r\n * As an example, a control that has dimensions in pixels is fully defined, while in percentage is not fully defined.\r\n * @param dim the dimension to check (width or height)\r\n * @returns if the dimension is fully defined\r\n */\r\n public isDimensionFullyDefined(dim: \"width\" | \"height\"): boolean {\r\n return this.getDimension(dim).isPixel;\r\n }\r\n\r\n /**\r\n * Gets the dimension of the control along a specified axis\r\n * @param dim the dimension to retrieve (width or height)\r\n * @returns the dimension value along the specified axis\r\n */\r\n public getDimension(dim: \"width\" | \"height\"): ValueAndUnit {\r\n if (dim === \"width\") {\r\n return this._width;\r\n } else {\r\n return this._height;\r\n }\r\n }\r\n\r\n /**\r\n * Clones a control and its descendants\r\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\r\n * @returns the cloned control\r\n */\r\n public clone(host?: AdvancedDynamicTexture): Control {\r\n const serialization: any = {};\r\n this.serialize(serialization, true);\r\n\r\n const controlType = Tools.Instantiate(\"BABYLON.GUI.\" + serialization.className);\r\n const cloned = new controlType();\r\n cloned.parse(serialization, host);\r\n\r\n return cloned;\r\n }\r\n\r\n /**\r\n * Parses a serialized object into this control\r\n * @param serializedObject the object with the serialized properties\r\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\r\n * @returns this control\r\n */\r\n public parse(serializedObject: any, host?: AdvancedDynamicTexture): Control {\r\n SerializationHelper.Parse(() => this, serializedObject, null);\r\n\r\n this.name = serializedObject.name;\r\n\r\n this._parseFromContent(serializedObject, host ?? this._host);\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Serializes the current control\r\n * @param serializationObject defined the JSON serialized object\r\n * @param force if the control should be serialized even if the isSerializable flag is set to false (default false)\r\n */\r\n public serialize(serializationObject: any, force: boolean = false) {\r\n if (!this.isSerializable && !force) {\r\n return;\r\n }\r\n SerializationHelper.Serialize(this, serializationObject);\r\n serializationObject.name = this.name;\r\n serializationObject.className = this.getClassName();\r\n\r\n // Call prepareFont to guarantee the font is properly set before serializing\r\n this._prepareFont();\r\n if (this._font) {\r\n serializationObject.fontFamily = this._fontFamily;\r\n serializationObject.fontSize = this.fontSize;\r\n serializationObject.fontWeight = this.fontWeight;\r\n serializationObject.fontStyle = this.fontStyle;\r\n }\r\n\r\n if (this._gradient) {\r\n serializationObject.gradient = {};\r\n this._gradient.serialize(serializationObject.gradient);\r\n }\r\n\r\n // Animations\r\n SerializationHelper.AppendSerializedAnimations(this, serializationObject);\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _parseFromContent(serializedObject: any, host: AdvancedDynamicTexture) {\r\n if (serializedObject.fontFamily) {\r\n this.fontFamily = serializedObject.fontFamily;\r\n }\r\n\r\n if (serializedObject.fontSize) {\r\n this.fontSize = serializedObject.fontSize;\r\n }\r\n\r\n if (serializedObject.fontWeight) {\r\n this.fontWeight = serializedObject.fontWeight;\r\n }\r\n\r\n if (serializedObject.fontStyle) {\r\n this.fontStyle = serializedObject.fontStyle;\r\n }\r\n\r\n // Gradient\r\n if (serializedObject.gradient) {\r\n const className = Tools.Instantiate(\"BABYLON.GUI.\" + serializedObject.gradient.className);\r\n this._gradient = new className();\r\n this._gradient?.parse(serializedObject.gradient);\r\n }\r\n\r\n // Animations\r\n if (serializedObject.animations) {\r\n this.animations = [];\r\n for (let animationIndex = 0; animationIndex < serializedObject.animations.length; animationIndex++) {\r\n const parsedAnimation = serializedObject.animations[animationIndex];\r\n const internalClass = GetClass(\"BABYLON.Animation\");\r\n if (internalClass) {\r\n this.animations.push(internalClass.Parse(parsedAnimation));\r\n }\r\n }\r\n\r\n if (serializedObject.autoAnimate && this._host && this._host.getScene()) {\r\n this._host\r\n .getScene()!\r\n .beginAnimation(\r\n this,\r\n serializedObject.autoAnimateFrom,\r\n serializedObject.autoAnimateTo,\r\n serializedObject.autoAnimateLoop,\r\n serializedObject.autoAnimateSpeed || 1.0\r\n );\r\n }\r\n }\r\n\r\n this.fixedRatioMasterIsWidth = serializedObject.fixedRatioMasterIsWidth ?? this.fixedRatioMasterIsWidth;\r\n }\r\n\r\n /** Releases associated resources */\r\n public dispose() {\r\n this.onDirtyObservable.clear();\r\n this.onBeforeDrawObservable.clear();\r\n this.onAfterDrawObservable.clear();\r\n this.onPointerDownObservable.clear();\r\n this.onPointerEnterObservable.clear();\r\n this.onPointerMoveObservable.clear();\r\n this.onPointerOutObservable.clear();\r\n this.onPointerUpObservable.clear();\r\n this.onPointerClickObservable.clear();\r\n this.onWheelObservable.clear();\r\n\r\n if (this._styleObserver && this._style) {\r\n this._style.onChangedObservable.remove(this._styleObserver);\r\n this._styleObserver = null;\r\n }\r\n\r\n if (this.parent) {\r\n this.parent.removeControl(this);\r\n this.parent = null;\r\n }\r\n\r\n if (this._host) {\r\n const index = this._host._linkedControls.indexOf(this);\r\n if (index > -1) {\r\n this.linkWithMesh(null);\r\n }\r\n }\r\n\r\n // Callback\r\n this.onDisposeObservable.notifyObservers(this);\r\n this.onDisposeObservable.clear();\r\n }\r\n\r\n // Statics\r\n private static _HORIZONTAL_ALIGNMENT_LEFT = 0;\r\n private static _HORIZONTAL_ALIGNMENT_RIGHT = 1;\r\n private static _HORIZONTAL_ALIGNMENT_CENTER = 2;\r\n\r\n private static _VERTICAL_ALIGNMENT_TOP = 0;\r\n private static _VERTICAL_ALIGNMENT_BOTTOM = 1;\r\n private static _VERTICAL_ALIGNMENT_CENTER = 2;\r\n\r\n /** HORIZONTAL_ALIGNMENT_LEFT */\r\n public static get HORIZONTAL_ALIGNMENT_LEFT(): number {\r\n return Control._HORIZONTAL_ALIGNMENT_LEFT;\r\n }\r\n\r\n /** HORIZONTAL_ALIGNMENT_RIGHT */\r\n public static get HORIZONTAL_ALIGNMENT_RIGHT(): number {\r\n return Control._HORIZONTAL_ALIGNMENT_RIGHT;\r\n }\r\n\r\n /** HORIZONTAL_ALIGNMENT_CENTER */\r\n public static get HORIZONTAL_ALIGNMENT_CENTER(): number {\r\n return Control._HORIZONTAL_ALIGNMENT_CENTER;\r\n }\r\n\r\n /** VERTICAL_ALIGNMENT_TOP */\r\n public static get VERTICAL_ALIGNMENT_TOP(): number {\r\n return Control._VERTICAL_ALIGNMENT_TOP;\r\n }\r\n\r\n /** VERTICAL_ALIGNMENT_BOTTOM */\r\n public static get VERTICAL_ALIGNMENT_BOTTOM(): number {\r\n return Control._VERTICAL_ALIGNMENT_BOTTOM;\r\n }\r\n\r\n /** VERTICAL_ALIGNMENT_CENTER */\r\n public static get VERTICAL_ALIGNMENT_CENTER(): number {\r\n return Control._VERTICAL_ALIGNMENT_CENTER;\r\n }\r\n\r\n private static _FontHeightSizes: { [key: string]: { ascent: number; height: number; descent: number } } = {};\r\n\r\n /**\r\n * @internal\r\n */\r\n public static _GetFontOffset(font: string): { ascent: number; height: number; descent: number } {\r\n if (Control._FontHeightSizes[font]) {\r\n return Control._FontHeightSizes[font];\r\n }\r\n\r\n const engine = EngineStore.LastCreatedEngine;\r\n if (!engine) {\r\n throw new Error(\"Invalid engine. Unable to create a canvas.\");\r\n }\r\n\r\n const result = engine.getFontOffset(font);\r\n Control._FontHeightSizes[font] = result;\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a Control from parsed data\r\n * @param serializedObject defines parsed data\r\n * @param host defines the hosting AdvancedDynamicTexture\r\n * @returns a new Control\r\n */\r\n public static Parse(serializedObject: any, host: AdvancedDynamicTexture): Control {\r\n const controlType = Tools.Instantiate(\"BABYLON.GUI.\" + serializedObject.className);\r\n const control = SerializationHelper.Parse(() => new controlType(), serializedObject, null);\r\n\r\n control.name = serializedObject.name;\r\n\r\n control._parseFromContent(serializedObject, host);\r\n\r\n return control;\r\n }\r\n\r\n public static AddHeader: (control: Control, text: string, size: string | number, options: { isHorizontal: boolean; controlFirst: boolean }) => any = () => {};\r\n\r\n /**\r\n * @internal\r\n */\r\n protected static drawEllipse(x: number, y: number, width: number, height: number, context: ICanvasRenderingContext): void {\r\n context.translate(x, y);\r\n context.scale(width, height);\r\n\r\n context.beginPath();\r\n context.arc(0, 0, 1, 0, 2 * Math.PI);\r\n context.closePath();\r\n\r\n context.scale(1 / width, 1 / height);\r\n context.translate(-x, -y);\r\n }\r\n\r\n /**\r\n * Returns true if the control is ready to be used\r\n * @returns\r\n */\r\n public isReady(): boolean {\r\n // Most controls are ready by default, so the default implementation is to return true\r\n return true;\r\n }\r\n}\r\nRegisterClass(\"BABYLON.GUI.Control\", Control);\r\n"]}
|