scichart 3.1.348 → 3.2.434

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (358) hide show
  1. package/Builder/buildSurface.d.ts +2 -2
  2. package/Builder/chartBuilder.d.ts +4 -4
  3. package/Charting/ChartModifiers/ChartModifierBase.d.ts +19 -5
  4. package/Charting/ChartModifiers/ChartModifierBase.js +64 -7
  5. package/Charting/ChartModifiers/CursorModifier.d.ts +9 -9
  6. package/Charting/ChartModifiers/CursorModifier.js +13 -1
  7. package/Charting/ChartModifiers/DataPointSelectionModifier.d.ts +1 -0
  8. package/Charting/ChartModifiers/DataPointSelectionModifier.js +6 -1
  9. package/Charting/ChartModifiers/LegendModifier.d.ts +10 -25
  10. package/Charting/ChartModifiers/LegendModifier.js +10 -20
  11. package/Charting/ChartModifiers/MouseWheelZoomModifier.js +20 -11
  12. package/Charting/ChartModifiers/OverviewRangeSelectionModifier.d.ts +5 -5
  13. package/Charting/ChartModifiers/PinchZoomModifier.d.ts +38 -8
  14. package/Charting/ChartModifiers/PinchZoomModifier.js +103 -40
  15. package/Charting/ChartModifiers/RolloverModifier.js +10 -3
  16. package/Charting/ChartModifiers/RubberBandXyZoomModifier.d.ts +4 -7
  17. package/Charting/ChartModifiers/RubberBandXyZoomModifier.js +6 -8
  18. package/Charting/ChartModifiers/SeriesSelectionModifier.js +39 -29
  19. package/Charting/ChartModifiers/XAxisDragModifier.d.ts +1 -1
  20. package/Charting/ChartModifiers/XAxisDragModifier.js +3 -3
  21. package/Charting/ChartModifiers/YAxisDragModifier.d.ts +2 -4
  22. package/Charting/ChartModifiers/YAxisDragModifier.js +7 -8
  23. package/Charting/ChartModifiers/ZoomPanModifier.d.ts +13 -38
  24. package/Charting/ChartModifiers/ZoomPanModifier.js +54 -99
  25. package/Charting/Drawing/BaseCache.d.ts +2 -1
  26. package/Charting/Drawing/BaseCache.js +45 -7
  27. package/Charting/Drawing/RenderSurface.d.ts +1 -0
  28. package/Charting/Drawing/RenderSurface.js +5 -1
  29. package/Charting/Drawing/SolidBrushCache.d.ts +2 -1
  30. package/Charting/Drawing/SolidBrushCache.js +23 -3
  31. package/Charting/Drawing/WebGlBrush.d.ts +2 -1
  32. package/Charting/Drawing/WebGlBrush.js +22 -3
  33. package/Charting/Drawing/WebGlPen.d.ts +2 -1
  34. package/Charting/Drawing/WebGlPen.js +23 -4
  35. package/Charting/Drawing/WebGlRenderContext2D.d.ts +4 -3
  36. package/Charting/Drawing/WebGlRenderContext2D.js +26 -7
  37. package/Charting/Model/BaseDataSeries.d.ts +67 -2
  38. package/Charting/Model/BaseDataSeries.js +193 -42
  39. package/Charting/Model/BaseHeatmapDataSeries.js +1 -1
  40. package/Charting/Model/ChartData/SeriesInfo.d.ts +16 -0
  41. package/Charting/Model/ChartData/SeriesInfo.js +7 -0
  42. package/Charting/Model/ChartData/XyzSeriesInfo.d.ts +8 -0
  43. package/Charting/Model/ChartData/XyzSeriesInfo.js +36 -0
  44. package/Charting/Model/DoubleVectorProvider.d.ts +19 -0
  45. package/Charting/Model/DoubleVectorProvider.js +95 -0
  46. package/Charting/Model/Filters/HlcFilterBase.d.ts +6 -2
  47. package/Charting/Model/Filters/HlcFilterBase.js +17 -1
  48. package/Charting/Model/Filters/IFilterBase.d.ts +24 -0
  49. package/Charting/Model/Filters/IFilterBase.js +2 -0
  50. package/Charting/Model/Filters/OhlcFilterBase.d.ts +6 -2
  51. package/Charting/Model/Filters/OhlcFilterBase.js +17 -1
  52. package/Charting/Model/Filters/XyFilterBase.d.ts +6 -5
  53. package/Charting/Model/Filters/XyFilterBase.js +17 -1
  54. package/Charting/Model/Filters/XyyFilterBase.d.ts +6 -2
  55. package/Charting/Model/Filters/XyyFilterBase.js +17 -1
  56. package/Charting/Model/Filters/XyzFilterBase.d.ts +6 -2
  57. package/Charting/Model/Filters/XyzFilterBase.js +17 -1
  58. package/Charting/Model/HlcDataSeries.d.ts +3 -0
  59. package/Charting/Model/HlcDataSeries.js +44 -15
  60. package/Charting/Model/IDataSeries.d.ts +23 -0
  61. package/Charting/Model/NonUniformHeatmapDataSeries.js +2 -0
  62. package/Charting/Model/OhlcDataSeries.d.ts +3 -0
  63. package/Charting/Model/OhlcDataSeries.js +56 -24
  64. package/Charting/Model/PointSeries/BasePointSeriesResampled.d.ts +4 -5
  65. package/Charting/Model/PointSeries/BasePointSeriesResampled.js +29 -21
  66. package/Charting/Model/PointSeries/BasePointSeriesWrapped.d.ts +2 -0
  67. package/Charting/Model/PointSeries/BasePointSeriesWrapped.js +2 -0
  68. package/Charting/Model/PointSeries/IPointSeries.d.ts +2 -1
  69. package/Charting/Model/PointSeries/OhlcPointSeriesResampled.js +1 -1
  70. package/Charting/Model/PointSeries/XyPointSeriesWrapped.d.ts +2 -1
  71. package/Charting/Model/PointSeries/XyPointSeriesWrapped.js +2 -2
  72. package/Charting/Model/PointSeries/XyyPointSeriesResampled.js +1 -1
  73. package/Charting/Model/UniformHeatmapDataSeries.d.ts +31 -11
  74. package/Charting/Model/UniformHeatmapDataSeries.js +72 -4
  75. package/Charting/Model/XyDataSeries.d.ts +0 -8
  76. package/Charting/Model/XyDataSeries.js +21 -5
  77. package/Charting/Model/XyTextDataSeries.d.ts +2 -0
  78. package/Charting/Model/XyTextDataSeries.js +35 -4
  79. package/Charting/Model/XyyDataSeries.d.ts +2 -0
  80. package/Charting/Model/XyyDataSeries.js +50 -26
  81. package/Charting/Model/XyzDataSeries.d.ts +3 -0
  82. package/Charting/Model/XyzDataSeries.js +36 -10
  83. package/Charting/Numerics/CoordinateCalculators/CategoryCoordinateCalculator.d.ts +3 -5
  84. package/Charting/Numerics/CoordinateCalculators/CategoryCoordinateCalculator.js +5 -7
  85. package/Charting/Numerics/CoordinateCalculators/CoordinateCalculatorBase.d.ts +2 -1
  86. package/Charting/Numerics/CoordinateCalculators/CoordinateCalculatorBase.js +29 -9
  87. package/Charting/Numerics/CoordinateCalculators/FlippedCategoryCoordinateCalculator.d.ts +3 -5
  88. package/Charting/Numerics/CoordinateCalculators/FlippedCategoryCoordinateCalculator.js +5 -7
  89. package/Charting/Numerics/Resamplers/ExtremeResamplerHelper.d.ts +14 -10
  90. package/Charting/Numerics/Resamplers/ExtremeResamplerHelper.js +105 -69
  91. package/Charting/Numerics/Resamplers/ResamplingParams.d.ts +4 -2
  92. package/Charting/Numerics/Resamplers/ResamplingParams.js +12 -7
  93. package/Charting/Numerics/TickCoordinateProviders/TickCoordinatesProvider.d.ts +5 -0
  94. package/Charting/Numerics/TickCoordinateProviders/TickCoordinatesProvider.js +7 -0
  95. package/Charting/Numerics/TickProviders/NumericTickProvider.js +3 -4
  96. package/Charting/Numerics/TickProviders/TickProvider.d.ts +5 -0
  97. package/Charting/Numerics/TickProviders/TickProvider.js +7 -0
  98. package/Charting/Services/SciChartRenderer.js +15 -5
  99. package/Charting/Services/TitleRenderer.d.ts +2 -1
  100. package/Charting/Services/TitleRenderer.js +35 -14
  101. package/Charting/Visuals/Annotations/AdornerLayer.d.ts +1 -1
  102. package/Charting/Visuals/Annotations/AnnotationBase.d.ts +6 -6
  103. package/Charting/Visuals/Annotations/AnnotationBase.js +81 -61
  104. package/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation.js +4 -0
  105. package/Charting/Visuals/Annotations/IAnnotation.d.ts +9 -4
  106. package/Charting/Visuals/Annotations/IAnnotation.js +6 -0
  107. package/Charting/Visuals/Annotations/LineAnnotation.js +3 -1
  108. package/Charting/Visuals/Annotations/NativeTextAnnotation.js +4 -0
  109. package/Charting/Visuals/Annotations/RenderContextAnnotationBase.d.ts +5 -0
  110. package/Charting/Visuals/Annotations/RenderContextAnnotationBase.js +16 -0
  111. package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.js +6 -0
  112. package/Charting/Visuals/Annotations/constants.d.ts +1 -0
  113. package/Charting/Visuals/Annotations/constants.js +1 -0
  114. package/Charting/Visuals/Axis/AxisBase2D.d.ts +23 -8
  115. package/Charting/Visuals/Axis/AxisBase2D.js +46 -10
  116. package/Charting/Visuals/Axis/AxisCore.d.ts +6 -3
  117. package/Charting/Visuals/Axis/AxisCore.js +100 -54
  118. package/Charting/Visuals/Axis/AxisRenderer.d.ts +2 -1
  119. package/Charting/Visuals/Axis/AxisRenderer.js +40 -16
  120. package/Charting/Visuals/Axis/AxisTitleRenderer.d.ts +1 -0
  121. package/Charting/Visuals/Axis/AxisTitleRenderer.js +4 -0
  122. package/Charting/Visuals/Axis/CategoryAxisBase.js +4 -4
  123. package/Charting/Visuals/Axis/DeltaCalculator/DateTimeDeltaCalculator.js +14 -9
  124. package/Charting/Visuals/Axis/DeltaCalculator/DeltaCalculator.d.ts +5 -0
  125. package/Charting/Visuals/Axis/DeltaCalculator/DeltaCalculator.js +7 -0
  126. package/Charting/Visuals/Axis/LabelProvider/LabelCache.d.ts +2 -2
  127. package/Charting/Visuals/Axis/LabelProvider/LabelCache.js +8 -1
  128. package/Charting/Visuals/Axis/LabelProvider/LabelProvider.d.ts +7 -1
  129. package/Charting/Visuals/Axis/LabelProvider/LabelProvider.js +34 -8
  130. package/Charting/Visuals/Axis/LabelProvider/LabelProviderBase2D.d.ts +4 -2
  131. package/Charting/Visuals/Axis/LabelProvider/LabelProviderBase2D.js +8 -2
  132. package/Charting/Visuals/Axis/LabelProvider/PieLabelProvider.d.ts +1 -0
  133. package/Charting/Visuals/Axis/LabelProvider/PieLabelProvider.js +1 -0
  134. package/Charting/Visuals/HeatmapLegend.d.ts +3 -2
  135. package/Charting/Visuals/HeatmapLegend.js +33 -12
  136. package/Charting/Visuals/Helpers/NativeObject.d.ts +8 -5
  137. package/Charting/Visuals/Helpers/NativeObject.js +42 -21
  138. package/Charting/Visuals/Helpers/drawLabel.js +3 -1
  139. package/Charting/Visuals/I2DSurfaceOptions.d.ts +0 -15
  140. package/Charting/Visuals/Legend/ManualLegend.d.ts +56 -0
  141. package/Charting/Visuals/Legend/ManualLegend.js +138 -0
  142. package/Charting/Visuals/Legend/SciChartLegend.js +4 -3
  143. package/Charting/Visuals/Legend/SciChartLegendBase.d.ts +65 -4
  144. package/Charting/Visuals/Legend/SciChartLegendBase.js +111 -23
  145. package/Charting/Visuals/Legend/SciChartPieLegend.js +1 -1
  146. package/Charting/Visuals/PointMarkers/BasePointMarker.d.ts +13 -1
  147. package/Charting/Visuals/PointMarkers/BasePointMarker.js +77 -19
  148. package/Charting/Visuals/PointMarkers/Constants.d.ts +2 -1
  149. package/Charting/Visuals/PointMarkers/Constants.js +1 -0
  150. package/Charting/Visuals/PointMarkers/IPointMarker.d.ts +2 -0
  151. package/Charting/Visuals/RenderableSeries/Animations/SeriesAnimation.js +4 -1
  152. package/Charting/Visuals/RenderableSeries/Animations/animationHelpers.d.ts +1 -1
  153. package/Charting/Visuals/RenderableSeries/BaseBandRenderableSeries.js +8 -7
  154. package/Charting/Visuals/RenderableSeries/BaseHeatmapRenderableSeries.d.ts +1 -0
  155. package/Charting/Visuals/RenderableSeries/BaseHeatmapRenderableSeries.js +5 -0
  156. package/Charting/Visuals/RenderableSeries/BaseOhlcRenderableSeries.js +10 -9
  157. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.d.ts +3 -2
  158. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.js +101 -69
  159. package/Charting/Visuals/RenderableSeries/BaseStackedCollection.js +18 -4
  160. package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.js +12 -3
  161. package/Charting/Visuals/RenderableSeries/DataLabels/BaseDataLabelProvider.d.ts +2 -0
  162. package/Charting/Visuals/RenderableSeries/DataLabels/BaseDataLabelProvider.js +5 -0
  163. package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelProvider.js +6 -0
  164. package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelState.d.ts +1 -0
  165. package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelState.js +18 -5
  166. package/Charting/Visuals/RenderableSeries/DataLabels/NonUniformHeatmapDataLabelProvider.js +0 -1
  167. package/Charting/Visuals/RenderableSeries/DataLabels/TextDataLabelProvider.js +8 -2
  168. package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.d.ts +1 -0
  169. package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.js +35 -16
  170. package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.d.ts +5 -4
  171. package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.js +70 -33
  172. package/Charting/Visuals/RenderableSeries/DrawingProviders/BubbleSeriesDrawingProvider.d.ts +1 -0
  173. package/Charting/Visuals/RenderableSeries/DrawingProviders/BubbleSeriesDrawingProvider.js +30 -9
  174. package/Charting/Visuals/RenderableSeries/DrawingProviders/ColumnSeriesDrawingProvider.d.ts +1 -0
  175. package/Charting/Visuals/RenderableSeries/DrawingProviders/ColumnSeriesDrawingProvider.js +37 -16
  176. package/Charting/Visuals/RenderableSeries/DrawingProviders/HeatmapHelpers.d.ts +47 -0
  177. package/Charting/Visuals/RenderableSeries/DrawingProviders/HeatmapHelpers.js +258 -0
  178. package/Charting/Visuals/RenderableSeries/DrawingProviders/LineSeriesDrawingProvider.js +26 -2
  179. package/Charting/Visuals/RenderableSeries/DrawingProviders/MountainSeriesDrawingProvider.d.ts +1 -0
  180. package/Charting/Visuals/RenderableSeries/DrawingProviders/MountainSeriesDrawingProvider.js +34 -15
  181. package/Charting/Visuals/RenderableSeries/DrawingProviders/NonUniformHeatmapDrawingProvider.js +5 -230
  182. package/Charting/Visuals/RenderableSeries/DrawingProviders/OhlcSeriesDrawingProvider.d.ts +1 -0
  183. package/Charting/Visuals/RenderableSeries/DrawingProviders/OhlcSeriesDrawingProvider.js +62 -37
  184. package/Charting/Visuals/RenderableSeries/DrawingProviders/PointMarkerDrawingProvider.js +30 -3
  185. package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformHeatmapDrawingProvider.d.ts +1 -0
  186. package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformHeatmapDrawingProvider.js +4 -1
  187. package/Charting/Visuals/RenderableSeries/FastBubbleRenderableSeries.d.ts +0 -2
  188. package/Charting/Visuals/RenderableSeries/FastBubbleRenderableSeries.js +0 -4
  189. package/Charting/Visuals/RenderableSeries/FastTextRenderableSeries.d.ts +3 -0
  190. package/Charting/Visuals/RenderableSeries/FastTextRenderableSeries.js +10 -0
  191. package/Charting/Visuals/RenderableSeries/HitTest/BubbleSeriesHitTestProvider.d.ts +4 -0
  192. package/Charting/Visuals/RenderableSeries/HitTest/BubbleSeriesHitTestProvider.js +7 -0
  193. package/Charting/Visuals/RenderableSeries/HitTest/HitTestInfo.d.ts +4 -0
  194. package/Charting/Visuals/RenderableSeries/HitTest/HitTestInfo.js +9 -0
  195. package/Charting/Visuals/RenderableSeries/HoveredChangedArgs.d.ts +6 -1
  196. package/Charting/Visuals/RenderableSeries/HoveredChangedArgs.js +2 -1
  197. package/Charting/Visuals/RenderableSeries/IRenderableSeries.d.ts +1 -1
  198. package/Charting/Visuals/RenderableSeries/SelectionChangedArgs.d.ts +6 -1
  199. package/Charting/Visuals/RenderableSeries/SelectionChangedArgs.js +2 -1
  200. package/Charting/Visuals/RenderableSeries/ShaderEffect.d.ts +3 -2
  201. package/Charting/Visuals/RenderableSeries/ShaderEffect.js +29 -9
  202. package/Charting/Visuals/RenderableSeries/SplineBandRenderableSeries.js +50 -1
  203. package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.js +13 -1
  204. package/Charting/Visuals/RenderableSeries/SplineMountainRenderableSeries.js +13 -1
  205. package/Charting/Visuals/RenderableSeries/StackedColumnCollection.js +3 -0
  206. package/Charting/Visuals/RenderableSeries/StackedMountainCollection.d.ts +0 -2
  207. package/Charting/Visuals/RenderableSeries/StackedMountainCollection.js +4 -4
  208. package/Charting/Visuals/RenderableSeries/StackedMountainRenderableSeries.d.ts +1 -0
  209. package/Charting/Visuals/RenderableSeries/StackedMountainRenderableSeries.js +8 -0
  210. package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.d.ts +1 -2
  211. package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.js +8 -3
  212. package/Charting/Visuals/RubberBandSvgRect/RubberBandSvgRect.d.ts +7 -1
  213. package/Charting/Visuals/RubberBandSvgRect/RubberBandSvgRect.js +38 -12
  214. package/Charting/Visuals/SciChartDefaults.d.ts +10 -0
  215. package/Charting/Visuals/SciChartDefaults.js +10 -0
  216. package/Charting/Visuals/SciChartOverview.d.ts +2 -1
  217. package/Charting/Visuals/SciChartOverview.js +28 -8
  218. package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.d.ts +16 -3
  219. package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.js +125 -60
  220. package/Charting/Visuals/SciChartSurface.d.ts +4 -41
  221. package/Charting/Visuals/SciChartSurface.js +52 -66
  222. package/Charting/Visuals/SciChartSurfaceBase.d.ts +117 -13
  223. package/Charting/Visuals/SciChartSurfaceBase.js +177 -32
  224. package/Charting/Visuals/TextureManager/CanvasTexture.d.ts +2 -1
  225. package/Charting/Visuals/TextureManager/CanvasTexture.js +37 -17
  226. package/Charting/Visuals/TextureManager/TextureManager.d.ts +2 -1
  227. package/Charting/Visuals/TextureManager/TextureManager.js +27 -7
  228. package/Charting/Visuals/createMaster.d.ts +7 -2
  229. package/Charting/Visuals/createMaster.js +140 -45
  230. package/Charting/Visuals/createSingle.d.ts +0 -2
  231. package/Charting/Visuals/createSingle.js +46 -11
  232. package/Charting/Visuals/licenseManager2D.d.ts +7 -5
  233. package/Charting/Visuals/licenseManager2D.js +105 -53
  234. package/Charting/Visuals/loader.js +3 -1
  235. package/Charting/Visuals/sciChartInitCommon.d.ts +1 -1
  236. package/Charting/Visuals/sciChartInitCommon.js +5 -1
  237. package/Charting3D/CameraController.d.ts +1 -1
  238. package/Charting3D/CameraController.js +21 -7
  239. package/Charting3D/ChartModifiers/ChartModifierBase3D.d.ts +1 -0
  240. package/Charting3D/ChartModifiers/ChartModifierBase3D.js +4 -1
  241. package/Charting3D/ChartModifiers/OrbitModifier3D.d.ts +17 -5
  242. package/Charting3D/ChartModifiers/OrbitModifier3D.js +62 -26
  243. package/Charting3D/ChartModifiers/PinchZoomModifier3D.d.ts +81 -0
  244. package/Charting3D/ChartModifiers/PinchZoomModifier3D.js +164 -0
  245. package/Charting3D/ChartModifiers/ResetCamera3DModifier.d.ts +1 -1
  246. package/Charting3D/ChartModifiers/ResetCamera3DModifier.js +1 -2
  247. package/Charting3D/ChartModifiers/TooltipModifier3D.d.ts +122 -0
  248. package/Charting3D/ChartModifiers/TooltipModifier3D.js +427 -0
  249. package/Charting3D/I3DSurfaceOptions.d.ts +10 -0
  250. package/Charting3D/I3DSurfaceOptions.js +2 -0
  251. package/Charting3D/Model/DataSeries/BaseDataSeries3D.d.ts +2 -1
  252. package/Charting3D/Model/DataSeries/BaseDataSeries3D.js +27 -6
  253. package/Charting3D/Model/DataSeries/BaseGridDataSeries3D.d.ts +1 -1
  254. package/Charting3D/Model/DataSeries/BaseGridDataSeries3D.js +2 -2
  255. package/Charting3D/Model/DataSeries/IPointMetadata3D.d.ts +7 -2
  256. package/Charting3D/Model/DataSeries/UniformGridDataSeries3D.d.ts +8 -0
  257. package/Charting3D/Model/DataSeries/UniformGridDataSeries3D.js +12 -0
  258. package/Charting3D/Model/DataSeries/XyzDataSeries3D.d.ts +2 -2
  259. package/Charting3D/Model/DataSeries/XyzDataSeries3D.js +1 -1
  260. package/Charting3D/Vector3.d.ts +5 -0
  261. package/Charting3D/Vector3.js +7 -0
  262. package/Charting3D/Visuals/Annotations/TooltipSvgAnnotation3D.d.ts +88 -0
  263. package/Charting3D/Visuals/Annotations/TooltipSvgAnnotation3D.js +291 -0
  264. package/Charting3D/Visuals/Axis/AxisBase3D.d.ts +29 -3
  265. package/Charting3D/Visuals/Axis/AxisBase3D.js +46 -18
  266. package/Charting3D/Visuals/Axis/AxisBase3DLabelStyle.js +2 -1
  267. package/Charting3D/Visuals/Axis/AxisCubeEntity.d.ts +0 -4
  268. package/Charting3D/Visuals/Axis/AxisCubeEntity.js +3 -6
  269. package/Charting3D/Visuals/Axis/IAxisDescriptor.d.ts +2 -2
  270. package/Charting3D/Visuals/Axis/IAxisDescriptor.js +2 -2
  271. package/Charting3D/Visuals/Axis/NumericAxis3D.d.ts +3 -2
  272. package/Charting3D/Visuals/Axis/NumericAxis3D.js +7 -3
  273. package/Charting3D/Visuals/Primitives/BaseSceneEntity3D.d.ts +41 -30
  274. package/Charting3D/Visuals/Primitives/BaseSceneEntity3D.js +78 -26
  275. package/Charting3D/Visuals/Primitives/CrosshairLinesSceneEntity.d.ts +47 -0
  276. package/Charting3D/Visuals/Primitives/CrosshairLinesSceneEntity.js +106 -0
  277. package/Charting3D/Visuals/Primitives/EntityIdProvider.d.ts +29 -0
  278. package/Charting3D/Visuals/Primitives/EntityIdProvider.js +28 -0
  279. package/Charting3D/Visuals/Primitives/PointLine3DSceneEntity.d.ts +51 -0
  280. package/Charting3D/Visuals/Primitives/PointLine3DSceneEntity.js +190 -0
  281. package/Charting3D/Visuals/Primitives/RenderableSeriesSceneEntity.d.ts +12 -0
  282. package/Charting3D/Visuals/Primitives/RenderableSeriesSceneEntity.js +14 -0
  283. package/Charting3D/Visuals/Primitives/ScatterPointsSceneEntity.d.ts +11 -0
  284. package/Charting3D/Visuals/Primitives/ScatterPointsSceneEntity.js +23 -2
  285. package/Charting3D/Visuals/Primitives/SurfaceMeshSceneEntity.d.ts +3 -0
  286. package/Charting3D/Visuals/Primitives/SurfaceMeshSceneEntity.js +17 -1
  287. package/Charting3D/Visuals/RenderableSeries/BaseRenderableSeries3D.d.ts +21 -1
  288. package/Charting3D/Visuals/RenderableSeries/BaseRenderableSeries3D.js +78 -12
  289. package/Charting3D/Visuals/RenderableSeries/Constants.d.ts +2 -0
  290. package/Charting3D/Visuals/RenderableSeries/Constants.js +2 -0
  291. package/Charting3D/Visuals/RenderableSeries/ESeriesType.d.ts +2 -1
  292. package/Charting3D/Visuals/RenderableSeries/ESeriesType.js +1 -0
  293. package/Charting3D/Visuals/RenderableSeries/HitTestInfo3D.d.ts +37 -0
  294. package/Charting3D/Visuals/RenderableSeries/HitTestInfo3D.js +22 -0
  295. package/Charting3D/Visuals/RenderableSeries/PointLineRenderableSeries3D.d.ts +64 -0
  296. package/Charting3D/Visuals/RenderableSeries/PointLineRenderableSeries3D.js +105 -0
  297. package/Charting3D/Visuals/RenderableSeries/SeriesInfo3D.d.ts +51 -0
  298. package/Charting3D/Visuals/RenderableSeries/SeriesInfo3D.js +32 -0
  299. package/Charting3D/Visuals/RenderableSeries/SurfaceMeshSeriesInfo3D.d.ts +15 -0
  300. package/Charting3D/Visuals/RenderableSeries/SurfaceMeshSeriesInfo3D.js +112 -0
  301. package/Charting3D/Visuals/RenderableSeries/XyzSeriesInfo3D.d.ts +20 -0
  302. package/Charting3D/Visuals/RenderableSeries/XyzSeriesInfo3D.js +60 -0
  303. package/Charting3D/Visuals/RootSceneEntity.d.ts +0 -4
  304. package/Charting3D/Visuals/RootSceneEntity.js +3 -8
  305. package/Charting3D/Visuals/SciChart3DRenderer.d.ts +1 -0
  306. package/Charting3D/Visuals/SciChart3DRenderer.js +26 -0
  307. package/Charting3D/Visuals/SciChart3DSurface.d.ts +55 -7
  308. package/Charting3D/Visuals/SciChart3DSurface.js +136 -13
  309. package/Charting3D/Visuals/ViewportManager3DBase.d.ts +4 -0
  310. package/Charting3D/Visuals/ViewportManager3DBase.js +7 -1
  311. package/Charting3D/Visuals/createMaster3d.d.ts +1 -2
  312. package/Charting3D/Visuals/createMaster3d.js +81 -14
  313. package/Charting3D/Visuals/createSingle3d.js +34 -4
  314. package/Charting3D/Visuals/licenseManager3D.js +29 -25
  315. package/Core/BuildStamp.d.ts +1 -1
  316. package/Core/BuildStamp.js +2 -2
  317. package/Core/DeletableEntity.d.ts +34 -0
  318. package/Core/DeletableEntity.js +138 -0
  319. package/Core/Globals.d.ts +11 -0
  320. package/Core/Globals.js +13 -0
  321. package/Core/Guard.d.ts +6 -0
  322. package/Core/Guard.js +10 -0
  323. package/Core/Mouse/MouseManager.d.ts +23 -0
  324. package/Core/Mouse/MouseManager.js +53 -0
  325. package/Core/Telemetry.js +4 -6
  326. package/_wasm/scichart.browser.js +1 -1
  327. package/_wasm/scichart2d.data +0 -0
  328. package/_wasm/scichart2d.js +4 -294
  329. package/_wasm/scichart2d.wasm +0 -0
  330. package/_wasm/scichart3d.data +0 -0
  331. package/_wasm/scichart3d.js +4 -294
  332. package/_wasm/scichart3d.wasm +0 -0
  333. package/index.d.ts +42 -2
  334. package/index.dev.js +68876 -0
  335. package/index.js +81 -27
  336. package/index.min.js +1 -1
  337. package/package.json +3 -4
  338. package/types/ChartModifierType.d.ts +2 -0
  339. package/types/ChartModifierType.js +2 -0
  340. package/types/DefaultRenderLayer.d.ts +9 -8
  341. package/types/DefaultRenderLayer.js +9 -8
  342. package/types/NumberArray.d.ts +1 -0
  343. package/types/NumberArray.js +12 -1
  344. package/types/SceneEntityType.d.ts +13 -5
  345. package/types/SceneEntityType.js +13 -5
  346. package/types/TSciChart.d.ts +37 -8
  347. package/types/TSciChart3D.d.ts +126 -7
  348. package/types/licensingClasses.d.ts +2 -1
  349. package/types/licensingClasses.js +1 -0
  350. package/utils/MemoryUsageHelper.d.ts +92 -0
  351. package/utils/MemoryUsageHelper.js +221 -0
  352. package/utils/array.d.ts +8 -0
  353. package/utils/array.js +58 -1
  354. package/utils/colorUtil.d.ts +7 -0
  355. package/utils/colorUtil.js +13 -1
  356. package/utils/logger.d.ts +2 -0
  357. package/utils/logger.js +11 -0
  358. package/utils/parseColor.js +19 -4
