@babylonjs/gui 7.34.4 → 7.35.0
Sign up to get free protection for your applications and to get access to all the features.
- package/2D/FrameGraph/guiTask.js.map +1 -1
- package/2D/FrameGraph/renderGraphGUIBlock.js.map +1 -1
- package/2D/adtInstrumentation.js.map +1 -1
- package/2D/advancedDynamicTexture.d.ts +1 -1
- package/2D/advancedDynamicTexture.js.map +1 -1
- package/2D/controls/button.js.map +1 -1
- package/2D/controls/checkbox.js.map +1 -1
- package/2D/controls/colorpicker.js.map +1 -1
- package/2D/controls/container.js.map +1 -1
- package/2D/controls/control.js.map +1 -1
- package/2D/controls/displayGrid.js.map +1 -1
- package/2D/controls/ellipse.js.map +1 -1
- package/2D/controls/focusableButton.js.map +1 -1
- package/2D/controls/gradient/BaseGradient.js.map +1 -1
- package/2D/controls/grid.js.map +1 -1
- package/2D/controls/image.js.map +1 -1
- package/2D/controls/inputPassword.js.map +1 -1
- package/2D/controls/inputText.js.map +1 -1
- package/2D/controls/inputTextArea.js.map +1 -1
- package/2D/controls/line.js.map +1 -1
- package/2D/controls/multiLine.js.map +1 -1
- package/2D/controls/radioButton.js.map +1 -1
- package/2D/controls/rectangle.js.map +1 -1
- package/2D/controls/scrollViewers/scrollViewer.js.map +1 -1
- package/2D/controls/scrollViewers/scrollViewerWindow.js.map +1 -1
- package/2D/controls/selector.js.map +1 -1
- package/2D/controls/sliders/baseSlider.js.map +1 -1
- package/2D/controls/sliders/imageBasedSlider.js.map +1 -1
- package/2D/controls/sliders/imageScrollBar.js.map +1 -1
- package/2D/controls/sliders/scrollBar.js.map +1 -1
- package/2D/controls/sliders/slider.js.map +1 -1
- package/2D/controls/stackPanel.js.map +1 -1
- package/2D/controls/statics.js.map +1 -1
- package/2D/controls/textBlock.js.map +1 -1
- package/2D/controls/textWrapper.js.map +1 -1
- package/2D/controls/toggleButton.js.map +1 -1
- package/2D/controls/virtualKeyboard.js.map +1 -1
- package/2D/math2D.js.map +1 -1
- package/2D/measure.js.map +1 -1
- package/2D/multiLinePoint.js.map +1 -1
- package/2D/style.js.map +1 -1
- package/2D/valueAndUnit.js.map +1 -1
- package/2D/xmlLoader.js.map +1 -1
- package/3D/behaviors/defaultBehavior.js.map +1 -1
- package/3D/controls/MRTK3/touchHolographicButton.js.map +1 -1
- package/3D/controls/button3D.js.map +1 -1
- package/3D/controls/container3D.js.map +1 -1
- package/3D/controls/contentDisplay3D.js.map +1 -1
- package/3D/controls/control3D.js.map +1 -1
- package/3D/controls/cylinderPanel.js.map +1 -1
- package/3D/controls/holographicBackplate.js.map +1 -1
- package/3D/controls/holographicButton.js.map +1 -1
- package/3D/controls/holographicSlate.js.map +1 -1
- package/3D/controls/meshButton3D.js.map +1 -1
- package/3D/controls/nearMenu.js.map +1 -1
- package/3D/controls/planePanel.js.map +1 -1
- package/3D/controls/scatterPanel.js.map +1 -1
- package/3D/controls/slider3D.js.map +1 -1
- package/3D/controls/spherePanel.js.map +1 -1
- package/3D/controls/stackPanel3D.js.map +1 -1
- package/3D/controls/touchButton3D.js.map +1 -1
- package/3D/controls/touchHolographicButton.js.map +1 -1
- package/3D/controls/touchHolographicMenu.js.map +1 -1
- package/3D/controls/touchMeshButton3D.js.map +1 -1
- package/3D/controls/volumeBasedPanel.js.map +1 -1
- package/3D/gizmos/gizmoHandle.js.map +1 -1
- package/3D/gizmos/slateGizmo.js.map +1 -1
- package/3D/gui3DManager.js.map +1 -1
- package/3D/materials/fluent/fluentMaterial.js.map +1 -1
- package/3D/materials/fluentBackplate/fluentBackplateMaterial.js.map +1 -1
- package/3D/materials/fluentButton/fluentButtonMaterial.js.map +1 -1
- package/3D/materials/handle/handleMaterial.js.map +1 -1
- package/3D/materials/mrdl/mrdlBackglowMaterial.js.map +1 -1
- package/3D/materials/mrdl/mrdlBackplateMaterial.js.map +1 -1
- package/3D/materials/mrdl/mrdlFrontplateMaterial.js.map +1 -1
- package/3D/materials/mrdl/mrdlInnerquadMaterial.js.map +1 -1
- package/3D/materials/mrdl/mrdlSliderBarMaterial.js.map +1 -1
- package/3D/materials/mrdl/mrdlSliderThumbMaterial.js.map +1 -1
- package/legacy/legacy.js.map +1 -1
- package/package.json +2 -2
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"displayGrid.js","sourceRoot":"","sources":["../../../../../dev/gui/src/2D/controls/displayGrid.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,0CAA4B;AACpD,OAAO,EAAE,SAAS,EAAE,2CAA6B;AAGjD,mCAAmC;AACnC,MAAM,OAAO,WAAY,SAAQ,OAAO;IAiBpC,2FAA2F;IAE3F,IAAW,iBAAiB;QACxB,OAAO,IAAI,CAAC,kBAAkB,CAAC;IACnC,CAAC;IAED,IAAW,iBAAiB,CAAC,KAAc;QACvC,IAAI,IAAI,CAAC,kBAAkB,KAAK,KAAK,EAAE;YACnC,OAAO;SACV;QAED,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;QAChC,IAAI,CAAC,YAAY,EAAE,CAAC;IACxB,CAAC;IAED,2FAA2F;IAE3F,IAAW,iBAAiB;QACxB,OAAO,IAAI,CAAC,kBAAkB,CAAC;IACnC,CAAC;IAED,IAAW,iBAAiB,CAAC,KAAc;QACvC,IAAI,IAAI,CAAC,kBAAkB,KAAK,KAAK,EAAE;YACnC,OAAO;SACV;QAED,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;QAChC,IAAI,CAAC,YAAY,EAAE,CAAC;IACxB,CAAC;IAED,uDAAuD;IAEvD,IAAW,UAAU;QACjB,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IAED,IAAW,UAAU,CAAC,KAAa;QAC/B,IAAI,IAAI,CAAC,WAAW,KAAK,KAAK,EAAE;YAC5B,OAAO;SACV;QAED,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QACzB,IAAI,CAAC,YAAY,EAAE,CAAC;IACxB,CAAC;IAED,0DAA0D;IAE1D,IAAW,SAAS;QAChB,OAAO,I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E,OAAO,CAAC,SAAS,EAAE,CAAC;oBACpB,OAAO,CAAC,MAAM,EAAE,CAAC;iBACpB;aACJ;SACJ;QAED,OAAO,CAAC,OAAO,EAAE,CAAC;IACtB,CAAC;IAEkB,YAAY;QAC3B,OAAO,aAAa,CAAC;IACzB,CAAC;CACJ;AA/MG;IADC,SAAS,EAAE;oDAGX;AAaD;IADC,SAAS,EAAE;oDAGX;AAaD;IADC,SAAS,EAAE;6CAGX;AAaD;IADC,SAAS,EAAE;4CAGX;AAUD;IADC,SAAS,EAAE;6CAGX;AAUD;IADC,SAAS,EAAE;oDAGX;AAUD;IADC,SAAS,EAAE;iDAGX;AAUD;IADC,SAAS,EAAE;oDAGX;AAUD;IADC,SAAS,EAAE;iDAGX;AAUD;IADC,SAAS,EAAE;qDAGX;AAyFL,aAAa,CAAC,yBAAyB,EAAE,WAAW,CAAC,CAAC","sourcesContent":["import { Control } from \"./control\";\r\nimport { RegisterClass } from \"core/Misc/typeStore\";\r\nimport { serialize } from \"core/Misc/decorators\";\r\nimport type { ICanvasRenderingContext } from \"core/Engines/ICanvas\";\r\n\r\n/** Class used to render a grid */\r\nexport class DisplayGrid extends Control {\r\n private _cellWidth = 20;\r\n private _cellHeight = 20;\r\n\r\n private _minorLineTickness = 1;\r\n private _minorLineColor = \"DarkGray\";\r\n\r\n private _majorLineTickness = 2;\r\n private _majorLineColor = \"White\";\r\n\r\n private _majorLineFrequency = 5;\r\n\r\n private _background = \"Black\";\r\n\r\n private _displayMajorLines = true;\r\n private _displayMinorLines = true;\r\n\r\n /** Gets or sets a boolean indicating if minor lines must be rendered (true by default)) */\r\n @serialize()\r\n public get displayMinorLines(): boolean {\r\n return this._displayMinorLines;\r\n }\r\n\r\n public set displayMinorLines(value: boolean) {\r\n if (this._displayMinorLines === value) {\r\n return;\r\n }\r\n\r\n this._displayMinorLines = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /** Gets or sets a boolean indicating if major lines must be rendered (true by default)) */\r\n @serialize()\r\n public get displayMajorLines(): boolean {\r\n return this._displayMajorLines;\r\n }\r\n\r\n public set displayMajorLines(value: boolean) {\r\n if (this._displayMajorLines === value) {\r\n return;\r\n }\r\n\r\n this._displayMajorLines = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /** Gets or sets background color (Black by default) */\r\n @serialize()\r\n public get background(): string {\r\n return this._background;\r\n }\r\n\r\n public set background(value: string) {\r\n if (this._background === value) {\r\n return;\r\n }\r\n\r\n this._background = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /** Gets or sets the width of each cell (20 by default) */\r\n @serialize()\r\n public get cellWidth(): number {\r\n return this._cellWidth;\r\n }\r\n\r\n public set cellWidth(value: number) {\r\n this._cellWidth = value;\r\n\r\n this._markAsDirty();\r\n }\r\n\r\n /** Gets or sets the height of each cell (20 by default) */\r\n @serialize()\r\n public get cellHeight(): number {\r\n return this._cellHeight;\r\n }\r\n\r\n public set cellHeight(value: number) {\r\n this._cellHeight = value;\r\n\r\n this._markAsDirty();\r\n }\r\n\r\n /** Gets or sets the tickness of minor lines (1 by default) */\r\n @serialize()\r\n public get minorLineTickness(): number {\r\n return this._minorLineTickness;\r\n }\r\n\r\n public set minorLineTickness(value: number) {\r\n this._minorLineTickness = value;\r\n\r\n this._markAsDirty();\r\n }\r\n\r\n /** Gets or sets the color of minor lines (DarkGray by default) */\r\n @serialize()\r\n public get minorLineColor(): string {\r\n return this._minorLineColor;\r\n }\r\n\r\n public set minorLineColor(value: string) {\r\n this._minorLineColor = value;\r\n\r\n this._markAsDirty();\r\n }\r\n\r\n /** Gets or sets the tickness of major lines (2 by default) */\r\n @serialize()\r\n public get majorLineTickness(): number {\r\n return this._majorLineTickness;\r\n }\r\n\r\n public set majorLineTickness(value: number) {\r\n this._majorLineTickness = value;\r\n\r\n this._markAsDirty();\r\n }\r\n\r\n /** Gets or sets the color of major lines (White by default) */\r\n @serialize()\r\n public get majorLineColor(): string {\r\n return this._majorLineColor;\r\n }\r\n\r\n public set majorLineColor(value: string) {\r\n this._majorLineColor = value;\r\n\r\n this._markAsDirty();\r\n }\r\n\r\n /** Gets or sets the frequency of major lines (default is 1 every 5 minor lines)*/\r\n @serialize()\r\n public get majorLineFrequency(): number {\r\n return this._majorLineFrequency;\r\n }\r\n\r\n public set majorLineFrequency(value: number) {\r\n this._majorLineFrequency = value;\r\n\r\n this._markAsDirty();\r\n }\r\n\r\n /**\r\n * Creates a new GridDisplayRectangle\r\n * @param name defines the control name\r\n */\r\n constructor(public override name?: string) {\r\n super(name);\r\n }\r\n\r\n public override _draw(context: ICanvasRenderingContext): void {\r\n context.save();\r\n\r\n this._applyStates(context);\r\n\r\n if (this._isEnabled) {\r\n if (this._background) {\r\n context.fillStyle = this._background;\r\n context.fillRect(this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);\r\n }\r\n\r\n const cellCountX = this._currentMeasure.width / this._cellWidth;\r\n const cellCountY = this._currentMeasure.height / this._cellHeight;\r\n\r\n // Minor lines\r\n const left = this._currentMeasure.left + this._currentMeasure.width / 2;\r\n const top = this._currentMeasure.top + this._currentMeasure.height / 2;\r\n\r\n if (this._displayMinorLines) {\r\n context.strokeStyle = this._minorLineColor;\r\n context.lineWidth = this._minorLineTickness;\r\n\r\n for (let x = -cellCountX / 2 + 1; x < cellCountX / 2; x++) {\r\n const cellX = left + x * this.cellWidth;\r\n\r\n context.beginPath();\r\n context.moveTo(cellX, this._currentMeasure.top);\r\n context.lineTo(cellX, this._currentMeasure.top + this._currentMeasure.height);\r\n\r\n context.stroke();\r\n }\r\n\r\n for (let y = -cellCountY / 2 + 1; y < cellCountY / 2; y++) {\r\n const cellY = top + y * this.cellHeight;\r\n\r\n context.beginPath();\r\n context.moveTo(this._currentMeasure.left, cellY);\r\n context.lineTo(this._currentMeasure.left + this._currentMeasure.width, cellY);\r\n context.stroke();\r\n }\r\n }\r\n\r\n // Major lines\r\n if (this._displayMajorLines) {\r\n context.strokeStyle = this._majorLineColor;\r\n context.lineWidth = this._majorLineTickness;\r\n\r\n for (let x = -cellCountX / 2 + this._majorLineFrequency; x < cellCountX / 2; x += this._majorLineFrequency) {\r\n const cellX = left + x * this.cellWidth;\r\n\r\n context.beginPath();\r\n context.moveTo(cellX, this._currentMeasure.top);\r\n context.lineTo(cellX, this._currentMeasure.top + this._currentMeasure.height);\r\n context.stroke();\r\n }\r\n\r\n for (let y = -cellCountY / 2 + this._majorLineFrequency; y < cellCountY / 2; y += this._majorLineFrequency) {\r\n const cellY = top + y * this.cellHeight;\r\n context.moveTo(this._currentMeasure.left, cellY);\r\n context.lineTo(this._currentMeasure.left + this._currentMeasure.width, cellY);\r\n context.closePath();\r\n context.stroke();\r\n }\r\n }\r\n }\r\n\r\n context.restore();\r\n }\r\n\r\n protected override _getTypeName(): string {\r\n return \"DisplayGrid\";\r\n }\r\n}\r\nRegisterClass(\"BABYLON.GUI.DisplayGrid\", DisplayGrid);\r\n"]}
|
1
|
+
{"version":3,"file":"displayGrid.js","sourceRoot":"","sources":["../../../../../dev/gui/src/2D/controls/displayGrid.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,0CAA4B;AACpD,OAAO,EAAE,SAAS,EAAE,2CAA6B;AAGjD,mCAAmC;AACnC,MAAM,OAAO,WAAY,SAAQ,OAAO;IAiBpC,2FAA2F;IAE3F,IAAW,iBAAiB;QACxB,OAAO,IAAI,CAAC,kBAAkB,CAAC;IACnC,CAAC;IAED,IAAW,iBAAiB,CAAC,KAAc;QACvC,IAAI,IAAI,CAAC,kBAAkB,KAAK,KAAK,EAAE,CAAC;YACpC,OAAO;QACX,CAAC;QAED,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;QAChC,IAAI,CAAC,YAAY,EAAE,CAAC;IACxB,CAAC;IAED,2FAA2F;IAE3F,IAAW,iBAAiB;QACxB,OAAO,IAAI,CAAC,kBAAkB,CAAC;IACnC,CAAC;IAED,IAAW,iBAAiB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AAE,IAAI,CAAC,eAAe,CAAC,GAAG,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;oBAC9E,OAAO,CAAC,MAAM,EAAE,CAAC;gBACrB,CAAC;gBAED,KAAK,IAAI,CAAC,GAAG,CAAC,UAAU,GAAG,CAAC,GAAG,IAAI,CAAC,mBAAmB,EAAE,CAAC,GAAG,UAAU,GAAG,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,mBAAmB,EAAE,CAAC;oBACzG,MAAM,KAAK,GAAG,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC;oBACxC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;oBACjD,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,GAAG,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;oBAC9E,OAAO,CAAC,SAAS,EAAE,CAAC;oBACpB,OAAO,CAAC,MAAM,EAAE,CAAC;gBACrB,CAAC;YACL,CAAC;QACL,CAAC;QAED,OAAO,CAAC,OAAO,EAAE,CAAC;IACtB,CAAC;IAEkB,YAAY;QAC3B,OAAO,aAAa,CAAC;IACzB,CAAC;CACJ;AA/MG;IADC,SAAS,EAAE;oDAGX;AAaD;IADC,SAAS,EAAE;oDAGX;AAaD;IADC,SAAS,EAAE;6CAGX;AAaD;IADC,SAAS,EAAE;4CAGX;AAUD;IADC,SAAS,EAAE;6CAGX;AAUD;IADC,SAAS,EAAE;oDAGX;AAUD;IADC,SAAS,EAAE;iDAGX;AAUD;IADC,SAAS,EAAE;oDAGX;AAUD;IADC,SAAS,EAAE;iDAGX;AAUD;IADC,SAAS,EAAE;qDAGX;AAyFL,aAAa,CAAC,yBAAyB,EAAE,WAAW,CAAC,CAAC","sourcesContent":["import { Control } from \"./control\";\r\nimport { RegisterClass } from \"core/Misc/typeStore\";\r\nimport { serialize } from \"core/Misc/decorators\";\r\nimport type { ICanvasRenderingContext } from \"core/Engines/ICanvas\";\r\n\r\n/** Class used to render a grid */\r\nexport class DisplayGrid extends Control {\r\n private _cellWidth = 20;\r\n private _cellHeight = 20;\r\n\r\n private _minorLineTickness = 1;\r\n private _minorLineColor = \"DarkGray\";\r\n\r\n private _majorLineTickness = 2;\r\n private _majorLineColor = \"White\";\r\n\r\n private _majorLineFrequency = 5;\r\n\r\n private _background = \"Black\";\r\n\r\n private _displayMajorLines = true;\r\n private _displayMinorLines = true;\r\n\r\n /** Gets or sets a boolean indicating if minor lines must be rendered (true by default)) */\r\n @serialize()\r\n public get displayMinorLines(): boolean {\r\n return this._displayMinorLines;\r\n }\r\n\r\n public set displayMinorLines(value: boolean) {\r\n if (this._displayMinorLines === value) {\r\n return;\r\n }\r\n\r\n this._displayMinorLines = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /** Gets or sets a boolean indicating if major lines must be rendered (true by default)) */\r\n @serialize()\r\n public get displayMajorLines(): boolean {\r\n return this._displayMajorLines;\r\n }\r\n\r\n public set displayMajorLines(value: boolean) {\r\n if (this._displayMajorLines === value) {\r\n return;\r\n }\r\n\r\n this._displayMajorLines = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /** Gets or sets background color (Black by default) */\r\n @serialize()\r\n public get background(): string {\r\n return this._background;\r\n }\r\n\r\n public set background(value: string) {\r\n if (this._background === value) {\r\n return;\r\n }\r\n\r\n this._background = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /** Gets or sets the width of each cell (20 by default) */\r\n @serialize()\r\n public get cellWidth(): number {\r\n return this._cellWidth;\r\n }\r\n\r\n public set cellWidth(value: number) {\r\n this._cellWidth = value;\r\n\r\n this._markAsDirty();\r\n }\r\n\r\n /** Gets or sets the height of each cell (20 by default) */\r\n @serialize()\r\n public get cellHeight(): number {\r\n return this._cellHeight;\r\n }\r\n\r\n public set cellHeight(value: number) {\r\n this._cellHeight = value;\r\n\r\n this._markAsDirty();\r\n }\r\n\r\n /** Gets or sets the tickness of minor lines (1 by default) */\r\n @serialize()\r\n public get minorLineTickness(): number {\r\n return this._minorLineTickness;\r\n }\r\n\r\n public set minorLineTickness(value: number) {\r\n this._minorLineTickness = value;\r\n\r\n this._markAsDirty();\r\n }\r\n\r\n /** Gets or sets the color of minor lines (DarkGray by default) */\r\n @serialize()\r\n public get minorLineColor(): string {\r\n return this._minorLineColor;\r\n }\r\n\r\n public set minorLineColor(value: string) {\r\n this._minorLineColor = value;\r\n\r\n this._markAsDirty();\r\n }\r\n\r\n /** Gets or sets the tickness of major lines (2 by default) */\r\n @serialize()\r\n public get majorLineTickness(): number {\r\n return this._majorLineTickness;\r\n }\r\n\r\n public set majorLineTickness(value: number) {\r\n this._majorLineTickness = value;\r\n\r\n this._markAsDirty();\r\n }\r\n\r\n /** Gets or sets the color of major lines (White by default) */\r\n @serialize()\r\n public get majorLineColor(): string {\r\n return this._majorLineColor;\r\n }\r\n\r\n public set majorLineColor(value: string) {\r\n this._majorLineColor = value;\r\n\r\n this._markAsDirty();\r\n }\r\n\r\n /** Gets or sets the frequency of major lines (default is 1 every 5 minor lines)*/\r\n @serialize()\r\n public get majorLineFrequency(): number {\r\n return this._majorLineFrequency;\r\n }\r\n\r\n public set majorLineFrequency(value: number) {\r\n this._majorLineFrequency = value;\r\n\r\n this._markAsDirty();\r\n }\r\n\r\n /**\r\n * Creates a new GridDisplayRectangle\r\n * @param name defines the control name\r\n */\r\n constructor(public override name?: string) {\r\n super(name);\r\n }\r\n\r\n public override _draw(context: ICanvasRenderingContext): void {\r\n context.save();\r\n\r\n this._applyStates(context);\r\n\r\n if (this._isEnabled) {\r\n if (this._background) {\r\n context.fillStyle = this._background;\r\n context.fillRect(this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);\r\n }\r\n\r\n const cellCountX = this._currentMeasure.width / this._cellWidth;\r\n const cellCountY = this._currentMeasure.height / this._cellHeight;\r\n\r\n // Minor lines\r\n const left = this._currentMeasure.left + this._currentMeasure.width / 2;\r\n const top = this._currentMeasure.top + this._currentMeasure.height / 2;\r\n\r\n if (this._displayMinorLines) {\r\n context.strokeStyle = this._minorLineColor;\r\n context.lineWidth = this._minorLineTickness;\r\n\r\n for (let x = -cellCountX / 2 + 1; x < cellCountX / 2; x++) {\r\n const cellX = left + x * this.cellWidth;\r\n\r\n context.beginPath();\r\n context.moveTo(cellX, this._currentMeasure.top);\r\n context.lineTo(cellX, this._currentMeasure.top + this._currentMeasure.height);\r\n\r\n context.stroke();\r\n }\r\n\r\n for (let y = -cellCountY / 2 + 1; y < cellCountY / 2; y++) {\r\n const cellY = top + y * this.cellHeight;\r\n\r\n context.beginPath();\r\n context.moveTo(this._currentMeasure.left, cellY);\r\n context.lineTo(this._currentMeasure.left + this._currentMeasure.width, cellY);\r\n context.stroke();\r\n }\r\n }\r\n\r\n // Major lines\r\n if (this._displayMajorLines) {\r\n context.strokeStyle = this._majorLineColor;\r\n context.lineWidth = this._majorLineTickness;\r\n\r\n for (let x = -cellCountX / 2 + this._majorLineFrequency; x < cellCountX / 2; x += this._majorLineFrequency) {\r\n const cellX = left + x * this.cellWidth;\r\n\r\n context.beginPath();\r\n context.moveTo(cellX, this._currentMeasure.top);\r\n context.lineTo(cellX, this._currentMeasure.top + this._currentMeasure.height);\r\n context.stroke();\r\n }\r\n\r\n for (let y = -cellCountY / 2 + this._majorLineFrequency; y < cellCountY / 2; y += this._majorLineFrequency) {\r\n const cellY = top + y * this.cellHeight;\r\n context.moveTo(this._currentMeasure.left, cellY);\r\n context.lineTo(this._currentMeasure.left + this._currentMeasure.width, cellY);\r\n context.closePath();\r\n context.stroke();\r\n }\r\n }\r\n }\r\n\r\n context.restore();\r\n }\r\n\r\n protected override _getTypeName(): string {\r\n return \"DisplayGrid\";\r\n }\r\n}\r\nRegisterClass(\"BABYLON.GUI.DisplayGrid\", DisplayGrid);\r\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ellipse.js","sourceRoot":"","sources":["../../../../../dev/gui/src/2D/controls/ellipse.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,aAAa,EAAE,0CAA4B;AACpD,OAAO,EAAE,SAAS,EAAE,2CAA6B;AAGjD,iDAAiD;AACjD,MAAM,OAAO,OAAQ,SAAQ,SAAS;IAGlC,oCAAoC;IAEpC,IAAW,SAAS;QAChB,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAED,IAAW,SAAS,CAAC,KAAa;QAC9B,IAAI,IAAI,CAAC,UAAU,KAAK,KAAK,EAAE;
|
1
|
+
{"version":3,"file":"ellipse.js","sourceRoot":"","sources":["../../../../../dev/gui/src/2D/controls/ellipse.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,aAAa,EAAE,0CAA4B;AACpD,OAAO,EAAE,SAAS,EAAE,2CAA6B;AAGjD,iDAAiD;AACjD,MAAM,OAAO,OAAQ,SAAQ,SAAS;IAGlC,oCAAoC;IAEpC,IAAW,SAAS;QAChB,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAED,IAAW,SAAS,CAAC,KAAa;QAC9B,IAAI,IAAI,CAAC,UAAU,KAAK,KAAK,EAAE,CAAC;YAC5B,OAAO;QACX,CAAC;QAED,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QACxB,IAAI,CAAC,YAAY,EAAE,CAAC;IACxB,CAAC;IAID,sFAAsF;IAEtF,IAAW,GAAG;QACV,OAAO,IAAI,CAAC,IAAI,CAAC;IACrB,CAAC;IAED,IAAW,GAAG,CAAC,KAAa;QACxB,IAAI,IAAI,CAAC,IAAI,KAAK,KAAK,EAAE,CAAC;YACtB,OAAO;QACX,CAAC;QAED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C,EAC1D,IAAI,CAAC,eAAe,CAAC,KAAK,GAAG,CAAC,EAC9B,IAAI,CAAC,eAAe,CAAC,MAAM,GAAG,CAAC,EAC/B,IAAI,CAAC,IAAI,EACT,OAAO,CACV,CAAC;QAEF,OAAO,CAAC,IAAI,EAAE,CAAC;IACnB,CAAC;IAEe,wBAAwB,CAAC,OAAgC;QACrE,OAAO,CAAC,WAAW,CACf,IAAI,CAAC,eAAe,CAAC,IAAI,GAAG,IAAI,CAAC,eAAe,CAAC,KAAK,GAAG,CAAC,EAC1D,IAAI,CAAC,eAAe,CAAC,GAAG,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,GAAG,CAAC,EAC1D,IAAI,CAAC,eAAe,CAAC,KAAK,GAAG,CAAC,GAAG,IAAI,CAAC,mBAAmB,GAAG,CAAC,EAC7D,IAAI,CAAC,eAAe,CAAC,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC,mBAAmB,GAAG,CAAC,EAC9D,IAAI,CAAC,IAAI,EACT,OAAO,CACV,CAAC;QACF,OAAO,CAAC,MAAM,EAAE,CAAC;IACrB,CAAC;CACJ;AAtHG;IADC,SAAS,EAAE;wCAGX;AAeD;IADC,SAAS,EAAE;kCAGX;AAoGL,aAAa,CAAC,qBAAqB,EAAE,OAAO,CAAC,CAAC","sourcesContent":["import { Container } from \"./container\";\r\nimport { Control } from \"./control\";\r\nimport type { Measure } from \"../measure\";\r\nimport { RegisterClass } from \"core/Misc/typeStore\";\r\nimport { serialize } from \"core/Misc/decorators\";\r\nimport type { ICanvasRenderingContext } from \"core/Engines/ICanvas\";\r\n\r\n/** Class used to create 2D ellipse containers */\r\nexport class Ellipse extends Container {\r\n private _thickness = 1;\r\n\r\n /** Gets or sets border thickness */\r\n @serialize()\r\n public get thickness(): number {\r\n return this._thickness;\r\n }\r\n\r\n public set thickness(value: number) {\r\n if (this._thickness === value) {\r\n return;\r\n }\r\n\r\n this._thickness = value;\r\n this._markAsDirty();\r\n }\r\n\r\n private _arc = 1;\r\n\r\n /** Gets or sets arcing of the ellipse (ratio of the circumference between 0 and 1) */\r\n @serialize()\r\n public get arc(): number {\r\n return this._arc;\r\n }\r\n\r\n public set arc(value: number) {\r\n if (this._arc === value) {\r\n return;\r\n }\r\n\r\n this._arc = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /**\r\n * Creates a new Ellipse\r\n * @param name defines the control name\r\n */\r\n constructor(public override name?: string) {\r\n super(name);\r\n }\r\n\r\n protected override _getTypeName(): string {\r\n return \"Ellipse\";\r\n }\r\n\r\n protected override _localDraw(context: ICanvasRenderingContext): void {\r\n context.save();\r\n\r\n if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {\r\n context.shadowColor = this.shadowColor;\r\n context.shadowBlur = this.shadowBlur;\r\n context.shadowOffsetX = this.shadowOffsetX;\r\n context.shadowOffsetY = this.shadowOffsetY;\r\n }\r\n\r\n Control.drawEllipse(\r\n this._currentMeasure.left + this._currentMeasure.width / 2,\r\n this._currentMeasure.top + this._currentMeasure.height / 2,\r\n this._currentMeasure.width / 2 - this._thickness / 2,\r\n this._currentMeasure.height / 2 - this._thickness / 2,\r\n this._arc,\r\n context\r\n );\r\n\r\n if (this._backgroundGradient || this._background) {\r\n context.fillStyle = this._getBackgroundColor(context);\r\n\r\n context.fill();\r\n }\r\n\r\n if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {\r\n context.shadowBlur = 0;\r\n context.shadowOffsetX = 0;\r\n context.shadowOffsetY = 0;\r\n }\r\n\r\n if (this._thickness) {\r\n if (this.color) {\r\n context.strokeStyle = this.color;\r\n }\r\n context.lineWidth = this._thickness;\r\n\r\n context.stroke();\r\n }\r\n\r\n context.restore();\r\n }\r\n\r\n protected override _additionalProcessing(parentMeasure: Measure, context: ICanvasRenderingContext): void {\r\n super._additionalProcessing(parentMeasure, context);\r\n\r\n this._measureForChildren.width -= 2 * this._thickness;\r\n this._measureForChildren.height -= 2 * this._thickness;\r\n this._measureForChildren.left += this._thickness;\r\n this._measureForChildren.top += this._thickness;\r\n }\r\n\r\n protected override _clipForChildren(context: ICanvasRenderingContext) {\r\n Control.drawEllipse(\r\n this._currentMeasure.left + this._currentMeasure.width / 2,\r\n this._currentMeasure.top + this._currentMeasure.height / 2,\r\n this._currentMeasure.width / 2,\r\n this._currentMeasure.height / 2,\r\n this._arc,\r\n context\r\n );\r\n\r\n context.clip();\r\n }\r\n\r\n public override _renderHighlightSpecific(context: ICanvasRenderingContext): void {\r\n Control.drawEllipse(\r\n this._currentMeasure.left + this._currentMeasure.width / 2,\r\n this._currentMeasure.top + this._currentMeasure.height / 2,\r\n this._currentMeasure.width / 2 - this._highlightLineWidth / 2,\r\n this._currentMeasure.height / 2 - this._highlightLineWidth / 2,\r\n this._arc,\r\n context\r\n );\r\n context.stroke();\r\n }\r\n}\r\nRegisterClass(\"BABYLON.GUI.Ellipse\", Ellipse);\r\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"focusableButton.js","sourceRoot":"","sources":["../../../../../dev/gui/src/2D/controls/focusableButton.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,aAAa,EAAE,0CAA4B;AAIpD;;;GAGG;AACH,MAAM,OAAO,eAAgB,SAAQ,MAAM;IACvC,YAA4B,IAAa;QACrC,KAAK,CAAC,IAAI,CAAC,CAAC;QADY,SAAI,GAAJ,IAAI,CAAS;QAGrC,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC;IACtC,CAAC;IAED;;OAEG;IACa,cAAc,CAAC,MAAe,EAAE,WAAoB,EAAE,SAAiB,EAAE,WAAmB,EAAE,EAAmB;QAC7H,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;
|
1
|
+
{"version":3,"file":"focusableButton.js","sourceRoot":"","sources":["../../../../../dev/gui/src/2D/controls/focusableButton.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,aAAa,EAAE,0CAA4B;AAIpD;;;GAGG;AACH,MAAM,OAAO,eAAgB,SAAQ,MAAM;IACvC,YAA4B,IAAa;QACrC,KAAK,CAAC,IAAI,CAAC,CAAC;QADY,SAAI,GAAJ,IAAI,CAAS;QAGrC,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC;IACtC,CAAC;IAED;;OAEG;IACa,cAAc,CAAC,MAAe,EAAE,WAAoB,EAAE,SAAiB,EAAE,WAAmB,EAAE,EAAmB;QAC7H,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;YACnB,kCAAkC;YAClC,IAAI,CAAC,KAAK,EAAE,CAAC;QACjB,CAAC;QAED,OAAO,KAAK,CAAC,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,EAAE,CAAC,CAAC;IACjF,CAAC;CACJ;AACD,aAAa,CAAC,6BAA6B,EAAE,eAAe,CAAC,CAAC","sourcesContent":["import type { Vector2 } from \"core/Maths/math.vector\";\r\n\r\nimport { Button } from \"./button\";\r\nimport type { Control } from \"./control\";\r\nimport { RegisterClass } from \"core/Misc/typeStore\";\r\nimport type { PointerInfoBase } from \"core/Events/pointerEvents\";\r\nimport type { IFocusableControl } from \"./focusableControl\";\r\n\r\n/**\r\n * Class used to create a focusable button that can easily handle keyboard events\r\n * @since 5.0.0\r\n */\r\nexport class FocusableButton extends Button implements IFocusableControl {\r\n constructor(public override name?: string) {\r\n super(name);\r\n\r\n this._unfocusedColor = this.color;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public override _onPointerDown(target: Control, coordinates: Vector2, pointerId: number, buttonIndex: number, pi: PointerInfoBase): boolean {\r\n if (!this.isReadOnly) {\r\n // Clicking on button should focus\r\n this.focus();\r\n }\r\n\r\n return super._onPointerDown(target, coordinates, pointerId, buttonIndex, pi);\r\n }\r\n}\r\nRegisterClass(\"BABYLON.GUI.FocusableButton\", FocusableButton);\r\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"BaseGradient.js","sourceRoot":"","sources":["../../../../../../dev/gui/src/2D/controls/gradient/BaseGradient.ts"],"names":[],"mappings":"AAAA;;GAEG;AAkBH;;GAEG;AACH,MAAM,OAAgB,YAAY;IAAlC;QACY,gBAAW,GAAwB,EAAE,CAAC;QAItC,mBAAc,GAAY,IAAI,CAAC;IAuF3C,CAAC;IA/EW,8BAA8B;QAClC,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,WAAW,EAAE;
|
1
|
+
{"version":3,"file":"BaseGradient.js","sourceRoot":"","sources":["../../../../../../dev/gui/src/2D/controls/gradient/BaseGradient.ts"],"names":[],"mappings":"AAAA;;GAEG;AAkBH;;GAEG;AACH,MAAM,OAAgB,YAAY;IAAlC;QACY,gBAAW,GAAwB,EAAE,CAAC;QAItC,mBAAc,GAAY,IAAI,CAAC;IAuF3C,CAAC;IA/EW,8BAA8B;QAClC,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YAClC,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;QAC/D,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACI,iBAAiB,CAAC,OAAgC;QACrD,IAAI,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;YACnD,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;YACxB,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC;YAC3D,IAAI,CAAC,8BAA8B,EAAE,CAAC;YACtC,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;QAChC,CAAC;QACD,OAAO,IAAI,CAAC,eAAe,CAAC;IAChC,CAAC;IAED;;;;OAIG;IACI,YAAY,CAAC,MAAc,EAAE,KAAa;QAC7C,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;QACzC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;IAC/B,CAAC;IAED;;;OAGG;IACI,eAAe,CAAC,MAAc;QACjC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC;QACvF,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;IAC/B,CAAC;IAED;;OAEG;IACI,eAAe;QAClB,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACtB,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;IAC/B,CAAC;IAED;;OAEG;IACH,IAAW,UAAU;QACjB,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IAED;;OAEG;IACI,YAAY;QACf,OAAO,cAAc,CAAC;IAC1B,CAAC;IAED;;;OAGG;IACI,SAAS,CAAC,mBAAwB;QACrC,mBAAmB,CAAC,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC;QAClD,mBAAmB,CAAC,SAAS,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;IACxD,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,mBAAwB;QACjC,IAAI,CAAC,WAAW,GAAG,mBAAmB,CAAC,UAAU,CAAC;IACtD,CAAC;CACJ","sourcesContent":["/*\r\n * Base Gradient class. Should not be used directly.\r\n */\r\n\r\nimport type { ICanvasGradient, ICanvasRenderingContext } from \"core/Engines/ICanvas\";\r\n\r\n/**\r\n * Type that represents a single stop on the gradient.\r\n */\r\nexport type GradientColorStop = {\r\n /**\r\n * Offset from the start where the color will be applied.\r\n */\r\n offset: number;\r\n /**\r\n * Color to be applied.\r\n */\r\n color: string;\r\n};\r\n\r\n/**\r\n * Class that serves as a base for all the gradients created from context.\r\n */\r\nexport abstract class BaseGradient {\r\n private _colorStops: GradientColorStop[] = [];\r\n\r\n private _canvasGradient: CanvasGradient;\r\n private _context: ICanvasRenderingContext;\r\n private _gradientDirty: boolean = true;\r\n\r\n /**\r\n * Overwritten by child classes to create the canvas gradient.\r\n * @param context\r\n */\r\n protected abstract _createCanvasGradient(context: ICanvasRenderingContext): ICanvasGradient;\r\n\r\n private _addColorStopsToCanvasGradient() {\r\n for (const stop of this._colorStops) {\r\n this._canvasGradient.addColorStop(stop.offset, stop.color);\r\n }\r\n }\r\n\r\n /**\r\n * If there are any changes or the context changed, regenerate the canvas gradient object. Else,\r\n * reuse the existing gradient.\r\n * @param context the context to create the gradient from\r\n * @returns the canvas gradient\r\n */\r\n public getCanvasGradient(context: ICanvasRenderingContext) {\r\n if (this._gradientDirty || this._context !== context) {\r\n this._context = context;\r\n this._canvasGradient = this._createCanvasGradient(context);\r\n this._addColorStopsToCanvasGradient();\r\n this._gradientDirty = false;\r\n }\r\n return this._canvasGradient;\r\n }\r\n\r\n /**\r\n * Adds a new color stop to the gradient.\r\n * @param offset the offset of the stop on the gradient. Should be between 0 and 1\r\n * @param color the color of the stop\r\n */\r\n public addColorStop(offset: number, color: string) {\r\n this._colorStops.push({ offset, color });\r\n this._gradientDirty = true;\r\n }\r\n\r\n /**\r\n * Removes an existing color stop with the specified offset from the gradient\r\n * @param offset the offset of the stop to be removed\r\n */\r\n public removeColorStop(offset: number) {\r\n this._colorStops = this._colorStops.filter((colorStop) => colorStop.offset !== offset);\r\n this._gradientDirty = true;\r\n }\r\n\r\n /**\r\n * Removes all color stops from the gradient\r\n */\r\n public clearColorStops() {\r\n this._colorStops = [];\r\n this._gradientDirty = true;\r\n }\r\n\r\n /**\r\n * Color stops of the gradient\r\n */\r\n public get colorStops() {\r\n return this._colorStops;\r\n }\r\n\r\n /**\r\n * @returns Type of the gradient\r\n */\r\n public getClassName() {\r\n return \"BaseGradient\";\r\n }\r\n\r\n /**\r\n * Serialize into a json object\r\n * @param serializationObject object to serialize into\r\n */\r\n public serialize(serializationObject: any) {\r\n serializationObject.colorStops = this._colorStops;\r\n serializationObject.className = this.getClassName();\r\n }\r\n\r\n /**\r\n * Parse from json object\r\n * @param serializationObject object to parse from\r\n */\r\n public parse(serializationObject: any) {\r\n this._colorStops = serializationObject.colorStops;\r\n }\r\n}\r\n"]}
|
package/2D/controls/grid.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"grid.js","sourceRoot":"","sources":["../../../../../dev/gui/src/2D/controls/grid.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,KAAK,EAAE,sCAAwB;AACxC,OAAO,EAAE,aAAa,EAAE,0CAA4B;AAIpD,OAAO,EAAE,SAAS,EAAE,2CAA6B;AAEjD;;GAEG;AACH,MAAM,OAAO,IAAK,SAAQ,SAAS;IAQ/B;;;OAGG;IACH,IAAoB,WAAW,CAAC,KAAc;QAC1C,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;QAE1B,gEAAgE;QAChE,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,MAAM,EAAE;YAC3B,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,WAAW,GAAG,KAAK,CAAC;SACxC;IACL,CAAC;IAGD,IAAoB,WAAW;QAC3B,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED;;;OAGG;IACH,IAAoB,YAAY,CAAC,KAAc;QAC3C,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;QAE3B,gEAAgE;QAChE,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,MAAM,EAAE;YAC3B,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,YAAY,GAAG,KAAK,CAAC;SACzC;IACL,CAAC;IAED,IAAoB,YAAY;QAC5B,OAAO,IAAI,CAAC,aAAa,CAA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C,gBAAgB,CAAC,QAAQ,EAAE,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;SAC9D;QAED,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE;YACtC,MAAM,QAAQ,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAC1C,IAAI,SAAS,GAAG,QAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YACtE,IAAI,KAAK,CAAC,SAAS,CAAC,EAAE;gBAClB,SAAS,GAAG,CAAC,CAAC;aACjB;YACD,IAAI,YAAY,GAAG,QAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YAC1E,IAAI,KAAK,CAAC,YAAY,CAAC,EAAE;gBACrB,YAAY,GAAG,CAAC,CAAC;aACpB;YACD,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,YAAY,CAAC,CAAC;SACzD;IACL,CAAC;CACJ;AAnkBG;IADC,SAAS,EAAE;uCAGX;AAkkBL,aAAa,CAAC,kBAAkB,EAAE,IAAI,CAAC,CAAC","sourcesContent":["import type { Nullable } from \"core/types\";\r\n\r\nimport { Container } from \"./container\";\r\nimport { ValueAndUnit } from \"../valueAndUnit\";\r\nimport { Control } from \"./control\";\r\nimport type { Measure } from \"../measure\";\r\nimport { Tools } from \"core/Misc/tools\";\r\nimport { RegisterClass } from \"core/Misc/typeStore\";\r\nimport type { ICanvasRenderingContext } from \"core/Engines/ICanvas\";\r\nimport type { AdvancedDynamicTexture } from \"../advancedDynamicTexture\";\r\nimport type { Observer } from \"core/Misc/observable\";\r\nimport { serialize } from \"core/Misc/decorators\";\r\n\r\n/**\r\n * Class used to create a 2D grid container\r\n */\r\nexport class Grid extends Container {\r\n private _rowDefinitions = new Array<ValueAndUnit>();\r\n private _rowDefinitionObservers: Observer<void>[] = [];\r\n private _columnDefinitions = new Array<ValueAndUnit>();\r\n private _columnDefinitionObservers: Observer<void>[] = [];\r\n private _cells: { [key: string]: Container } = {};\r\n private _childControls = new Array<Control>();\r\n\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 override set clipContent(value: boolean) {\r\n this._clipContent = value;\r\n\r\n // This value has to be replicated on all of the container cells\r\n for (const key in this._cells) {\r\n this._cells[key].clipContent = value;\r\n }\r\n }\r\n\r\n @serialize()\r\n public override get clipContent(): boolean {\r\n return this._clipContent;\r\n }\r\n\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 override set clipChildren(value: boolean) {\r\n this._clipChildren = value;\r\n\r\n // This value has to be replicated on all of the container cells\r\n for (const key in this._cells) {\r\n this._cells[key].clipChildren = value;\r\n }\r\n }\r\n\r\n public override get clipChildren(): boolean {\r\n return this._clipChildren;\r\n }\r\n\r\n /**\r\n * Gets the number of columns\r\n */\r\n public get columnCount(): number {\r\n return this._columnDefinitions.length;\r\n }\r\n\r\n /**\r\n * Gets the number of rows\r\n */\r\n public get rowCount(): number {\r\n return this._rowDefinitions.length;\r\n }\r\n\r\n /** Gets the list of children */\r\n public override get children(): Control[] {\r\n return this._childControls;\r\n }\r\n\r\n /** Gets the list of cells (e.g. the containers) */\r\n public get cells(): { [key: string]: Container } {\r\n return this._cells;\r\n }\r\n\r\n /**\r\n * Gets the definition of a specific row\r\n * @param index defines the index of the row\r\n * @returns the row definition\r\n */\r\n public getRowDefinition(index: number): Nullable<ValueAndUnit> {\r\n if (index < 0 || index >= this._rowDefinitions.length) {\r\n return null;\r\n }\r\n\r\n return this._rowDefinitions[index];\r\n }\r\n\r\n /**\r\n * Gets the definition of a specific column\r\n * @param index defines the index of the column\r\n * @returns the column definition\r\n */\r\n public getColumnDefinition(index: number): Nullable<ValueAndUnit> {\r\n if (index < 0 || index >= this._columnDefinitions.length) {\r\n return null;\r\n }\r\n\r\n return this._columnDefinitions[index];\r\n }\r\n\r\n /**\r\n * Adds a new row to the grid\r\n * @param height defines the height of the row (either in pixel or a value between 0 and 1)\r\n * @param isPixel defines if the height is expressed in pixel (or in percentage)\r\n * @returns the current grid\r\n */\r\n public addRowDefinition(height: number, isPixel = false): Grid {\r\n this._rowDefinitions.push(new ValueAndUnit(height, isPixel ? ValueAndUnit.UNITMODE_PIXEL : ValueAndUnit.UNITMODE_PERCENTAGE));\r\n this._rowDefinitionObservers.push(this._rowDefinitions[this.rowCount - 1].onChangedObservable.add(() => this._markAsDirty())!);\r\n this._markAsDirty();\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Adds a new column to the grid\r\n * @param width defines the width of the column (either in pixel or a value between 0 and 1)\r\n * @param isPixel defines if the width is expressed in pixel (or in percentage)\r\n * @returns the current grid\r\n */\r\n public addColumnDefinition(width: number, isPixel = false): Grid {\r\n this._columnDefinitions.push(new ValueAndUnit(width, isPixel ? ValueAndUnit.UNITMODE_PIXEL : ValueAndUnit.UNITMODE_PERCENTAGE));\r\n this._columnDefinitionObservers.push(this._columnDefinitions[this.columnCount - 1].onChangedObservable.add(() => this._markAsDirty())!);\r\n this._markAsDirty();\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Update a row definition\r\n * @param index defines the index of the row to update\r\n * @param height defines the height of the row (either in pixel or a value between 0 and 1)\r\n * @param isPixel defines if the weight is expressed in pixel (or in percentage)\r\n * @returns the current grid\r\n */\r\n public setRowDefinition(index: number, height: number, isPixel = false): Grid {\r\n if (index < 0 || index >= this._rowDefinitions.length) {\r\n return this;\r\n }\r\n\r\n const current = this._rowDefinitions[index];\r\n if (current && current.isPixel === isPixel && current.value === height) {\r\n return this;\r\n }\r\n\r\n this._rowDefinitions[index].onChangedObservable.remove(this._rowDefinitionObservers[index]);\r\n this._rowDefinitions[index] = new ValueAndUnit(height, isPixel ? ValueAndUnit.UNITMODE_PIXEL : ValueAndUnit.UNITMODE_PERCENTAGE);\r\n this._rowDefinitionObservers[index] = this._rowDefinitions[index].onChangedObservable.add(() => this._markAsDirty())!;\r\n\r\n this._markAsDirty();\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Update a column definition\r\n * @param index defines the index of the column to update\r\n * @param width defines the width of the column (either in pixel or a value between 0 and 1)\r\n * @param isPixel defines if the width is expressed in pixel (or in percentage)\r\n * @returns the current grid\r\n */\r\n public setColumnDefinition(index: number, width: number, isPixel = false): Grid {\r\n if (index < 0 || index >= this._columnDefinitions.length) {\r\n return this;\r\n }\r\n\r\n const current = this._columnDefinitions[index];\r\n if (current && current.isPixel === isPixel && current.value === width) {\r\n return this;\r\n }\r\n\r\n this._columnDefinitions[index].onChangedObservable.remove(this._columnDefinitionObservers[index]);\r\n this._columnDefinitions[index] = new ValueAndUnit(width, isPixel ? ValueAndUnit.UNITMODE_PIXEL : ValueAndUnit.UNITMODE_PERCENTAGE);\r\n this._columnDefinitionObservers[index] = this._columnDefinitions[index].onChangedObservable.add(() => this._markAsDirty())!;\r\n\r\n this._markAsDirty();\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Gets the list of children stored in a specific cell\r\n * @param row defines the row to check\r\n * @param column defines the column to check\r\n * @returns the list of controls\r\n */\r\n public getChildrenAt(row: number, column: number): Nullable<Array<Control>> {\r\n const cell = this._cells[`${row}:${column}`];\r\n\r\n if (!cell) {\r\n return null;\r\n }\r\n\r\n return cell.children;\r\n }\r\n\r\n /**\r\n * Gets a string representing the child cell info (row x column)\r\n * @param child defines the control to get info from\r\n * @returns a string containing the child cell info (row x column)\r\n */\r\n public getChildCellInfo(child: Control): string {\r\n return child._tag;\r\n }\r\n\r\n private _removeCell(cell: Container, key: string) {\r\n if (!cell) {\r\n return;\r\n }\r\n\r\n super.removeControl(cell);\r\n\r\n for (const control of cell.children) {\r\n const childIndex = this._childControls.indexOf(control);\r\n\r\n if (childIndex !== -1) {\r\n this._childControls.splice(childIndex, 1);\r\n }\r\n }\r\n\r\n delete this._cells[key];\r\n }\r\n\r\n private _offsetCell(previousKey: string, key: string) {\r\n if (!this._cells[key]) {\r\n return;\r\n }\r\n\r\n this._cells[previousKey] = this._cells[key];\r\n\r\n for (const control of this._cells[previousKey].children) {\r\n control._tag = previousKey;\r\n }\r\n\r\n delete this._cells[key];\r\n }\r\n\r\n /**\r\n * Remove a column definition at specified index\r\n * @param index defines the index of the column to remove\r\n * @returns the current grid\r\n */\r\n public removeColumnDefinition(index: number): Grid {\r\n if (index < 0 || index >= this._columnDefinitions.length) {\r\n return this;\r\n }\r\n\r\n for (let x = 0; x < this._rowDefinitions.length; x++) {\r\n const key = `${x}:${index}`;\r\n const cell = this._cells[key];\r\n\r\n this._removeCell(cell, key);\r\n }\r\n\r\n for (let x = 0; x < this._rowDefinitions.length; x++) {\r\n for (let y = index + 1; y < this._columnDefinitions.length; y++) {\r\n const previousKey = `${x}:${y - 1}`;\r\n const key = `${x}:${y}`;\r\n\r\n this._offsetCell(previousKey, key);\r\n }\r\n }\r\n\r\n this._columnDefinitions[index].onChangedObservable.remove(this._columnDefinitionObservers[index]);\r\n this._columnDefinitions.splice(index, 1);\r\n this._columnDefinitionObservers.splice(index, 1);\r\n\r\n this._markAsDirty();\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Remove a row definition at specified index\r\n * @param index defines the index of the row to remove\r\n * @returns the current grid\r\n */\r\n public removeRowDefinition(index: number): Grid {\r\n if (index < 0 || index >= this._rowDefinitions.length) {\r\n return this;\r\n }\r\n\r\n for (let y = 0; y < this._columnDefinitions.length; y++) {\r\n const key = `${index}:${y}`;\r\n const cell = this._cells[key];\r\n\r\n this._removeCell(cell, key);\r\n }\r\n\r\n for (let y = 0; y < this._columnDefinitions.length; y++) {\r\n for (let x = index + 1; x < this._rowDefinitions.length; x++) {\r\n const previousKey = `${x - 1}:${y}`;\r\n const key = `${x}:${y}`;\r\n\r\n this._offsetCell(previousKey, key);\r\n }\r\n }\r\n\r\n this._rowDefinitions[index].onChangedObservable.remove(this._rowDefinitionObservers[index]);\r\n this._rowDefinitions.splice(index, 1);\r\n this._rowDefinitionObservers.splice(index, 1);\r\n\r\n this._markAsDirty();\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Adds a new control to the current grid\r\n * @param control defines the control to add\r\n * @param row defines the row where to add the control (0 by default)\r\n * @param column defines the column where to add the control (0 by default)\r\n * @returns the current grid\r\n */\r\n public override addControl(control: Control, row: number = 0, column: number = 0): Grid {\r\n if (this._rowDefinitions.length === 0) {\r\n // Add default row definition\r\n this.addRowDefinition(1, false);\r\n }\r\n\r\n if (this._columnDefinitions.length === 0) {\r\n // Add default column definition\r\n this.addColumnDefinition(1, false);\r\n }\r\n\r\n if (this._childControls.indexOf(control) !== -1) {\r\n Tools.Warn(`Control (Name:${control.name}, UniqueId:${control.uniqueId}) is already associated with this grid. You must remove it before reattaching it`);\r\n return this;\r\n }\r\n\r\n const x = Math.min(row, this._rowDefinitions.length - 1);\r\n const y = Math.min(column, this._columnDefinitions.length - 1);\r\n const key = `${x}:${y}`;\r\n let goodContainer = this._cells[key];\r\n\r\n if (!goodContainer) {\r\n goodContainer = new Container(key);\r\n this._cells[key] = goodContainer;\r\n goodContainer.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;\r\n goodContainer.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP;\r\n goodContainer.clipContent = this.clipContent;\r\n goodContainer.clipChildren = this.clipChildren;\r\n super.addControl(goodContainer);\r\n }\r\n\r\n goodContainer.addControl(control);\r\n this._childControls.push(control);\r\n control._tag = key;\r\n control.parent = this;\r\n\r\n this._markAsDirty();\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Removes a control from the current container\r\n * @param control defines the control to remove\r\n * @returns the current container\r\n */\r\n public override removeControl(control: Control): Container {\r\n const index = this._childControls.indexOf(control);\r\n\r\n if (index !== -1) {\r\n this._childControls.splice(index, 1);\r\n }\r\n\r\n const cell = this._cells[control._tag];\r\n\r\n if (cell) {\r\n cell.removeControl(control);\r\n control._tag = null;\r\n }\r\n\r\n this._markAsDirty();\r\n return this;\r\n }\r\n\r\n /**\r\n * Creates a new Grid\r\n * @param name defines control name\r\n */\r\n constructor(public override name?: string) {\r\n super(name);\r\n }\r\n\r\n protected override _getTypeName(): string {\r\n return \"Grid\";\r\n }\r\n\r\n protected _getGridDefinitions(definitionCallback: (lefts: number[], tops: number[], widths: number[], heights: number[]) => void) {\r\n const widths = [];\r\n const heights = [];\r\n const lefts = [];\r\n const tops = [];\r\n\r\n let availableWidth = this._currentMeasure.width;\r\n let globalWidthPercentage = 0;\r\n let availableHeight = this._currentMeasure.height;\r\n let globalHeightPercentage = 0;\r\n\r\n // Heights\r\n let index = 0;\r\n for (const rowDefinition of this._rowDefinitions) {\r\n if (rowDefinition.isPixel) {\r\n const height = rowDefinition.getValue(this._host);\r\n availableHeight -= height;\r\n heights[index] = height;\r\n } else {\r\n globalHeightPercentage += rowDefinition.value;\r\n }\r\n index++;\r\n }\r\n\r\n let top = 0;\r\n index = 0;\r\n for (const rowDefinition of this._rowDefinitions) {\r\n tops.push(top);\r\n\r\n if (!rowDefinition.isPixel) {\r\n const height = Math.round((rowDefinition.value / globalHeightPercentage) * availableHeight);\r\n top += height;\r\n heights[index] = height;\r\n } else {\r\n top += rowDefinition.getValue(this._host);\r\n }\r\n index++;\r\n }\r\n\r\n // Widths\r\n index = 0;\r\n for (const columnDefinition of this._columnDefinitions) {\r\n if (columnDefinition.isPixel) {\r\n const width = columnDefinition.getValue(this._host);\r\n availableWidth -= width;\r\n widths[index] = width;\r\n } else {\r\n globalWidthPercentage += columnDefinition.value;\r\n }\r\n index++;\r\n }\r\n\r\n let left = 0;\r\n index = 0;\r\n for (const columnDefinition of this._columnDefinitions) {\r\n lefts.push(left);\r\n if (!columnDefinition.isPixel) {\r\n const width = Math.round((columnDefinition.value / globalWidthPercentage) * availableWidth);\r\n left += width;\r\n widths[index] = width;\r\n } else {\r\n left += columnDefinition.getValue(this._host);\r\n }\r\n index++;\r\n }\r\n\r\n definitionCallback(lefts, tops, widths, heights);\r\n }\r\n\r\n protected override _additionalProcessing(parentMeasure: Measure, context: ICanvasRenderingContext): void {\r\n this._getGridDefinitions((lefts: number[], tops: number[], widths: number[], heights: number[]) => {\r\n // Setting child sizes\r\n for (const key in this._cells) {\r\n if (!Object.prototype.hasOwnProperty.call(this._cells, key)) {\r\n continue;\r\n }\r\n const split = key.split(\":\");\r\n const x = parseInt(split[0]);\r\n const y = parseInt(split[1]);\r\n const cell = this._cells[key];\r\n\r\n cell.leftInPixels = lefts[y];\r\n cell.topInPixels = tops[x];\r\n cell.widthInPixels = widths[y];\r\n cell.heightInPixels = heights[x];\r\n cell._left.ignoreAdaptiveScaling = true;\r\n cell._top.ignoreAdaptiveScaling = true;\r\n cell._width.ignoreAdaptiveScaling = true;\r\n cell._height.ignoreAdaptiveScaling = true;\r\n }\r\n });\r\n\r\n super._additionalProcessing(parentMeasure, context);\r\n }\r\n\r\n public override _flagDescendantsAsMatrixDirty(): void {\r\n for (const key in this._cells) {\r\n if (!Object.prototype.hasOwnProperty.call(this._cells, key)) {\r\n continue;\r\n }\r\n\r\n const child = this._cells[key];\r\n child._markMatrixAsDirty();\r\n }\r\n }\r\n\r\n public override _renderHighlightSpecific(context: ICanvasRenderingContext): void {\r\n super._renderHighlightSpecific(context);\r\n\r\n this._getGridDefinitions((lefts: number[], tops: number[], widths: number[], heights: number[]) => {\r\n // Columns\r\n for (let index = 0; index < lefts.length; index++) {\r\n const left = this._currentMeasure.left + lefts[index] + widths[index];\r\n context.beginPath();\r\n context.moveTo(left, this._currentMeasure.top);\r\n context.lineTo(left, this._currentMeasure.top + this._currentMeasure.height);\r\n context.stroke();\r\n }\r\n\r\n // Rows\r\n for (let index = 0; index < tops.length; index++) {\r\n const top = this._currentMeasure.top + tops[index] + heights[index];\r\n context.beginPath();\r\n context.moveTo(this._currentMeasure.left, top);\r\n context.lineTo(this._currentMeasure.left + this._currentMeasure.width, top);\r\n context.stroke();\r\n }\r\n });\r\n\r\n context.restore();\r\n }\r\n\r\n /** Releases associated resources */\r\n public override dispose() {\r\n super.dispose();\r\n\r\n for (const control of this._childControls) {\r\n control.dispose();\r\n }\r\n for (let index = 0; index < this._rowDefinitions.length; index++) {\r\n this._rowDefinitions[index].onChangedObservable.remove(this._rowDefinitionObservers[index]);\r\n }\r\n for (let index = 0; index < this._columnDefinitions.length; index++) {\r\n this._columnDefinitions[index].onChangedObservable.remove(this._columnDefinitionObservers[index]);\r\n }\r\n this._rowDefinitionObservers.length = 0;\r\n this._rowDefinitions.length = 0;\r\n this._columnDefinitionObservers.length = 0;\r\n this._columnDefinitions.length = 0;\r\n this._cells = {};\r\n this._childControls.length = 0;\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 force serialization even if isSerializable === false\r\n */\r\n public override serialize(serializationObject: any, force: boolean) {\r\n super.serialize(serializationObject, force);\r\n if (!this.isSerializable && !force) {\r\n return;\r\n }\r\n serializationObject.columnCount = this.columnCount;\r\n serializationObject.rowCount = this.rowCount;\r\n serializationObject.columns = [];\r\n serializationObject.rows = [];\r\n serializationObject.tags = [];\r\n for (let i = 0; i < this.columnCount; ++i) {\r\n const cd = this.getColumnDefinition(i);\r\n const childSerializationObject = { value: cd?.getValue(this.host), unit: cd?.unit };\r\n serializationObject.columns.push(childSerializationObject);\r\n }\r\n for (let i = 0; i < this.rowCount; ++i) {\r\n const rd = this.getRowDefinition(i);\r\n const childSerializationObject = { value: rd?.getValue(this.host), unit: rd?.unit };\r\n serializationObject.rows.push(childSerializationObject);\r\n }\r\n this.children.forEach((child) => {\r\n serializationObject.tags.push(child._tag);\r\n });\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public override _parseFromContent(serializedObject: any, host: AdvancedDynamicTexture) {\r\n super._parseFromContent(serializedObject, host);\r\n const children: Control[] = [];\r\n this.children.forEach((child) => {\r\n children.push(child);\r\n });\r\n this.removeRowDefinition(0);\r\n this.removeColumnDefinition(0);\r\n for (let i = 0; i < serializedObject.columnCount; ++i) {\r\n const columnValue = serializedObject.columns[i].value;\r\n const unit = serializedObject.columns[i].unit;\r\n this.addColumnDefinition(columnValue, unit === 1 ? true : false);\r\n }\r\n for (let i = 0; i < serializedObject.rowCount; ++i) {\r\n const rowValue = serializedObject.rows[i].value;\r\n const unit = serializedObject.rows[i].unit;\r\n this.addRowDefinition(rowValue, unit === 1 ? true : false);\r\n }\r\n\r\n for (let i = 0; i < children.length; ++i) {\r\n const cellInfo = serializedObject.tags[i];\r\n let rowNumber = parseInt(cellInfo.substring(0, cellInfo.search(\":\")));\r\n if (isNaN(rowNumber)) {\r\n rowNumber = 0;\r\n }\r\n let columnNumber = parseInt(cellInfo.substring(cellInfo.search(\":\") + 1));\r\n if (isNaN(columnNumber)) {\r\n columnNumber = 0;\r\n }\r\n this.addControl(children[i], rowNumber, columnNumber);\r\n }\r\n }\r\n}\r\nRegisterClass(\"BABYLON.GUI.Grid\", Grid);\r\n"]}
|
1
|
+
{"version":3,"file":"grid.js","sourceRoot":"","sources":["../../../../../dev/gui/src/2D/controls/grid.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,KAAK,EAAE,sCAAwB;AACxC,OAAO,EAAE,aAAa,EAAE,0CAA4B;AAIpD,OAAO,EAAE,SAAS,EAAE,2CAA6B;AAEjD;;GAEG;AACH,M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AAG,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;YAC3C,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QAC/D,CAAC;QAED,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC;YACvC,MAAM,QAAQ,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAC1C,IAAI,SAAS,GAAG,QAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YACtE,IAAI,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC;gBACnB,SAAS,GAAG,CAAC,CAAC;YAClB,CAAC;YACD,IAAI,YAAY,GAAG,QAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YAC1E,IAAI,KAAK,CAAC,YAAY,CAAC,EAAE,CAAC;gBACtB,YAAY,GAAG,CAAC,CAAC;YACrB,CAAC;YACD,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,YAAY,CAAC,CAAC;QAC1D,CAAC;IACL,CAAC;CACJ;AAnkBG;IADC,SAAS,EAAE;uCAGX;AAkkBL,aAAa,CAAC,kBAAkB,EAAE,IAAI,CAAC,CAAC","sourcesContent":["import type { Nullable } from \"core/types\";\r\n\r\nimport { Container } from \"./container\";\r\nimport { ValueAndUnit } from \"../valueAndUnit\";\r\nimport { Control } from \"./control\";\r\nimport type { Measure } from \"../measure\";\r\nimport { Tools } from \"core/Misc/tools\";\r\nimport { RegisterClass } from \"core/Misc/typeStore\";\r\nimport type { ICanvasRenderingContext } from \"core/Engines/ICanvas\";\r\nimport type { AdvancedDynamicTexture } from \"../advancedDynamicTexture\";\r\nimport type { Observer } from \"core/Misc/observable\";\r\nimport { serialize } from \"core/Misc/decorators\";\r\n\r\n/**\r\n * Class used to create a 2D grid container\r\n */\r\nexport class Grid extends Container {\r\n private _rowDefinitions = new Array<ValueAndUnit>();\r\n private _rowDefinitionObservers: Observer<void>[] = [];\r\n private _columnDefinitions = new Array<ValueAndUnit>();\r\n private _columnDefinitionObservers: Observer<void>[] = [];\r\n private _cells: { [key: string]: Container } = {};\r\n private _childControls = new Array<Control>();\r\n\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 override set clipContent(value: boolean) {\r\n this._clipContent = value;\r\n\r\n // This value has to be replicated on all of the container cells\r\n for (const key in this._cells) {\r\n this._cells[key].clipContent = value;\r\n }\r\n }\r\n\r\n @serialize()\r\n public override get clipContent(): boolean {\r\n return this._clipContent;\r\n }\r\n\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 override set clipChildren(value: boolean) {\r\n this._clipChildren = value;\r\n\r\n // This value has to be replicated on all of the container cells\r\n for (const key in this._cells) {\r\n this._cells[key].clipChildren = value;\r\n }\r\n }\r\n\r\n public override get clipChildren(): boolean {\r\n return this._clipChildren;\r\n }\r\n\r\n /**\r\n * Gets the number of columns\r\n */\r\n public get columnCount(): number {\r\n return this._columnDefinitions.length;\r\n }\r\n\r\n /**\r\n * Gets the number of rows\r\n */\r\n public get rowCount(): number {\r\n return this._rowDefinitions.length;\r\n }\r\n\r\n /** Gets the list of children */\r\n public override get children(): Control[] {\r\n return this._childControls;\r\n }\r\n\r\n /** Gets the list of cells (e.g. the containers) */\r\n public get cells(): { [key: string]: Container } {\r\n return this._cells;\r\n }\r\n\r\n /**\r\n * Gets the definition of a specific row\r\n * @param index defines the index of the row\r\n * @returns the row definition\r\n */\r\n public getRowDefinition(index: number): Nullable<ValueAndUnit> {\r\n if (index < 0 || index >= this._rowDefinitions.length) {\r\n return null;\r\n }\r\n\r\n return this._rowDefinitions[index];\r\n }\r\n\r\n /**\r\n * Gets the definition of a specific column\r\n * @param index defines the index of the column\r\n * @returns the column definition\r\n */\r\n public getColumnDefinition(index: number): Nullable<ValueAndUnit> {\r\n if (index < 0 || index >= this._columnDefinitions.length) {\r\n return null;\r\n }\r\n\r\n return this._columnDefinitions[index];\r\n }\r\n\r\n /**\r\n * Adds a new row to the grid\r\n * @param height defines the height of the row (either in pixel or a value between 0 and 1)\r\n * @param isPixel defines if the height is expressed in pixel (or in percentage)\r\n * @returns the current grid\r\n */\r\n public addRowDefinition(height: number, isPixel = false): Grid {\r\n this._rowDefinitions.push(new ValueAndUnit(height, isPixel ? ValueAndUnit.UNITMODE_PIXEL : ValueAndUnit.UNITMODE_PERCENTAGE));\r\n this._rowDefinitionObservers.push(this._rowDefinitions[this.rowCount - 1].onChangedObservable.add(() => this._markAsDirty())!);\r\n this._markAsDirty();\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Adds a new column to the grid\r\n * @param width defines the width of the column (either in pixel or a value between 0 and 1)\r\n * @param isPixel defines if the width is expressed in pixel (or in percentage)\r\n * @returns the current grid\r\n */\r\n public addColumnDefinition(width: number, isPixel = false): Grid {\r\n this._columnDefinitions.push(new ValueAndUnit(width, isPixel ? ValueAndUnit.UNITMODE_PIXEL : ValueAndUnit.UNITMODE_PERCENTAGE));\r\n this._columnDefinitionObservers.push(this._columnDefinitions[this.columnCount - 1].onChangedObservable.add(() => this._markAsDirty())!);\r\n this._markAsDirty();\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Update a row definition\r\n * @param index defines the index of the row to update\r\n * @param height defines the height of the row (either in pixel or a value between 0 and 1)\r\n * @param isPixel defines if the weight is expressed in pixel (or in percentage)\r\n * @returns the current grid\r\n */\r\n public setRowDefinition(index: number, height: number, isPixel = false): Grid {\r\n if (index < 0 || index >= this._rowDefinitions.length) {\r\n return this;\r\n }\r\n\r\n const current = this._rowDefinitions[index];\r\n if (current && current.isPixel === isPixel && current.value === height) {\r\n return this;\r\n }\r\n\r\n this._rowDefinitions[index].onChangedObservable.remove(this._rowDefinitionObservers[index]);\r\n this._rowDefinitions[index] = new ValueAndUnit(height, isPixel ? ValueAndUnit.UNITMODE_PIXEL : ValueAndUnit.UNITMODE_PERCENTAGE);\r\n this._rowDefinitionObservers[index] = this._rowDefinitions[index].onChangedObservable.add(() => this._markAsDirty())!;\r\n\r\n this._markAsDirty();\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Update a column definition\r\n * @param index defines the index of the column to update\r\n * @param width defines the width of the column (either in pixel or a value between 0 and 1)\r\n * @param isPixel defines if the width is expressed in pixel (or in percentage)\r\n * @returns the current grid\r\n */\r\n public setColumnDefinition(index: number, width: number, isPixel = false): Grid {\r\n if (index < 0 || index >= this._columnDefinitions.length) {\r\n return this;\r\n }\r\n\r\n const current = this._columnDefinitions[index];\r\n if (current && current.isPixel === isPixel && current.value === width) {\r\n return this;\r\n }\r\n\r\n this._columnDefinitions[index].onChangedObservable.remove(this._columnDefinitionObservers[index]);\r\n this._columnDefinitions[index] = new ValueAndUnit(width, isPixel ? ValueAndUnit.UNITMODE_PIXEL : ValueAndUnit.UNITMODE_PERCENTAGE);\r\n this._columnDefinitionObservers[index] = this._columnDefinitions[index].onChangedObservable.add(() => this._markAsDirty())!;\r\n\r\n this._markAsDirty();\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Gets the list of children stored in a specific cell\r\n * @param row defines the row to check\r\n * @param column defines the column to check\r\n * @returns the list of controls\r\n */\r\n public getChildrenAt(row: number, column: number): Nullable<Array<Control>> {\r\n const cell = this._cells[`${row}:${column}`];\r\n\r\n if (!cell) {\r\n return null;\r\n }\r\n\r\n return cell.children;\r\n }\r\n\r\n /**\r\n * Gets a string representing the child cell info (row x column)\r\n * @param child defines the control to get info from\r\n * @returns a string containing the child cell info (row x column)\r\n */\r\n public getChildCellInfo(child: Control): string {\r\n return child._tag;\r\n }\r\n\r\n private _removeCell(cell: Container, key: string) {\r\n if (!cell) {\r\n return;\r\n }\r\n\r\n super.removeControl(cell);\r\n\r\n for (const control of cell.children) {\r\n const childIndex = this._childControls.indexOf(control);\r\n\r\n if (childIndex !== -1) {\r\n this._childControls.splice(childIndex, 1);\r\n }\r\n }\r\n\r\n delete this._cells[key];\r\n }\r\n\r\n private _offsetCell(previousKey: string, key: string) {\r\n if (!this._cells[key]) {\r\n return;\r\n }\r\n\r\n this._cells[previousKey] = this._cells[key];\r\n\r\n for (const control of this._cells[previousKey].children) {\r\n control._tag = previousKey;\r\n }\r\n\r\n delete this._cells[key];\r\n }\r\n\r\n /**\r\n * Remove a column definition at specified index\r\n * @param index defines the index of the column to remove\r\n * @returns the current grid\r\n */\r\n public removeColumnDefinition(index: number): Grid {\r\n if (index < 0 || index >= this._columnDefinitions.length) {\r\n return this;\r\n }\r\n\r\n for (let x = 0; x < this._rowDefinitions.length; x++) {\r\n const key = `${x}:${index}`;\r\n const cell = this._cells[key];\r\n\r\n this._removeCell(cell, key);\r\n }\r\n\r\n for (let x = 0; x < this._rowDefinitions.length; x++) {\r\n for (let y = index + 1; y < this._columnDefinitions.length; y++) {\r\n const previousKey = `${x}:${y - 1}`;\r\n const key = `${x}:${y}`;\r\n\r\n this._offsetCell(previousKey, key);\r\n }\r\n }\r\n\r\n this._columnDefinitions[index].onChangedObservable.remove(this._columnDefinitionObservers[index]);\r\n this._columnDefinitions.splice(index, 1);\r\n this._columnDefinitionObservers.splice(index, 1);\r\n\r\n this._markAsDirty();\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Remove a row definition at specified index\r\n * @param index defines the index of the row to remove\r\n * @returns the current grid\r\n */\r\n public removeRowDefinition(index: number): Grid {\r\n if (index < 0 || index >= this._rowDefinitions.length) {\r\n return this;\r\n }\r\n\r\n for (let y = 0; y < this._columnDefinitions.length; y++) {\r\n const key = `${index}:${y}`;\r\n const cell = this._cells[key];\r\n\r\n this._removeCell(cell, key);\r\n }\r\n\r\n for (let y = 0; y < this._columnDefinitions.length; y++) {\r\n for (let x = index + 1; x < this._rowDefinitions.length; x++) {\r\n const previousKey = `${x - 1}:${y}`;\r\n const key = `${x}:${y}`;\r\n\r\n this._offsetCell(previousKey, key);\r\n }\r\n }\r\n\r\n this._rowDefinitions[index].onChangedObservable.remove(this._rowDefinitionObservers[index]);\r\n this._rowDefinitions.splice(index, 1);\r\n this._rowDefinitionObservers.splice(index, 1);\r\n\r\n this._markAsDirty();\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Adds a new control to the current grid\r\n * @param control defines the control to add\r\n * @param row defines the row where to add the control (0 by default)\r\n * @param column defines the column where to add the control (0 by default)\r\n * @returns the current grid\r\n */\r\n public override addControl(control: Control, row: number = 0, column: number = 0): Grid {\r\n if (this._rowDefinitions.length === 0) {\r\n // Add default row definition\r\n this.addRowDefinition(1, false);\r\n }\r\n\r\n if (this._columnDefinitions.length === 0) {\r\n // Add default column definition\r\n this.addColumnDefinition(1, false);\r\n }\r\n\r\n if (this._childControls.indexOf(control) !== -1) {\r\n Tools.Warn(`Control (Name:${control.name}, UniqueId:${control.uniqueId}) is already associated with this grid. You must remove it before reattaching it`);\r\n return this;\r\n }\r\n\r\n const x = Math.min(row, this._rowDefinitions.length - 1);\r\n const y = Math.min(column, this._columnDefinitions.length - 1);\r\n const key = `${x}:${y}`;\r\n let goodContainer = this._cells[key];\r\n\r\n if (!goodContainer) {\r\n goodContainer = new Container(key);\r\n this._cells[key] = goodContainer;\r\n goodContainer.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;\r\n goodContainer.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP;\r\n goodContainer.clipContent = this.clipContent;\r\n goodContainer.clipChildren = this.clipChildren;\r\n super.addControl(goodContainer);\r\n }\r\n\r\n goodContainer.addControl(control);\r\n this._childControls.push(control);\r\n control._tag = key;\r\n control.parent = this;\r\n\r\n this._markAsDirty();\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Removes a control from the current container\r\n * @param control defines the control to remove\r\n * @returns the current container\r\n */\r\n public override removeControl(control: Control): Container {\r\n const index = this._childControls.indexOf(control);\r\n\r\n if (index !== -1) {\r\n this._childControls.splice(index, 1);\r\n }\r\n\r\n const cell = this._cells[control._tag];\r\n\r\n if (cell) {\r\n cell.removeControl(control);\r\n control._tag = null;\r\n }\r\n\r\n this._markAsDirty();\r\n return this;\r\n }\r\n\r\n /**\r\n * Creates a new Grid\r\n * @param name defines control name\r\n */\r\n constructor(public override name?: string) {\r\n super(name);\r\n }\r\n\r\n protected override _getTypeName(): string {\r\n return \"Grid\";\r\n }\r\n\r\n protected _getGridDefinitions(definitionCallback: (lefts: number[], tops: number[], widths: number[], heights: number[]) => void) {\r\n const widths = [];\r\n const heights = [];\r\n const lefts = [];\r\n const tops = [];\r\n\r\n let availableWidth = this._currentMeasure.width;\r\n let globalWidthPercentage = 0;\r\n let availableHeight = this._currentMeasure.height;\r\n let globalHeightPercentage = 0;\r\n\r\n // Heights\r\n let index = 0;\r\n for (const rowDefinition of this._rowDefinitions) {\r\n if (rowDefinition.isPixel) {\r\n const height = rowDefinition.getValue(this._host);\r\n availableHeight -= height;\r\n heights[index] = height;\r\n } else {\r\n globalHeightPercentage += rowDefinition.value;\r\n }\r\n index++;\r\n }\r\n\r\n let top = 0;\r\n index = 0;\r\n for (const rowDefinition of this._rowDefinitions) {\r\n tops.push(top);\r\n\r\n if (!rowDefinition.isPixel) {\r\n const height = Math.round((rowDefinition.value / globalHeightPercentage) * availableHeight);\r\n top += height;\r\n heights[index] = height;\r\n } else {\r\n top += rowDefinition.getValue(this._host);\r\n }\r\n index++;\r\n }\r\n\r\n // Widths\r\n index = 0;\r\n for (const columnDefinition of this._columnDefinitions) {\r\n if (columnDefinition.isPixel) {\r\n const width = columnDefinition.getValue(this._host);\r\n availableWidth -= width;\r\n widths[index] = width;\r\n } else {\r\n globalWidthPercentage += columnDefinition.value;\r\n }\r\n index++;\r\n }\r\n\r\n let left = 0;\r\n index = 0;\r\n for (const columnDefinition of this._columnDefinitions) {\r\n lefts.push(left);\r\n if (!columnDefinition.isPixel) {\r\n const width = Math.round((columnDefinition.value / globalWidthPercentage) * availableWidth);\r\n left += width;\r\n widths[index] = width;\r\n } else {\r\n left += columnDefinition.getValue(this._host);\r\n }\r\n index++;\r\n }\r\n\r\n definitionCallback(lefts, tops, widths, heights);\r\n }\r\n\r\n protected override _additionalProcessing(parentMeasure: Measure, context: ICanvasRenderingContext): void {\r\n this._getGridDefinitions((lefts: number[], tops: number[], widths: number[], heights: number[]) => {\r\n // Setting child sizes\r\n for (const key in this._cells) {\r\n if (!Object.prototype.hasOwnProperty.call(this._cells, key)) {\r\n continue;\r\n }\r\n const split = key.split(\":\");\r\n const x = parseInt(split[0]);\r\n const y = parseInt(split[1]);\r\n const cell = this._cells[key];\r\n\r\n cell.leftInPixels = lefts[y];\r\n cell.topInPixels = tops[x];\r\n cell.widthInPixels = widths[y];\r\n cell.heightInPixels = heights[x];\r\n cell._left.ignoreAdaptiveScaling = true;\r\n cell._top.ignoreAdaptiveScaling = true;\r\n cell._width.ignoreAdaptiveScaling = true;\r\n cell._height.ignoreAdaptiveScaling = true;\r\n }\r\n });\r\n\r\n super._additionalProcessing(parentMeasure, context);\r\n }\r\n\r\n public override _flagDescendantsAsMatrixDirty(): void {\r\n for (const key in this._cells) {\r\n if (!Object.prototype.hasOwnProperty.call(this._cells, key)) {\r\n continue;\r\n }\r\n\r\n const child = this._cells[key];\r\n child._markMatrixAsDirty();\r\n }\r\n }\r\n\r\n public override _renderHighlightSpecific(context: ICanvasRenderingContext): void {\r\n super._renderHighlightSpecific(context);\r\n\r\n this._getGridDefinitions((lefts: number[], tops: number[], widths: number[], heights: number[]) => {\r\n // Columns\r\n for (let index = 0; index < lefts.length; index++) {\r\n const left = this._currentMeasure.left + lefts[index] + widths[index];\r\n context.beginPath();\r\n context.moveTo(left, this._currentMeasure.top);\r\n context.lineTo(left, this._currentMeasure.top + this._currentMeasure.height);\r\n context.stroke();\r\n }\r\n\r\n // Rows\r\n for (let index = 0; index < tops.length; index++) {\r\n const top = this._currentMeasure.top + tops[index] + heights[index];\r\n context.beginPath();\r\n context.moveTo(this._currentMeasure.left, top);\r\n context.lineTo(this._currentMeasure.left + this._currentMeasure.width, top);\r\n context.stroke();\r\n }\r\n });\r\n\r\n context.restore();\r\n }\r\n\r\n /** Releases associated resources */\r\n public override dispose() {\r\n super.dispose();\r\n\r\n for (const control of this._childControls) {\r\n control.dispose();\r\n }\r\n for (let index = 0; index < this._rowDefinitions.length; index++) {\r\n this._rowDefinitions[index].onChangedObservable.remove(this._rowDefinitionObservers[index]);\r\n }\r\n for (let index = 0; index < this._columnDefinitions.length; index++) {\r\n this._columnDefinitions[index].onChangedObservable.remove(this._columnDefinitionObservers[index]);\r\n }\r\n this._rowDefinitionObservers.length = 0;\r\n this._rowDefinitions.length = 0;\r\n this._columnDefinitionObservers.length = 0;\r\n this._columnDefinitions.length = 0;\r\n this._cells = {};\r\n this._childControls.length = 0;\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 force serialization even if isSerializable === false\r\n */\r\n public override serialize(serializationObject: any, force: boolean) {\r\n super.serialize(serializationObject, force);\r\n if (!this.isSerializable && !force) {\r\n return;\r\n }\r\n serializationObject.columnCount = this.columnCount;\r\n serializationObject.rowCount = this.rowCount;\r\n serializationObject.columns = [];\r\n serializationObject.rows = [];\r\n serializationObject.tags = [];\r\n for (let i = 0; i < this.columnCount; ++i) {\r\n const cd = this.getColumnDefinition(i);\r\n const childSerializationObject = { value: cd?.getValue(this.host), unit: cd?.unit };\r\n serializationObject.columns.push(childSerializationObject);\r\n }\r\n for (let i = 0; i < this.rowCount; ++i) {\r\n const rd = this.getRowDefinition(i);\r\n const childSerializationObject = { value: rd?.getValue(this.host), unit: rd?.unit };\r\n serializationObject.rows.push(childSerializationObject);\r\n }\r\n this.children.forEach((child) => {\r\n serializationObject.tags.push(child._tag);\r\n });\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public override _parseFromContent(serializedObject: any, host: AdvancedDynamicTexture) {\r\n super._parseFromContent(serializedObject, host);\r\n const children: Control[] = [];\r\n this.children.forEach((child) => {\r\n children.push(child);\r\n });\r\n this.removeRowDefinition(0);\r\n this.removeColumnDefinition(0);\r\n for (let i = 0; i < serializedObject.columnCount; ++i) {\r\n const columnValue = serializedObject.columns[i].value;\r\n const unit = serializedObject.columns[i].unit;\r\n this.addColumnDefinition(columnValue, unit === 1 ? true : false);\r\n }\r\n for (let i = 0; i < serializedObject.rowCount; ++i) {\r\n const rowValue = serializedObject.rows[i].value;\r\n const unit = serializedObject.rows[i].unit;\r\n this.addRowDefinition(rowValue, unit === 1 ? true : false);\r\n }\r\n\r\n for (let i = 0; i < children.length; ++i) {\r\n const cellInfo = serializedObject.tags[i];\r\n let rowNumber = parseInt(cellInfo.substring(0, cellInfo.search(\":\")));\r\n if (isNaN(rowNumber)) {\r\n rowNumber = 0;\r\n }\r\n let columnNumber = parseInt(cellInfo.substring(cellInfo.search(\":\") + 1));\r\n if (isNaN(columnNumber)) {\r\n columnNumber = 0;\r\n }\r\n this.addControl(children[i], rowNumber, columnNumber);\r\n }\r\n }\r\n}\r\nRegisterClass(\"BABYLON.GUI.Grid\", Grid);\r\n"]}
|