@@ -0,0 +1,92 @@
1
+ /** @ignore */
2
+ declare type TWeakRef<T = any> = {
3
+ deref: () => T;
4
+ };
5
+ /** @ignore */
6
+ declare type TObjectEntryInfo = {
7
+ isWasmObject: boolean;
8
+ /** WeakRef for the original object */
9
+ objectRef: TWeakRef;
10
+ /** WeakRef for the proxy of the object */
11
+ proxyRef?: TWeakRef;
12
+ /** revocableToken for the proxy of the object */
13
+ revocableTokenRef?: TWeakRef<ReturnType<ProxyConstructor["revocable"]>>;
14
+ };
15
+ /** @ignore */
16
+ declare type TObjectEntryOptions = {
17
+ isWasmObject?: boolean;
18
+ revocableToken?: ReturnType<ProxyConstructor["revocable"]>;
19
+ proxy?: any;
20
+ };
21
+ /** ObjectRegistry represents a structure for storing object lifecycle info.
22
+ * Adding an object to the registry will place it into a category of undeleted until it is remove from the registry.
23
+ * Also the object will be placed into a category of uncollected until it is disposed by garbage collector.
24
+ */
25
+ export declare class ObjectRegistry {
26
+ weakMapRegistry: WeakMap<object, any>;
27
+ undeletedObjectsMap: Map<string, TObjectEntryInfo>;
28
+ uncollectedObjectsMap: Map<string, TObjectEntryInfo>;
29
+ protected finalizationRegistry: any;
30
+ /** Adds an object and its related info to the registry */
31
+ add(obj: any, id: string, options?: TObjectEntryOptions): void;
32
+ /** Removes the object from the undeleted objects collection */
33
+ remove(id: string): boolean;
34
+ getObjectId(obj: any): any;
35
+ /** Calls `delete` on instances of {@link IDeletable} objects within the registry */
36
+ deleteIDeletableObjects(): void;
37
+ /** Calls `delete` on instances of Web Assembly objects within the registry */
38
+ deleteWasmObjects(): void;
39
+ /** Outputs the state of registry to the console */
40
+ log(): void;
41
+ /** Returns the state of the registry */
42
+ getState(): any;
43
+ /** Calls `delete` on a specific object within the registry */
44
+ protected deleteEntry(entry: TObjectEntryInfo, key: string): void;
45
+ /** The callback executed when an object is being garbage collected */
46
+ protected onCollect(id: string): void;
47
+ }
48
+ /** @ignore */
49
+ export declare const generateIdentifier: (entity: any) => string;
50
+ /** {@link MemoryUsageHelper} provides tools for tracking, debugging, and testing common issus related to lifecycle of SciChart entities. */
51
+ export declare class MemoryUsageHelper {
52
+ protected static isMemoryUsageDebugEnabledProperty: boolean;
53
+ static objectRegistry: ObjectRegistry;
54
+ /** Gets or sets the `Memory Usage Debug Mode`.
55
+ * Enabling the mode, provides warnings about wrong usage or cleanup.
56
+ * Also it wraps SciChart entities and adds them to the {@link objectRegistry} to track their lifecycle
57
+ */
58
+ static get isMemoryUsageDebugEnabled(): boolean;
59
+ /** Gets or sets the `Memory Usage Debug Mode`.
60
+ * Enabling the mode, provides warnings about wrong usage or cleanup.
61
+ * Also it wraps SciChart entities and adds them to the {@link objectRegistry} to track their lifecycle
62
+ */
63
+ static set isMemoryUsageDebugEnabled(value: boolean);
64
+ /**
65
+ * Adds entity to the object registry to keep track of it being collected
66
+ * @param entity
67
+ * @param id optional custom ID of the entity
68
+ */
69
+ static register(entity: any, id?: string): void;
70
+ /**
71
+ * Removes entity from the object registry
72
+ * @param id ID of the entity
73
+ */
74
+ static unregister(id: string): void;
75
+ /**
76
+ * Calls `delete` on all 2D and 3D charts instantiated with {@link SciChartSurface.create} or {@link SciChart3DSurface.create}
77
+ */
78
+ static destroyMultiChart(): void;
79
+ /**
80
+ * Calls `delete` on all 2D and 3D charts instantiated with {@link SciChartSurface.createSingle} or {@link SciChart3DSurface.createSingle}
81
+ */
82
+ static destroySingleCharts(): void;
83
+ /**
84
+ * Calls `delete` on all charts instantiated with {@link SciChartPieSurface.create}
85
+ */
86
+ static destroyPieCharts(): void;
87
+ /**
88
+ * Calls `delete` on all charts
89
+ */
90
+ static destroyAllCharts(): void;
91
+ }
92
+ export {};
@@ -0,0 +1,221 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MemoryUsageHelper = exports.generateIdentifier = exports.ObjectRegistry = void 0;
4
+ var Globals_1 = require("../Core/Globals");
5
+ var guid_1 = require("./guid");
6
+ /** ObjectRegistry represents a structure for storing object lifecycle info.
7
+ * Adding an object to the registry will place it into a category of undeleted until it is remove from the registry.
8
+ * Also the object will be placed into a category of uncollected until it is disposed by garbage collector.
9
+ */
10
+ var ObjectRegistry = /** @class */ (function () {
11
+ function ObjectRegistry() {
12
+ var _this = this;
13
+ this.weakMapRegistry = new WeakMap();
14
+ // This structure is useful for tracking DeletableEntity or Native objects
15
+ // which were not disposed using delete method
16
+ this.undeletedObjectsMap = new Map();
17
+ this.uncollectedObjectsMap = new Map();
18
+ // @ts-ignore
19
+ this.finalizationRegistry = new FinalizationRegistry(function (id) {
20
+ _this.uncollectedObjectsMap.delete(id);
21
+ _this.onCollect(id);
22
+ });
23
+ }
24
+ /** Adds an object and its related info to the registry */
25
+ ObjectRegistry.prototype.add = function (obj, id, options) {
26
+ var _a, _b;
27
+ if (options === void 0) { options = { isWasmObject: false }; }
28
+ var isWasmObject = options.isWasmObject;
29
+ if (this.weakMapRegistry.has(obj)) {
30
+ console.warn("Adding existing entry to the registry!", id);
31
+ }
32
+ if (this.undeletedObjectsMap.has(id)) {
33
+ console.warn("Adding existing entry id to the registry!", id);
34
+ }
35
+ this.finalizationRegistry.register(obj, id);
36
+ this.weakMapRegistry.set(obj, id);
37
+ var proxy = (_b = (_a = options === null || options === void 0 ? void 0 : options.revocableToken) === null || _a === void 0 ? void 0 : _a.proxy) !== null && _b !== void 0 ? _b : options === null || options === void 0 ? void 0 : options.proxy;
38
+ var revocableToken = options === null || options === void 0 ? void 0 : options.revocableToken;
39
+ if (proxy) {
40
+ this.weakMapRegistry.set(proxy, id);
41
+ }
42
+ // @ts-ignore WeakRef
43
+ var objectRef = new WeakRef(obj);
44
+ // @ts-ignore WeakRef
45
+ var proxyRef = proxy && new WeakRef(proxy);
46
+ // @ts-ignore WeakRef
47
+ var revocableTokenRef = revocableToken && new WeakRef(revocableToken);
48
+ var objInfo = { isWasmObject: isWasmObject, objectRef: objectRef, proxyRef: proxyRef, revocableTokenRef: revocableTokenRef };
49
+ if (obj.delete) {
50
+ this.undeletedObjectsMap.set(id, objInfo);
51
+ }
52
+ this.uncollectedObjectsMap.set(id, objInfo);
53
+ };
54
+ /** Removes the object from the undeleted objects collection */
55
+ ObjectRegistry.prototype.remove = function (id) {
56
+ if (!this.undeletedObjectsMap.has(id) && !this.uncollectedObjectsMap.has(id)) {
57
+ console.warn("".concat(id, " was not found in the ObjectRegistry!"));
58
+ }
59
+ return this.undeletedObjectsMap.delete(id);
60
+ };
61
+ ObjectRegistry.prototype.getObjectId = function (obj) {
62
+ return this.weakMapRegistry.get(obj);
63
+ };
64
+ /** Calls `delete` on instances of {@link IDeletable} objects within the registry */
65
+ ObjectRegistry.prototype.deleteIDeletableObjects = function () {
66
+ var _this = this;
67
+ this.undeletedObjectsMap.forEach(function (entry, key) {
68
+ if (!entry.isWasmObject) {
69
+ _this.deleteEntry(entry, key);
70
+ }
71
+ });
72
+ };
73
+ /** Calls `delete` on instances of Web Assembly objects within the registry */
74
+ ObjectRegistry.prototype.deleteWasmObjects = function () {
75
+ var _this = this;
76
+ this.undeletedObjectsMap.forEach(function (entry, key) {
77
+ if (entry.isWasmObject) {
78
+ _this.deleteEntry(entry, key);
79
+ }
80
+ });
81
+ };
82
+ /** Outputs the state of registry to the console */
83
+ ObjectRegistry.prototype.log = function () {
84
+ var _this = this;
85
+ var undeletedObjectsIds = Array.from(this.undeletedObjectsMap.keys());
86
+ var uncollectedObjectsIds = Array.from(this.uncollectedObjectsMap.keys());
87
+ var collectedNotDeleted = undeletedObjectsIds.filter(function (id) { return !_this.uncollectedObjectsMap.has(id); });
88
+ var deletedNotCollected = uncollectedObjectsIds.filter(function (id) { return !_this.undeletedObjectsMap.has(id); });
89
+ console.log("Object Registry Log Start:");
90
+ console.log("undeletedObjectsMap", this.undeletedObjectsMap);
91
+ console.log("uncollectedObjectsMap", this.uncollectedObjectsMap);
92
+ console.log("collectedNotDeleted", collectedNotDeleted);
93
+ console.log("deletedNotCollected", deletedNotCollected);
94
+ console.log("weakMap", this.weakMapRegistry);
95
+ console.log("Object Registry Log End");
96
+ };
97
+ /** Returns the state of the registry */
98
+ ObjectRegistry.prototype.getState = function () {
99
+ var undeletedObjectsIds = Array.from(this.undeletedObjectsMap.keys());
100
+ var uncollectedObjectsIds = Array.from(this.uncollectedObjectsMap.keys());
101
+ var state = {};
102
+ if (undeletedObjectsIds.length) {
103
+ state.undeletedObjectsIds = undeletedObjectsIds;
104
+ }
105
+ if (uncollectedObjectsIds.length) {
106
+ state.uncollectedObjectsIds = uncollectedObjectsIds;
107
+ }
108
+ return state;
109
+ };
110
+ /** Calls `delete` on a specific object within the registry */
111
+ ObjectRegistry.prototype.deleteEntry = function (entry, key) {
112
+ var originalObject = entry.objectRef.deref();
113
+ if (originalObject) {
114
+ originalObject.delete();
115
+ this.remove(key);
116
+ }
117
+ else {
118
+ console.warn("Looks like the ".concat(key, " has already been garbage collected, thus the proper cleanup could not be executed!"));
119
+ }
120
+ };
121
+ /** The callback executed when an object is being garbage collected */
122
+ ObjectRegistry.prototype.onCollect = function (id) {
123
+ // Override with custom behavior
124
+ };
125
+ return ObjectRegistry;
126
+ }());
127
+ exports.ObjectRegistry = ObjectRegistry;
128
+ /** @ignore */
129
+ var generateIdentifier = function (entity) {
130
+ return "".concat(entity === null || entity === void 0 ? void 0 : entity.constructor.name, "_").concat((0, guid_1.generateGuid)());
131
+ };
132
+ exports.generateIdentifier = generateIdentifier;
133
+ /** {@link MemoryUsageHelper} provides tools for tracking, debugging, and testing common issus related to lifecycle of SciChart entities. */
134
+ var MemoryUsageHelper = /** @class */ (function () {
135
+ function MemoryUsageHelper() {
136
+ }
137
+ Object.defineProperty(MemoryUsageHelper, "isMemoryUsageDebugEnabled", {
138
+ /** Gets or sets the `Memory Usage Debug Mode`.
139
+ * Enabling the mode, provides warnings about wrong usage or cleanup.
140
+ * Also it wraps SciChart entities and adds them to the {@link objectRegistry} to track their lifecycle
141
+ */
142
+ get: function () {
143
+ return this.isMemoryUsageDebugEnabledProperty;
144
+ },
145
+ /** Gets or sets the `Memory Usage Debug Mode`.
146
+ * Enabling the mode, provides warnings about wrong usage or cleanup.
147
+ * Also it wraps SciChart entities and adds them to the {@link objectRegistry} to track their lifecycle
148
+ */
149
+ set: function (value) {
150
+ if (value) {
151
+ console.warn("Memory usage debug enabled! Make sure to disable it for production build!");
152
+ }
153
+ try {
154
+ if (process.env.NODE_ENV !== "production") {
155
+ this.isMemoryUsageDebugEnabledProperty = value;
156
+ if (value && !MemoryUsageHelper.objectRegistry) {
157
+ MemoryUsageHelper.objectRegistry = new ObjectRegistry();
158
+ }
159
+ return;
160
+ }
161
+ }
162
+ catch (err) {
163
+ console.warn(err);
164
+ }
165
+ },
166
+ enumerable: false,
167
+ configurable: true
168
+ });
169
+ /**
170
+ * Adds entity to the object registry to keep track of it being collected
171
+ * @param entity
172
+ * @param id optional custom ID of the entity
173
+ */
174
+ MemoryUsageHelper.register = function (entity, id) {
175
+ var _a;
176
+ if (!entity) {
177
+ console.warn("Registering invalid object \"".concat(entity, "\"!"));
178
+ return;
179
+ }
180
+ (_a = MemoryUsageHelper.objectRegistry) === null || _a === void 0 ? void 0 : _a.add(entity, id !== null && id !== void 0 ? id : (0, exports.generateIdentifier)(entity));
181
+ };
182
+ /**
183
+ * Removes entity from the object registry
184
+ * @param id ID of the entity
185
+ */
186
+ MemoryUsageHelper.unregister = function (id) {
187
+ var _a;
188
+ (_a = MemoryUsageHelper.objectRegistry) === null || _a === void 0 ? void 0 : _a.remove(id);
189
+ };
190
+ /**
191
+ * Calls `delete` on all 2D and 3D charts instantiated with {@link SciChartSurface.create} or {@link SciChart3DSurface.create}
192
+ */
193
+ MemoryUsageHelper.destroyMultiChart = function () {
194
+ Globals_1.sciChartDestinations.forEach(function (destination) { return destination.sciChartSurface.delete(true); });
195
+ Globals_1.sciChart3DDestinations.forEach(function (destination) { return destination.sciChartSurface.delete(true); });
196
+ };
197
+ /**
198
+ * Calls `delete` on all 2D and 3D charts instantiated with {@link SciChartSurface.createSingle} or {@link SciChart3DSurface.createSingle}
199
+ */
200
+ MemoryUsageHelper.destroySingleCharts = function () {
201
+ Globals_1.sciChartSingleDestinations.forEach(function (destination) { return destination.sciChartSurface.delete(true); });
202
+ Globals_1.sciChart3DSingleDestinations.forEach(function (destination) { return destination.sciChartSurface.delete(true); });
203
+ };
204
+ /**
205
+ * Calls `delete` on all charts instantiated with {@link SciChartPieSurface.create}
206
+ */
207
+ MemoryUsageHelper.destroyPieCharts = function () {
208
+ Globals_1.sciChartPieDestinations.forEach(function (destination) { return destination.sciChartSurface.delete(true); });
209
+ };
210
+ /**
211
+ * Calls `delete` on all charts
212
+ */
213
+ MemoryUsageHelper.destroyAllCharts = function () {
214
+ MemoryUsageHelper.destroyMultiChart();
215
+ MemoryUsageHelper.destroySingleCharts();
216
+ MemoryUsageHelper.destroyPieCharts();
217
+ };
218
+ MemoryUsageHelper.isMemoryUsageDebugEnabledProperty = false;
219
+ return MemoryUsageHelper;
220
+ }());
221
+ exports.MemoryUsageHelper = MemoryUsageHelper;
package/utils/array.d.ts CHANGED
@@ -18,3 +18,11 @@ export declare function isArraySorted(arr: NumberArray, ascending?: boolean): bo
18
18
  * @returns
19
19
  */
20
20
  export declare function makeIncArray(length: number, multiplier?: number, map?: (n: number, index?: number) => number): number[];
21
+ /**
22
+ * Helper function to append an array to a target array, treating the target as a circular buffer
23
+ * @param source
24
+ * @param target
25
+ * @param fifoCapacity
26
+ * @param startIndex
27
+ */
28
+ export declare function appendRangeFifo(source: any[], target: any[], fifoCapacity: number, startIndex: number): void;
package/utils/array.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.makeIncArray = exports.isArraySorted = exports.arrayRemove = exports.areArraysEqual = exports.countUnique = exports.getUniqueValues = void 0;
3
+ exports.appendRangeFifo = exports.makeIncArray = exports.isArraySorted = exports.arrayRemove = exports.areArraysEqual = exports.countUnique = exports.getUniqueValues = void 0;
4
4
  function getUniqueValues(array) {
5
5
  var onlyUnique = function (value, index, self) {
6
6
  if (value === undefined || value === null)
@@ -77,3 +77,60 @@ function makeIncArray(length, multiplier, map) {
77
77
  }
78
78
  }
79
79
  exports.makeIncArray = makeIncArray;
80
+ /**
81
+ * Helper function to append an array to a target array, treating the target as a circular buffer
82
+ * @param source
83
+ * @param target
84
+ * @param fifoCapacity
85
+ * @param startIndex
86
+ */
87
+ function appendRangeFifo(source, target, fifoCapacity, startIndex) {
88
+ var targetSize = target.length;
89
+ var length = source.length;
90
+ //console.log("s,t ", source, target);
91
+ if (fifoCapacity >= targetSize + length) {
92
+ // Space to append all data. Use normal method
93
+ target.length += length;
94
+ // merge new values into the collection
95
+ for (var i = 0; i < length; ++i) {
96
+ target[targetSize + i] = source[i];
97
+ }
98
+ }
99
+ else if (length > fifoCapacity) {
100
+ // new data is larger than buffer. Replace buffer with end of data
101
+ var dataIndex = length - fifoCapacity;
102
+ var dataThatWillFit = source.slice(dataIndex);
103
+ target = dataThatWillFit;
104
+ }
105
+ else if (fifoCapacity > targetSize) {
106
+ // buffer not full yet, but new data will overflow
107
+ var remainingCap = fifoCapacity - targetSize;
108
+ target.length = fifoCapacity;
109
+ for (var i = 0; i < length; ++i) {
110
+ if (i < remainingCap) {
111
+ target[targetSize + i] = source[i];
112
+ }
113
+ else {
114
+ target[remainingCap - i] = source[i];
115
+ }
116
+ }
117
+ }
118
+ else {
119
+ // buffer already full
120
+ var remainingCap = length;
121
+ if (startIndex + length > fifoCapacity) {
122
+ // need to do two writes
123
+ remainingCap = fifoCapacity - startIndex;
124
+ }
125
+ for (var i = 0; i < length; ++i) {
126
+ if (i < remainingCap) {
127
+ target[startIndex + i] = source[i];
128
+ }
129
+ else {
130
+ target[remainingCap - i] = source[i];
131
+ }
132
+ }
133
+ }
134
+ //console.log("t: ", target);
135
+ }
136
+ exports.appendRangeFifo = appendRangeFifo;
@@ -31,3 +31,10 @@ export declare function uintArgbColorToAbgr(argbColor: number): number;
31
31
  export declare function uintArgbColorMultiplyOpacity(argbColor: number, opacity: number): number;
32
32
  export declare function uintArgbColorOverrideOpacity(argbColor: number, opacity: number): number;
33
33
  export declare function uintArgbColorIsTransparent(argbColor: number): boolean;
34
+ /**
35
+ * Applies the given opacity to an html color code or name, returning an html color code.
36
+ * @param color
37
+ * @param opacity
38
+ * @returns
39
+ */
40
+ export declare function applyOpacityToHtmlColor(color: string, opacity: number): string;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.uintArgbColorIsTransparent = exports.uintArgbColorOverrideOpacity = exports.uintArgbColorMultiplyOpacity = exports.uintArgbColorToAbgr = exports.linearColorMapLerp = exports.uintArgbColorLerp = exports.uintArgbColorLerp24bit = void 0;
3
+ exports.applyOpacityToHtmlColor = exports.uintArgbColorIsTransparent = exports.uintArgbColorOverrideOpacity = exports.uintArgbColorMultiplyOpacity = exports.uintArgbColorToAbgr = exports.linearColorMapLerp = exports.uintArgbColorLerp = exports.uintArgbColorLerp24bit = void 0;
4
4
  var TLinearColorMap_1 = require("../types/TLinearColorMap");
5
5
  var parseColor_1 = require("./parseColor");
6
6
  /**
@@ -115,3 +115,15 @@ function uintArgbColorIsTransparent(argbColor) {
115
115
  return alpha !== 0xff000000;
116
116
  }
117
117
  exports.uintArgbColorIsTransparent = uintArgbColorIsTransparent;
118
+ /**
119
+ * Applies the given opacity to an html color code or name, returning an html color code.
120
+ * @param color
121
+ * @param opacity
122
+ * @returns
123
+ */
124
+ function applyOpacityToHtmlColor(color, opacity) {
125
+ var tarbg = (0, parseColor_1.parseColorToTArgb)(color);
126
+ tarbg.opacity = Math.floor(opacity * 256);
127
+ return (0, parseColor_1.parseTArgbToHtmlColor)(tarbg);
128
+ }
129
+ exports.applyOpacityToHtmlColor = applyOpacityToHtmlColor;
package/utils/logger.d.ts CHANGED
@@ -1,3 +1,5 @@
1
1
  export declare class Logger {
2
+ static enableDebug: boolean;
2
3
  static log(message?: any, ...optionalParameters: any): void;
4
+ static debug(message?: any, ...optionalParameters: any): void;
3
5
  }
package/utils/logger.js CHANGED
@@ -4,6 +4,7 @@ exports.Logger = void 0;
4
4
  var Logger = /** @class */ (function () {
5
5
  function Logger() {
6
6
  }
7
+ // public static enableLog = false;
7
8
  Logger.log = function (message) {
8
9
  var optionalParameters = [];
9
10
  for (var _i = 1; _i < arguments.length; _i++) {
@@ -11,6 +12,16 @@ var Logger = /** @class */ (function () {
11
12
  }
12
13
  console.log(message, optionalParameters);
13
14
  };
15
+ Logger.debug = function (message) {
16
+ var optionalParameters = [];
17
+ for (var _i = 1; _i < arguments.length; _i++) {
18
+ optionalParameters[_i - 1] = arguments[_i];
19
+ }
20
+ if (Logger.enableDebug) {
21
+ console.debug(message, optionalParameters);
22
+ }
23
+ };
24
+ Logger.enableDebug = false;
14
25
  return Logger;
15
26
  }());
16
27
  exports.Logger = Logger;
@@ -128,10 +128,10 @@ exports.parseArgbToHtmlColor = parseArgbToHtmlColor;
128
128
  * @param targb
129
129
  */
130
130
  var parseTArgbToHtmlColor = function (targb) {
131
- var r = targb.red.toString(16);
132
- var g = targb.green.toString(16);
133
- var b = targb.blue.toString(16);
134
- var a = targb.opacity.toString(16);
131
+ var r = convertComponent(targb.red);
132
+ var g = convertComponent(targb.green);
133
+ var b = convertComponent(targb.blue);
134
+ var a = convertComponent(targb.opacity);
135
135
  return ("#" + r + g + b + a).toUpperCase();
136
136
  };
137
137
  exports.parseTArgbToHtmlColor = parseTArgbToHtmlColor;
@@ -176,6 +176,21 @@ var convertOpacity = function (opacity) {
176
176
  }
177
177
  return Math.floor(opacity * 256);
178
178
  };
179
+ /**
180
+ * @ignore
181
+ * Converts number (color component) from 0 to 256 to hex string, with 0 padding
182
+ * @param component
183
+ */
184
+ var convertComponent = function (component) {
185
+ if (component >= 256) {
186
+ return "ff";
187
+ }
188
+ if (component <= 0) {
189
+ return "00";
190
+ }
191
+ var hex = component.toString(16);
192
+ return hex.length === 1 ? "0" + hex : hex;
193
+ };
179
194
  // https://www.w3schools.com/colors/colors_names.asp
180
195
  // https://en.wikipedia.org/wiki/Web_colors
181
196
  // http://www.colors.commutercreative.com/grid/