velo-plot 1.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (370) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +119 -0
  3. package/dist/EventEmitter-DAbs2K1C.js +60 -0
  4. package/dist/EventEmitter-DAbs2K1C.js.map +1 -0
  5. package/dist/core/Chart.d.ts +15 -0
  6. package/dist/core/ChartControls.d.ts +41 -0
  7. package/dist/core/ChartInitQueue.d.ts +50 -0
  8. package/dist/core/ChartLegend.d.ts +74 -0
  9. package/dist/core/ChartStatistics.d.ts +18 -0
  10. package/dist/core/EventEmitter.d.ts +30 -0
  11. package/dist/core/InteractionManager.d.ts +96 -0
  12. package/dist/core/OverlayRenderer.d.ts +89 -0
  13. package/dist/core/Series.d.ts +4 -0
  14. package/dist/core/animation/AnimationEngine.d.ts +156 -0
  15. package/dist/core/animation/index.d.ts +6 -0
  16. package/dist/core/annotations/AnnotationManager.d.ts +61 -0
  17. package/dist/core/annotations/index.d.ts +5 -0
  18. package/dist/core/annotations/types.d.ts +159 -0
  19. package/dist/core/chart/ChartAnimatedNavigation.d.ts +53 -0
  20. package/dist/core/chart/ChartAxisManager.d.ts +61 -0
  21. package/dist/core/chart/ChartCore.d.ts +336 -0
  22. package/dist/core/chart/ChartExporter.d.ts +18 -0
  23. package/dist/core/chart/ChartNavigation.d.ts +33 -0
  24. package/dist/core/chart/ChartPluginBridge.d.ts +34 -0
  25. package/dist/core/chart/ChartRenderLoop.d.ts +100 -0
  26. package/dist/core/chart/ChartRenderer.d.ts +52 -0
  27. package/dist/core/chart/ChartScaling.d.ts +31 -0
  28. package/dist/core/chart/ChartSeries.d.ts +4 -0
  29. package/dist/core/chart/ChartSetup.d.ts +67 -0
  30. package/dist/core/chart/ChartStateManager.d.ts +54 -0
  31. package/dist/core/chart/ChartUI.d.ts +40 -0
  32. package/dist/core/chart/exporter/SVGExporter.d.ts +6 -0
  33. package/dist/core/chart/exporter/index.d.ts +5 -0
  34. package/dist/core/chart/index.d.ts +14 -0
  35. package/dist/core/chart/series/SeriesActions.d.ts +7 -0
  36. package/dist/core/chart/series/SeriesBuffer.d.ts +4 -0
  37. package/dist/core/chart/series/index.d.ts +6 -0
  38. package/dist/core/chart/series/types.d.ts +22 -0
  39. package/dist/core/chart/types.d.ts +188 -0
  40. package/dist/core/clipboard/index.d.ts +137 -0
  41. package/dist/core/debug/index.d.ts +143 -0
  42. package/dist/core/index.d.ts +17 -0
  43. package/dist/core/keybindings/index.d.ts +157 -0
  44. package/dist/core/layout/index.d.ts +12 -0
  45. package/dist/core/layout/types.d.ts +165 -0
  46. package/dist/core/loading/index.d.ts +104 -0
  47. package/dist/core/locale/index.d.ts +91 -0
  48. package/dist/core/responsive/ResponsiveManager.d.ts +133 -0
  49. package/dist/core/responsive/index.d.ts +4 -0
  50. package/dist/core/selection/SelectionManager.d.ts +165 -0
  51. package/dist/core/selection/index.d.ts +4 -0
  52. package/dist/core/series/Series.d.ts +73 -0
  53. package/dist/core/series/SeriesBounds.d.ts +3 -0
  54. package/dist/core/series/SeriesDataUtils.d.ts +7 -0
  55. package/dist/core/series/index.d.ts +6 -0
  56. package/dist/core/sync/index.d.ts +147 -0
  57. package/dist/core/theme-editor/index.d.ts +122 -0
  58. package/dist/examples/PluginDemonstration.d.ts +20 -0
  59. package/dist/examples.d.ts +25 -0
  60. package/dist/gpu/adapter/gpuRenderer.d.ts +135 -0
  61. package/dist/gpu/adapter/index.d.ts +7 -0
  62. package/dist/gpu/adapter/seriesAdapter.d.ts +88 -0
  63. package/dist/gpu/backends/webgl/WebGLBackend.d.ts +42 -0
  64. package/dist/gpu/backends/webgl/index.d.ts +5 -0
  65. package/dist/gpu/backends/webgl/programFactory.d.ts +30 -0
  66. package/dist/gpu/backends/webgl/shaders.d.ts +14 -0
  67. package/dist/gpu/backends/webgpu/MassiveDataRenderer.d.ts +111 -0
  68. package/dist/gpu/backends/webgpu/WebGPUBackend.d.ts +58 -0
  69. package/dist/gpu/backends/webgpu/pipelines/bandPipeline.d.ts +24 -0
  70. package/dist/gpu/backends/webgpu/pipelines/heatmapPipeline.d.ts +28 -0
  71. package/dist/gpu/backends/webgpu/pipelines/index.d.ts +10 -0
  72. package/dist/gpu/backends/webgpu/pipelines/instancedLinePipeline.d.ts +23 -0
  73. package/dist/gpu/backends/webgpu/pipelines/instancedPointPipeline.d.ts +25 -0
  74. package/dist/gpu/backends/webgpu/pipelines/linePipeline.d.ts +23 -0
  75. package/dist/gpu/backends/webgpu/pipelines/pointPipeline.d.ts +28 -0
  76. package/dist/gpu/backends/webgpu/pipelines/trianglePipeline.d.ts +5 -0
  77. package/dist/gpu/backends/webgpu/pipelines/triangleShader.d.ts +1 -0
  78. package/dist/gpu/backends/webgpu/shaders/heatmap.wgsl.d.ts +8 -0
  79. package/dist/gpu/backends/webgpu/shaders/index.d.ts +8 -0
  80. package/dist/gpu/backends/webgpu/shaders/instanced.wgsl.d.ts +16 -0
  81. package/dist/gpu/backends/webgpu/shaders/line.wgsl.d.ts +8 -0
  82. package/dist/gpu/backends/webgpu/shaders/point.wgsl.d.ts +9 -0
  83. package/dist/gpu/benchmark/benchmark.d.ts +74 -0
  84. package/dist/gpu/benchmark/index.d.ts +5 -0
  85. package/dist/gpu/compute/gpuCompute.d.ts +72 -0
  86. package/dist/gpu/compute/index.d.ts +6 -0
  87. package/dist/gpu/compute/shaders.d.ts +9 -0
  88. package/dist/gpu/drawList.d.ts +77 -0
  89. package/dist/gpu/examples/gallery.d.ts +20 -0
  90. package/dist/gpu/examples/index.d.ts +3 -0
  91. package/dist/gpu/examples/webgpu-line-demo.d.ts +8 -0
  92. package/dist/gpu/examples/webgpu-triangle.d.ts +1 -0
  93. package/dist/gpu/frame.d.ts +25 -0
  94. package/dist/gpu/index.d.ts +24 -0
  95. package/dist/gpu/resources/bufferStore.d.ts +40 -0
  96. package/dist/gpu/resources/index.d.ts +9 -0
  97. package/dist/gpu/resources/pipelineCache.d.ts +33 -0
  98. package/dist/gpu/resources/textureStore.d.ts +41 -0
  99. package/dist/gpu/types.d.ts +47 -0
  100. package/dist/index-BMiZoKmm.js +536 -0
  101. package/dist/index-BMiZoKmm.js.map +1 -0
  102. package/dist/index-Ce2JgkH_.js +282 -0
  103. package/dist/index-Ce2JgkH_.js.map +1 -0
  104. package/dist/index-D8ifudJH.js +2431 -0
  105. package/dist/index-D8ifudJH.js.map +1 -0
  106. package/dist/index-Dag88bW4.js +499 -0
  107. package/dist/index-Dag88bW4.js.map +1 -0
  108. package/dist/index-qhscKTDy.js +309 -0
  109. package/dist/index-qhscKTDy.js.map +1 -0
  110. package/dist/index-x4stH3jD.js +282 -0
  111. package/dist/index-x4stH3jD.js.map +1 -0
  112. package/dist/index.core-CYu3tydL.js +7252 -0
  113. package/dist/index.core-CYu3tydL.js.map +1 -0
  114. package/dist/index.core.d.ts +20 -0
  115. package/dist/index.d.ts +51 -0
  116. package/dist/overlay/CanvasOverlay.d.ts +102 -0
  117. package/dist/overlay/index.d.ts +4 -0
  118. package/dist/plugins/3d/Area3DRenderer.d.ts +122 -0
  119. package/dist/plugins/3d/Axes3D.d.ts +104 -0
  120. package/dist/plugins/3d/Bubble3DRenderer.d.ts +198 -0
  121. package/dist/plugins/3d/Impulse3DRenderer.d.ts +130 -0
  122. package/dist/plugins/3d/Line3DRenderer.d.ts +118 -0
  123. package/dist/plugins/3d/PointCloud3DRenderer.d.ts +84 -0
  124. package/dist/plugins/3d/Raycaster3D.d.ts +137 -0
  125. package/dist/plugins/3d/Ribbon3DRenderer.d.ts +83 -0
  126. package/dist/plugins/3d/SurfaceBar3DRenderer.d.ts +92 -0
  127. package/dist/plugins/3d/SurfaceMesh3DRenderer.d.ts +130 -0
  128. package/dist/plugins/3d/Tooltip3D.d.ts +71 -0
  129. package/dist/plugins/3d/VectorField3DRenderer.d.ts +86 -0
  130. package/dist/plugins/3d/Voxel3DRenderer.d.ts +89 -0
  131. package/dist/plugins/3d/Waterfall3DRenderer.d.ts +94 -0
  132. package/dist/plugins/3d/camera/OrbitCamera.d.ts +99 -0
  133. package/dist/plugins/3d/camera/index.d.ts +1 -0
  134. package/dist/plugins/3d/colorThemes.d.ts +39 -0
  135. package/dist/plugins/3d/controls/OrbitController.d.ts +69 -0
  136. package/dist/plugins/3d/controls/index.d.ts +1 -0
  137. package/dist/plugins/3d/index.d.ts +50 -0
  138. package/dist/plugins/3d/math/Mat4.d.ts +33 -0
  139. package/dist/plugins/3d/math/Vec3.d.ts +37 -0
  140. package/dist/plugins/3d/math/index.d.ts +4 -0
  141. package/dist/plugins/3d/mesh/InstancedMesh.d.ts +42 -0
  142. package/dist/plugins/3d/mesh/geometry.d.ts +34 -0
  143. package/dist/plugins/3d/mesh/index.d.ts +2 -0
  144. package/dist/plugins/3d/series/Area3D.d.ts +17 -0
  145. package/dist/plugins/3d/series/Column3D.d.ts +20 -0
  146. package/dist/plugins/3d/series/Heatmap3D.d.ts +17 -0
  147. package/dist/plugins/3d/series/Impulse3D.d.ts +16 -0
  148. package/dist/plugins/3d/series/PointLine3D.d.ts +20 -0
  149. package/dist/plugins/3d/series/Ribbon3D.d.ts +17 -0
  150. package/dist/plugins/3d/series/Scatter3D.d.ts +21 -0
  151. package/dist/plugins/3d/series/SurfaceMesh3D.d.ts +35 -0
  152. package/dist/plugins/3d/series/Waterfall3D.d.ts +38 -0
  153. package/dist/plugins/3d/series/index.d.ts +13 -0
  154. package/dist/plugins/3d/series/types.d.ts +143 -0
  155. package/dist/plugins/3d/shader/index.d.ts +2 -0
  156. package/dist/plugins/3d/shader/programs.d.ts +24 -0
  157. package/dist/plugins/3d/shader/sources.d.ts +27 -0
  158. package/dist/plugins/3d/types.d.ts +71 -0
  159. package/dist/plugins/3d.d.ts +3 -0
  160. package/dist/plugins/3d.js +5498 -0
  161. package/dist/plugins/3d.js.map +1 -0
  162. package/dist/plugins/PluginContext.d.ts +53 -0
  163. package/dist/plugins/PluginManager.d.ts +129 -0
  164. package/dist/plugins/PluginRegistry.d.ts +38 -0
  165. package/dist/plugins/analysis/SeriesFit.d.ts +3 -0
  166. package/dist/plugins/analysis/contours.d.ts +20 -0
  167. package/dist/plugins/analysis/fft.d.ts +138 -0
  168. package/dist/plugins/analysis/filters.d.ts +76 -0
  169. package/dist/plugins/analysis/fitting.d.ts +24 -0
  170. package/dist/plugins/analysis/index.d.ts +29 -0
  171. package/dist/plugins/analysis/indicators.d.ts +148 -0
  172. package/dist/plugins/analysis/math.d.ts +32 -0
  173. package/dist/plugins/analysis/statistics.d.ts +78 -0
  174. package/dist/plugins/analysis/utils.d.ts +150 -0
  175. package/dist/plugins/analysis.d.ts +3 -0
  176. package/dist/plugins/analysis.js +1202 -0
  177. package/dist/plugins/analysis.js.map +1 -0
  178. package/dist/plugins/annotations/index.d.ts +16 -0
  179. package/dist/plugins/annotations.d.ts +3 -0
  180. package/dist/plugins/annotations.js +438 -0
  181. package/dist/plugins/annotations.js.map +1 -0
  182. package/dist/plugins/anomaly-detection/algorithms.d.ts +38 -0
  183. package/dist/plugins/anomaly-detection/index.d.ts +16 -0
  184. package/dist/plugins/anomaly-detection/types.d.ts +57 -0
  185. package/dist/plugins/broken-axis/BrokenAxisScale.d.ts +24 -0
  186. package/dist/plugins/broken-axis/exports.d.ts +6 -0
  187. package/dist/plugins/broken-axis/index.d.ts +6 -0
  188. package/dist/plugins/broken-axis/types.d.ts +50 -0
  189. package/dist/plugins/builtins/crosshair/CrosshairPlugin.d.ts +40 -0
  190. package/dist/plugins/builtins/crosshair/index.d.ts +1 -0
  191. package/dist/plugins/builtins/data-logger/DataLoggerPlugin.d.ts +11 -0
  192. package/dist/plugins/builtins/data-logger/index.d.ts +1 -0
  193. package/dist/plugins/builtins/direction-indicator/DirectionIndicatorPlugin.d.ts +17 -0
  194. package/dist/plugins/builtins/direction-indicator/index.d.ts +2 -0
  195. package/dist/plugins/builtins/grid-highlight/GridHighlightPlugin.d.ts +17 -0
  196. package/dist/plugins/builtins/grid-highlight/index.d.ts +1 -0
  197. package/dist/plugins/builtins/index.d.ts +25 -0
  198. package/dist/plugins/builtins/stats/StatsPlugin.d.ts +11 -0
  199. package/dist/plugins/builtins/stats/index.d.ts +1 -0
  200. package/dist/plugins/builtins/watermark/WatermarkPlugin.d.ts +15 -0
  201. package/dist/plugins/builtins/watermark/index.d.ts +1 -0
  202. package/dist/plugins/caching/exports.d.ts +6 -0
  203. package/dist/plugins/caching/index.d.ts +6 -0
  204. package/dist/plugins/caching/types.d.ts +120 -0
  205. package/dist/plugins/clipboard/index.d.ts +20 -0
  206. package/dist/plugins/clipboard.d.ts +3 -0
  207. package/dist/plugins/clipboard.js +270 -0
  208. package/dist/plugins/clipboard.js.map +1 -0
  209. package/dist/plugins/context-menu/index.d.ts +12 -0
  210. package/dist/plugins/context-menu/renderer.d.ts +43 -0
  211. package/dist/plugins/context-menu/types.d.ts +202 -0
  212. package/dist/plugins/context-menu.d.ts +3 -0
  213. package/dist/plugins/context-menu.js +621 -0
  214. package/dist/plugins/context-menu.js.map +1 -0
  215. package/dist/plugins/data-export/formatters.d.ts +34 -0
  216. package/dist/plugins/data-export/index.d.ts +15 -0
  217. package/dist/plugins/data-export/types.d.ts +166 -0
  218. package/dist/plugins/data-export.d.ts +3 -0
  219. package/dist/plugins/data-export.js +463 -0
  220. package/dist/plugins/data-export.js.map +1 -0
  221. package/dist/plugins/data-transform/index.d.ts +6 -0
  222. package/dist/plugins/data-transform/types.d.ts +34 -0
  223. package/dist/plugins/debug/index.d.ts +24 -0
  224. package/dist/plugins/debug.d.ts +3 -0
  225. package/dist/plugins/debug.js +330 -0
  226. package/dist/plugins/debug.js.map +1 -0
  227. package/dist/plugins/drag-edit/exports.d.ts +6 -0
  228. package/dist/plugins/drag-edit/index.d.ts +6 -0
  229. package/dist/plugins/drag-edit/types.d.ts +118 -0
  230. package/dist/plugins/forecasting/algorithms.d.ts +6 -0
  231. package/dist/plugins/forecasting/exports.d.ts +3 -0
  232. package/dist/plugins/forecasting/index.d.ts +11 -0
  233. package/dist/plugins/forecasting/types.d.ts +88 -0
  234. package/dist/plugins/gpu/index.d.ts +24 -0
  235. package/dist/plugins/gpu.d.ts +3 -0
  236. package/dist/plugins/gpu.js +2430 -0
  237. package/dist/plugins/gpu.js.map +1 -0
  238. package/dist/plugins/i18n/index.d.ts +22 -0
  239. package/dist/plugins/i18n.d.ts +3 -0
  240. package/dist/plugins/i18n.js +37 -0
  241. package/dist/plugins/i18n.js.map +1 -0
  242. package/dist/plugins/index.d.ts +110 -0
  243. package/dist/plugins/keyboard/index.d.ts +15 -0
  244. package/dist/plugins/keyboard.d.ts +3 -0
  245. package/dist/plugins/keyboard.js +8 -0
  246. package/dist/plugins/keyboard.js.map +1 -0
  247. package/dist/plugins/latex/exports.d.ts +6 -0
  248. package/dist/plugins/latex/index.d.ts +8 -0
  249. package/dist/plugins/latex/parser.d.ts +6 -0
  250. package/dist/plugins/latex/renderer.d.ts +6 -0
  251. package/dist/plugins/latex/symbols.d.ts +28 -0
  252. package/dist/plugins/latex/types.d.ts +88 -0
  253. package/dist/plugins/lazy-load/exports.d.ts +6 -0
  254. package/dist/plugins/lazy-load/index.d.ts +6 -0
  255. package/dist/plugins/lazy-load/types.d.ts +121 -0
  256. package/dist/plugins/loading/index.d.ts +15 -0
  257. package/dist/plugins/loading.d.ts +3 -0
  258. package/dist/plugins/loading.js +7 -0
  259. package/dist/plugins/loading.js.map +1 -0
  260. package/dist/plugins/ml-integration/exports.d.ts +11 -0
  261. package/dist/plugins/ml-integration/index.d.ts +6 -0
  262. package/dist/plugins/ml-integration/native-algorithms.d.ts +69 -0
  263. package/dist/plugins/ml-integration/types.d.ts +74 -0
  264. package/dist/plugins/offscreen/exports.d.ts +6 -0
  265. package/dist/plugins/offscreen/index.d.ts +6 -0
  266. package/dist/plugins/offscreen/pool.d.ts +32 -0
  267. package/dist/plugins/offscreen/types.d.ts +35 -0
  268. package/dist/plugins/pattern-recognition/index.d.ts +6 -0
  269. package/dist/plugins/pattern-recognition/patterns.d.ts +3 -0
  270. package/dist/plugins/pattern-recognition/types.d.ts +245 -0
  271. package/dist/plugins/radar/index.d.ts +6 -0
  272. package/dist/plugins/radar/types.d.ts +40 -0
  273. package/dist/plugins/regression/algorithms.d.ts +6 -0
  274. package/dist/plugins/regression/index.d.ts +6 -0
  275. package/dist/plugins/regression/types.d.ts +261 -0
  276. package/dist/plugins/roi/exports.d.ts +6 -0
  277. package/dist/plugins/roi/index.d.ts +49 -0
  278. package/dist/plugins/roi/types.d.ts +60 -0
  279. package/dist/plugins/snapshot/index.d.ts +11 -0
  280. package/dist/plugins/snapshot/types.d.ts +38 -0
  281. package/dist/plugins/streaming/index.d.ts +32 -0
  282. package/dist/plugins/streaming.d.ts +3 -0
  283. package/dist/plugins/streaming.js +13 -0
  284. package/dist/plugins/streaming.js.map +1 -0
  285. package/dist/plugins/sync/index.d.ts +22 -0
  286. package/dist/plugins/sync.d.ts +3 -0
  287. package/dist/plugins/sync.js +261 -0
  288. package/dist/plugins/sync.js.map +1 -0
  289. package/dist/plugins/theme-editor/index.d.ts +18 -0
  290. package/dist/plugins/theme-editor.d.ts +3 -0
  291. package/dist/plugins/theme-editor.js +7 -0
  292. package/dist/plugins/theme-editor.js.map +1 -0
  293. package/dist/plugins/tools/delta-tool/index.d.ts +159 -0
  294. package/dist/plugins/tools/index.d.ts +21 -0
  295. package/dist/plugins/tools/peak-tool/index.d.ts +159 -0
  296. package/dist/plugins/tools/tooltip/TooltipManager.d.ts +213 -0
  297. package/dist/plugins/tools/tooltip/TooltipPositioner.d.ts +83 -0
  298. package/dist/plugins/tools/tooltip/TooltipRenderer.d.ts +64 -0
  299. package/dist/plugins/tools/tooltip/index.d.ts +18 -0
  300. package/dist/plugins/tools/tooltip/templates/AnnotationTemplate.d.ts +18 -0
  301. package/dist/plugins/tools/tooltip/templates/CrosshairTemplate.d.ts +39 -0
  302. package/dist/plugins/tools/tooltip/templates/DefaultTemplate.d.ts +30 -0
  303. package/dist/plugins/tools/tooltip/templates/HeatmapTemplate.d.ts +34 -0
  304. package/dist/plugins/tools/tooltip/templates/MinimalTemplate.d.ts +26 -0
  305. package/dist/plugins/tools/tooltip/templates/RangeTemplate.d.ts +18 -0
  306. package/dist/plugins/tools/tooltip/templates/ScientificTemplate.d.ts +34 -0
  307. package/dist/plugins/tools/tooltip/templates/index.d.ts +27 -0
  308. package/dist/plugins/tools/tooltip/themes.d.ts +48 -0
  309. package/dist/plugins/tools/tooltip/types.d.ts +396 -0
  310. package/dist/plugins/tools.d.ts +3 -0
  311. package/dist/plugins/tools.js +9 -0
  312. package/dist/plugins/tools.js.map +1 -0
  313. package/dist/plugins/types.d.ts +451 -0
  314. package/dist/plugins/video-recorder/exports.d.ts +6 -0
  315. package/dist/plugins/video-recorder/index.d.ts +6 -0
  316. package/dist/plugins/video-recorder/types.d.ts +55 -0
  317. package/dist/plugins/virtualization/exports.d.ts +6 -0
  318. package/dist/plugins/virtualization/index.d.ts +6 -0
  319. package/dist/plugins/virtualization/types.d.ts +48 -0
  320. package/dist/react/SciPlot.d.ts +60 -0
  321. package/dist/react/index.d.ts +5 -0
  322. package/dist/react/useSciPlot.d.ts +56 -0
  323. package/dist/renderer/BarRenderer.d.ts +14 -0
  324. package/dist/renderer/CandlestickRenderer.d.ts +12 -0
  325. package/dist/renderer/GaugeRenderer.d.ts +3 -0
  326. package/dist/renderer/HeatmapRenderer.d.ts +15 -0
  327. package/dist/renderer/NativeWebGLRenderer.d.ts +16 -0
  328. package/dist/renderer/PolarRenderer.d.ts +64 -0
  329. package/dist/renderer/RendererInterface.d.ts +70 -0
  330. package/dist/renderer/SankeyRenderer.d.ts +3 -0
  331. package/dist/renderer/WebGPURenderer.d.ts +16 -0
  332. package/dist/renderer/index.d.ts +13 -0
  333. package/dist/renderer/native/NativeWebGLRenderer.d.ts +31 -0
  334. package/dist/renderer/native/bufferStore.d.ts +11 -0
  335. package/dist/renderer/native/draw.d.ts +47 -0
  336. package/dist/renderer/native/programFactory.d.ts +3 -0
  337. package/dist/renderer/native/renderFrame.d.ts +3 -0
  338. package/dist/renderer/native/shaderSources.d.ts +6 -0
  339. package/dist/renderer/native/textureStore.d.ts +8 -0
  340. package/dist/renderer/native/types.d.ts +77 -0
  341. package/dist/renderer/native/utils.d.ts +31 -0
  342. package/dist/renderer/radar/RadarRenderer.d.ts +71 -0
  343. package/dist/renderer/radar/index.d.ts +10 -0
  344. package/dist/renderer/shaders.d.ts +77 -0
  345. package/dist/renderer/ternary/TernaryRenderer.d.ts +39 -0
  346. package/dist/renderer/ternary/index.d.ts +6 -0
  347. package/dist/renderer/ternary/types.d.ts +56 -0
  348. package/dist/scales/index.d.ts +54 -0
  349. package/dist/serialization/index.d.ts +153 -0
  350. package/dist/streaming/backpressure.d.ts +179 -0
  351. package/dist/streaming/index.d.ts +7 -0
  352. package/dist/streaming/mock.d.ts +12 -0
  353. package/dist/streaming/types.d.ts +57 -0
  354. package/dist/streaming/utils.d.ts +19 -0
  355. package/dist/streaming/websocket.d.ts +6 -0
  356. package/dist/testing/index.d.ts +225 -0
  357. package/dist/theme/colorSchemes.d.ts +56 -0
  358. package/dist/theme/index.d.ts +138 -0
  359. package/dist/types.d.ts +753 -0
  360. package/dist/utils-Dbro9-qM.js +254 -0
  361. package/dist/utils-Dbro9-qM.js.map +1 -0
  362. package/dist/velo-plot.d.ts +1 -0
  363. package/dist/velo-plot.full.d.ts +1 -0
  364. package/dist/velo-plot.full.js +5804 -0
  365. package/dist/velo-plot.full.js.map +1 -0
  366. package/dist/velo-plot.js +31 -0
  367. package/dist/velo-plot.js.map +1 -0
  368. package/dist/workers/downsample.d.ts +34 -0
  369. package/dist/workers/downsample.worker.d.ts +46 -0
  370. package/package.json +185 -0
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Heatmap Shader - WGSL for WebGPU
3
+ *
4
+ * Renders heatmap cells with colormap texture lookup.
5
+ * Each vertex has position (x, y) and value (z) for color mapping.
6
+ */
7
+ export declare const HEATMAP_SHADER_WGSL = "\n// Uniform buffer for transforms and value range\nstruct Uniforms {\n scale: vec2<f32>,\n translate: vec2<f32>,\n minValue: f32,\n maxValue: f32,\n _padding: vec2<f32>,\n};\n\n@group(0) @binding(0)\nvar<uniform> uniforms: Uniforms;\n\n@group(0) @binding(1)\nvar colormapSampler: sampler;\n\n@group(0) @binding(2)\nvar colormapTexture: texture_1d<f32>;\n\nstruct VSInput {\n @location(0) position: vec2<f32>,\n @location(1) value: f32,\n};\n\nstruct VSOutput {\n @builtin(position) pos: vec4<f32>,\n @location(0) value: f32,\n};\n\n@vertex\nfn vs_main(in: VSInput) -> VSOutput {\n var out: VSOutput;\n let transformed = in.position * uniforms.scale + uniforms.translate;\n out.pos = vec4<f32>(transformed, 0.0, 1.0);\n out.value = in.value;\n return out;\n}\n\n@fragment\nfn fs_main(in: VSOutput) -> @location(0) vec4<f32> {\n let range = uniforms.maxValue - uniforms.minValue;\n var t: f32;\n if (range != 0.0) {\n t = (in.value - uniforms.minValue) / range;\n } else {\n t = 0.0;\n }\n t = clamp(t, 0.0, 1.0);\n \n return textureSample(colormapTexture, colormapSampler, t);\n}\n";
8
+ export declare const HEATMAP_VERTEX_STRIDE: number;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Shader Index - Export all WGSL shaders
3
+ */
4
+ export { TRIANGLE_SHADER_WGSL } from '../pipelines/triangleShader';
5
+ export { LINE_SHADER_WGSL, LINE_VERTEX_STRIDE } from './line.wgsl';
6
+ export { POINT_SHADER_WGSL, POINT_QUAD_SHADER_WGSL, POINT_VERTEX_STRIDE, } from './point.wgsl';
7
+ export { HEATMAP_SHADER_WGSL, HEATMAP_VERTEX_STRIDE, } from './heatmap.wgsl';
8
+ export { INSTANCED_LINE_SHADER_WGSL, INSTANCED_POINT_SHADER_WGSL, INSTANCED_LINE_VERTEX_STRIDE, INSTANCED_POINT_VERTEX_STRIDE, } from './instanced.wgsl';
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Instanced Line Shader - For ultra-large datasets
3
+ *
4
+ * Uses instancing to render line segments efficiently.
5
+ * Each instance renders a line segment between two consecutive points.
6
+ */
7
+ export declare const INSTANCED_LINE_SHADER_WGSL = "\nstruct Uniforms {\n scale: vec2<f32>,\n translate: vec2<f32>,\n color: vec4<f32>,\n lineWidth: f32,\n aspectRatio: f32,\n pointCount: u32,\n padding: u32,\n}\n\nstruct Point {\n x: f32,\n y: f32,\n}\n\n@group(0) @binding(0) var<uniform> uniforms: Uniforms;\n@group(0) @binding(1) var<storage, read> points: array<Point>;\n\nstruct VertexOut {\n @builtin(position) position: vec4<f32>,\n @location(0) @interpolate(flat) segment_index: u32,\n}\n\n@vertex\nfn vs_main(\n @builtin(vertex_index) vertex_index: u32,\n @builtin(instance_index) instance_index: u32\n) -> VertexOut {\n var out: VertexOut;\n out.segment_index = instance_index;\n \n // Skip if beyond point count\n if (instance_index >= uniforms.pointCount - 1u) {\n out.position = vec4<f32>(0.0, 0.0, 0.0, 1.0);\n return out;\n }\n \n // Get the two points for this segment\n let p0 = points[instance_index];\n let p1 = points[instance_index + 1u];\n \n // Transform points to clip space\n let pos0 = vec2<f32>(p0.x * uniforms.scale.x + uniforms.translate.x,\n p0.y * uniforms.scale.y + uniforms.translate.y);\n let pos1 = vec2<f32>(p1.x * uniforms.scale.x + uniforms.translate.x,\n p1.y * uniforms.scale.y + uniforms.translate.y);\n \n // Calculate line direction and perpendicular\n let dir = normalize(pos1 - pos0);\n let perp = vec2<f32>(-dir.y, dir.x);\n \n // Adjust for aspect ratio\n let width = uniforms.lineWidth / 500.0; // Normalized width\n let offset = perp * width;\n \n // Each segment is a quad (2 triangles, 6 vertices)\n // vertex_index: 0,1,2 = first triangle, 3,4,5 = second triangle\n var pos: vec2<f32>;\n \n switch (vertex_index % 6u) {\n case 0u: { pos = pos0 - offset; } // bottom-left of start\n case 1u: { pos = pos0 + offset; } // top-left of start\n case 2u: { pos = pos1 - offset; } // bottom-left of end\n case 3u: { pos = pos1 - offset; } // bottom-left of end\n case 4u: { pos = pos0 + offset; } // top-left of start\n case 5u: { pos = pos1 + offset; } // top-left of end\n default: { pos = pos0; }\n }\n \n out.position = vec4<f32>(pos, 0.0, 1.0);\n return out;\n}\n\n@fragment\nfn fs_main(in: VertexOut) -> @location(0) vec4<f32> {\n return uniforms.color;\n}\n";
8
+ /**
9
+ * Instanced Point Shader - For ultra-large scatter datasets
10
+ *
11
+ * Uses instancing with a quad per point.
12
+ * Supports SDF-based symbols.
13
+ */
14
+ export declare const INSTANCED_POINT_SHADER_WGSL = "\nstruct Uniforms {\n scale: vec2<f32>,\n translate: vec2<f32>,\n color: vec4<f32>,\n pointSize: f32,\n symbolType: i32,\n viewportWidth: f32,\n viewportHeight: f32,\n pointCount: u32,\n padding: vec3<u32>,\n}\n\nstruct Point {\n x: f32,\n y: f32,\n}\n\n@group(0) @binding(0) var<uniform> uniforms: Uniforms;\n@group(0) @binding(1) var<storage, read> points: array<Point>;\n\nstruct VertexOut {\n @builtin(position) position: vec4<f32>,\n @location(0) uv: vec2<f32>,\n}\n\n@vertex\nfn vs_main(\n @builtin(vertex_index) vertex_index: u32,\n @builtin(instance_index) instance_index: u32\n) -> VertexOut {\n var out: VertexOut;\n \n if (instance_index >= uniforms.pointCount) {\n out.position = vec4<f32>(0.0, 0.0, 0.0, 1.0);\n out.uv = vec2<f32>(0.0, 0.0);\n return out;\n }\n \n let pt = points[instance_index];\n \n // Transform point center to clip space\n let center = vec2<f32>(\n pt.x * uniforms.scale.x + uniforms.translate.x,\n pt.y * uniforms.scale.y + uniforms.translate.y\n );\n \n // Calculate point size in clip space\n let sizeX = uniforms.pointSize / uniforms.viewportWidth * 2.0;\n let sizeY = uniforms.pointSize / uniforms.viewportHeight * 2.0;\n \n // Quad vertices (6 for 2 triangles)\n var offset: vec2<f32>;\n var uv: vec2<f32>;\n \n switch (vertex_index % 6u) {\n case 0u: { offset = vec2<f32>(-sizeX, -sizeY); uv = vec2<f32>(-1.0, -1.0); }\n case 1u: { offset = vec2<f32>( sizeX, -sizeY); uv = vec2<f32>( 1.0, -1.0); }\n case 2u: { offset = vec2<f32>(-sizeX, sizeY); uv = vec2<f32>(-1.0, 1.0); }\n case 3u: { offset = vec2<f32>(-sizeX, sizeY); uv = vec2<f32>(-1.0, 1.0); }\n case 4u: { offset = vec2<f32>( sizeX, -sizeY); uv = vec2<f32>( 1.0, -1.0); }\n case 5u: { offset = vec2<f32>( sizeX, sizeY); uv = vec2<f32>( 1.0, 1.0); }\n default: { offset = vec2<f32>(0.0, 0.0); uv = vec2<f32>(0.0, 0.0); }\n }\n \n out.position = vec4<f32>(center + offset, 0.0, 1.0);\n out.uv = uv;\n return out;\n}\n\n// SDF functions\nfn sdCircle(p: vec2<f32>) -> f32 {\n return length(p) - 0.8;\n}\n\nfn sdSquare(p: vec2<f32>) -> f32 {\n let d = abs(p) - vec2<f32>(0.7);\n return length(max(d, vec2<f32>(0.0))) + min(max(d.x, d.y), 0.0);\n}\n\nfn sdDiamond(p: vec2<f32>) -> f32 {\n return (abs(p.x) + abs(p.y)) - 0.8;\n}\n\n@fragment\nfn fs_main(in: VertexOut) -> @location(0) vec4<f32> {\n var d: f32;\n \n switch (uniforms.symbolType) {\n case 0: { d = sdCircle(in.uv); } // circle\n case 1: { d = sdSquare(in.uv); } // square\n case 2: { d = sdDiamond(in.uv); } // diamond\n default: { d = sdCircle(in.uv); }\n }\n \n if (d > 0.05) {\n discard;\n }\n \n let alpha = 1.0 - smoothstep(0.0, 0.05, d);\n return vec4<f32>(uniforms.color.rgb, uniforms.color.a * alpha);\n}\n";
15
+ export declare const INSTANCED_LINE_VERTEX_STRIDE = 8;
16
+ export declare const INSTANCED_POINT_VERTEX_STRIDE = 8;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Line Shader - WGSL for WebGPU
3
+ *
4
+ * Renders simple line strips with uniform color.
5
+ * Uses uniform buffer for transform (scale + translate).
6
+ */
7
+ export declare const LINE_SHADER_WGSL = "\n// Uniform buffer for transforms and color\nstruct Uniforms {\n scale: vec2<f32>,\n translate: vec2<f32>,\n color: vec4<f32>,\n};\n\n@group(0) @binding(0)\nvar<uniform> uniforms: Uniforms;\n\nstruct VSInput {\n @location(0) position: vec2<f32>,\n};\n\nstruct VSOutput {\n @builtin(position) pos: vec4<f32>,\n};\n\n@vertex\nfn vs_main(in: VSInput) -> VSOutput {\n var out: VSOutput;\n let transformed = in.position * uniforms.scale + uniforms.translate;\n out.pos = vec4<f32>(transformed, 0.0, 1.0);\n return out;\n}\n\n@fragment\nfn fs_main(in: VSOutput) -> @location(0) vec4<f32> {\n return uniforms.color;\n}\n";
8
+ export declare const LINE_VERTEX_STRIDE: number;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Point Shader - WGSL for WebGPU
3
+ *
4
+ * Renders scatter points with SDF-based symbols.
5
+ * Supports: circle, square, diamond, triangle, triangleDown, cross, x, star
6
+ */
7
+ export declare const POINT_SHADER_WGSL = "\n// Uniform buffer for transforms, color, point properties\nstruct Uniforms {\n scale: vec2<f32>,\n translate: vec2<f32>,\n color: vec4<f32>,\n pointSize: f32,\n symbol: i32, // 0=circle, 1=square, 2=diamond, 3=triangle, 4=triangleDown, 5=cross, 6=x, 7=star\n _padding: vec2<f32>,\n};\n\n@group(0) @binding(0)\nvar<uniform> uniforms: Uniforms;\n\nstruct VSInput {\n @location(0) position: vec2<f32>,\n};\n\nstruct VSOutput {\n @builtin(position) pos: vec4<f32>,\n @location(0) @interpolate(flat) pointSize: f32,\n @location(1) @interpolate(flat) symbol: i32,\n};\n\n@vertex\nfn vs_main(in: VSInput, @builtin(vertex_index) vertexIndex: u32) -> VSOutput {\n var out: VSOutput;\n let transformed = in.position * uniforms.scale + uniforms.translate;\n out.pos = vec4<f32>(transformed, 0.0, 1.0);\n out.pointSize = uniforms.pointSize;\n out.symbol = uniforms.symbol;\n return out;\n}\n\n// SDF functions for symbols\nfn sdCircle(p: vec2<f32>, r: f32) -> f32 {\n return length(p) - r;\n}\n\nfn sdBox(p: vec2<f32>, b: vec2<f32>) -> f32 {\n let d = abs(p) - b;\n return length(max(d, vec2<f32>(0.0))) + min(max(d.x, d.y), 0.0);\n}\n\nfn sdDiamond(p: vec2<f32>, r: f32) -> f32 {\n return (abs(p.x) + abs(p.y)) - r;\n}\n\nfn sdTriangle(p_in: vec2<f32>, r: f32) -> f32 {\n let k = sqrt(3.0);\n var p = p_in;\n p.x = abs(p.x) - r;\n p.y = p.y + r / k;\n if (p.x + k * p.y > 0.0) {\n p = vec2<f32>(p.x - k * p.y, -k * p.x - p.y) / 2.0;\n }\n p.x = p.x - clamp(p.x, -2.0 * r, 0.0);\n return -length(p) * sign(p.y);\n}\n\nfn sdCross(p: vec2<f32>, r: f32, thickness: f32) -> f32 {\n let d = abs(p);\n let s1 = sdBox(d, vec2<f32>(r, thickness));\n let s2 = sdBox(d, vec2<f32>(thickness, r));\n return min(s1, s2);\n}\n\nfn sdX(p: vec2<f32>, r: f32, thickness: f32) -> f32 {\n let c = cos(0.785398);\n let s = sin(0.785398);\n let m = mat2x2<f32>(c, -s, s, c);\n return sdCross(m * p, r, thickness);\n}\n\nfn sdStar(p_in: vec2<f32>, r: f32, rf: f32) -> f32 {\n let k1 = vec2<f32>(0.80901699, -0.58778525);\n let k2 = vec2<f32>(-k1.x, k1.y);\n var p = p_in;\n p.x = abs(p.x);\n p = p - 2.0 * max(dot(k1, p), 0.0) * k1;\n p = p - 2.0 * max(dot(k2, p), 0.0) * k2;\n p.x = abs(p.x);\n p.y = p.y - r;\n let ba = rf * vec2<f32>(-k1.y, k1.x) - vec2<f32>(0.0, 1.0);\n let h = clamp(dot(p, ba) / dot(ba, ba), 0.0, r);\n return length(p - ba * h) * sign(p.y * ba.x - p.x * ba.y);\n}\n\n@fragment\nfn fs_main(in: VSOutput) -> @location(0) vec4<f32> {\n // Note: WebGPU doesn't have gl_PointCoord directly\n // Points in WebGPU require rendering quads instead\n // This shader needs instanced rendering with quads for proper point rendering\n // For now, return the color directly\n return uniforms.color;\n}\n";
8
+ export declare const POINT_QUAD_SHADER_WGSL = "\n// Uniform buffer for transforms, color, point properties\nstruct Uniforms {\n scale: vec2<f32>,\n translate: vec2<f32>,\n color: vec4<f32>,\n pointSize: f32,\n symbol: i32,\n viewport: vec2<f32>, // viewport dimensions for proper sizing\n};\n\n@group(0) @binding(0)\nvar<uniform> uniforms: Uniforms;\n\nstruct VSInput {\n @location(0) position: vec2<f32>, // point center position\n @location(1) quadOffset: vec2<f32>, // quad vertex offset (-1 to 1)\n};\n\nstruct VSOutput {\n @builtin(position) pos: vec4<f32>,\n @location(0) uv: vec2<f32>, // -0.5 to 0.5 for SDF\n};\n\n@vertex\nfn vs_main(in: VSInput) -> VSOutput {\n var out: VSOutput;\n \n // Transform point position to NDC\n let transformed = in.position * uniforms.scale + uniforms.translate;\n \n // Calculate point size in NDC\n let pointSizeNDC = vec2<f32>(\n uniforms.pointSize / uniforms.viewport.x * 2.0,\n uniforms.pointSize / uniforms.viewport.y * 2.0\n );\n \n // Apply quad offset\n let offset = in.quadOffset * pointSizeNDC * 0.5;\n \n out.pos = vec4<f32>(transformed + offset, 0.0, 1.0);\n out.uv = in.quadOffset * 0.5; // -0.5 to 0.5\n \n return out;\n}\n\n// SDF functions\nfn sdCircle(p: vec2<f32>, r: f32) -> f32 {\n return length(p) - r;\n}\n\nfn sdBox(p: vec2<f32>, b: vec2<f32>) -> f32 {\n let d = abs(p) - b;\n return length(max(d, vec2<f32>(0.0))) + min(max(d.x, d.y), 0.0);\n}\n\nfn sdDiamond(p: vec2<f32>, r: f32) -> f32 {\n return (abs(p.x) + abs(p.y)) - r;\n}\n\nfn sdTriangle(p_in: vec2<f32>, r: f32) -> f32 {\n let k = sqrt(3.0);\n var p = p_in;\n p.x = abs(p.x) - r;\n p.y = p.y + r / k;\n if (p.x + k * p.y > 0.0) {\n p = vec2<f32>(p.x - k * p.y, -k * p.x - p.y) / 2.0;\n }\n p.x = p.x - clamp(p.x, -2.0 * r, 0.0);\n return -length(p) * sign(p.y);\n}\n\nfn sdCross(p: vec2<f32>, r: f32, thickness: f32) -> f32 {\n let d = abs(p);\n let s1 = sdBox(d, vec2<f32>(r, thickness));\n let s2 = sdBox(d, vec2<f32>(thickness, r));\n return min(s1, s2);\n}\n\nfn sdX(p: vec2<f32>, r: f32, thickness: f32) -> f32 {\n let c = cos(0.785398);\n let s = sin(0.785398);\n let m = mat2x2<f32>(c, -s, s, c);\n return sdCross(m * p, r, thickness);\n}\n\nfn sdStar(p_in: vec2<f32>, r: f32, rf: f32) -> f32 {\n let k1 = vec2<f32>(0.80901699, -0.58778525);\n let k2 = vec2<f32>(-k1.x, k1.y);\n var p = p_in;\n p.x = abs(p.x);\n p = p - 2.0 * max(dot(k1, p), 0.0) * k1;\n p = p - 2.0 * max(dot(k2, p), 0.0) * k2;\n p.x = abs(p.x);\n p.y = p.y - r;\n let ba = rf * vec2<f32>(-k1.y, k1.x) - vec2<f32>(0.0, 1.0);\n let h = clamp(dot(p, ba) / dot(ba, ba), 0.0, r);\n return length(p - ba * h) * sign(p.y * ba.x - p.x * ba.y);\n}\n\n@fragment\nfn fs_main(in: VSOutput) -> @location(0) vec4<f32> {\n var d: f32 = 0.0;\n \n if (uniforms.symbol == 0) {\n d = sdCircle(in.uv, 0.45);\n } else if (uniforms.symbol == 1) {\n d = sdBox(in.uv, vec2<f32>(0.35));\n } else if (uniforms.symbol == 2) {\n d = sdDiamond(in.uv, 0.45);\n } else if (uniforms.symbol == 3) {\n d = sdTriangle(vec2<f32>(in.uv.x, in.uv.y + 0.1), 0.4);\n } else if (uniforms.symbol == 4) {\n d = sdTriangle(vec2<f32>(in.uv.x, -in.uv.y + 0.1), 0.4);\n } else if (uniforms.symbol == 5) {\n d = sdCross(in.uv, 0.45, 0.15);\n } else if (uniforms.symbol == 6) {\n d = sdX(in.uv, 0.45, 0.15);\n } else if (uniforms.symbol == 7) {\n d = sdStar(in.uv, 0.45, 0.4);\n }\n \n if (d > 0.02) {\n discard;\n }\n \n let alpha = 1.0 - smoothstep(0.0, 0.02, d);\n return vec4<f32>(uniforms.color.rgb, uniforms.color.a * alpha);\n}\n";
9
+ export declare const POINT_VERTEX_STRIDE: number;
@@ -0,0 +1,74 @@
1
+ /**
2
+ * GPU Benchmark Utilities
3
+ *
4
+ * Provides tools for measuring rendering performance across backends.
5
+ */
6
+ export interface BenchmarkResult {
7
+ backend: "webgpu" | "webgl" | "unknown";
8
+ pointCount: number;
9
+ fps: number;
10
+ avgFrameTime: number;
11
+ minFrameTime: number;
12
+ maxFrameTime: number;
13
+ totalFrames: number;
14
+ duration: number;
15
+ }
16
+ export interface BenchmarkOptions {
17
+ /** Number of points to render */
18
+ pointCount?: number;
19
+ /** Duration of benchmark in milliseconds */
20
+ durationMs?: number;
21
+ /** Warm-up frames before measuring */
22
+ warmupFrames?: number;
23
+ /** Callback for progress updates */
24
+ onProgress?: (progress: number) => void;
25
+ }
26
+ /**
27
+ * Benchmark runner for GPU backends
28
+ */
29
+ export declare class GpuBenchmark {
30
+ private canvas;
31
+ private results;
32
+ constructor(canvas?: HTMLCanvasElement);
33
+ /**
34
+ * Generate random line data
35
+ */
36
+ private generateLineData;
37
+ /**
38
+ * Measure frame times
39
+ */
40
+ private measureFrameTimes;
41
+ /**
42
+ * Run benchmark with WebGPU backend
43
+ */
44
+ benchmarkWebGPU(options?: BenchmarkOptions): Promise<BenchmarkResult | null>;
45
+ /**
46
+ * Run benchmark with WebGL backend
47
+ */
48
+ benchmarkWebGL(options?: BenchmarkOptions): Promise<BenchmarkResult | null>;
49
+ /**
50
+ * Calculate benchmark result from frame times
51
+ */
52
+ private calculateResult;
53
+ /**
54
+ * Run comparative benchmark
55
+ */
56
+ runComparison(options?: BenchmarkOptions): Promise<{
57
+ webgpu: BenchmarkResult | null;
58
+ webgl: BenchmarkResult | null;
59
+ winner: "webgpu" | "webgl" | "tie" | "unknown";
60
+ speedup: number;
61
+ }>;
62
+ /**
63
+ * Get all results
64
+ */
65
+ getResults(): BenchmarkResult[];
66
+ /**
67
+ * Clear results
68
+ */
69
+ clearResults(): void;
70
+ /**
71
+ * Format result as string
72
+ */
73
+ static formatResult(result: BenchmarkResult): string;
74
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Benchmark Index
3
+ */
4
+ export { GpuBenchmark } from './benchmark';
5
+ export type { BenchmarkResult, BenchmarkOptions } from './benchmark';
@@ -0,0 +1,72 @@
1
+ /**
2
+ * GPU Compute Engine
3
+ *
4
+ * Provides GPU-accelerated data analysis using WebGPU compute shaders.
5
+ * Includes statistics calculation, bounds computation, downsampling, and peak detection.
6
+ */
7
+ export interface DataStats {
8
+ min: number;
9
+ max: number;
10
+ mean: number;
11
+ std: number;
12
+ count: number;
13
+ }
14
+ export interface DataBounds {
15
+ xMin: number;
16
+ xMax: number;
17
+ yMin: number;
18
+ yMax: number;
19
+ }
20
+ export interface Peak {
21
+ index: number;
22
+ value: number;
23
+ }
24
+ export interface GpuComputeOptions {
25
+ /** WebGPU device (if already available) */
26
+ device?: any;
27
+ }
28
+ /**
29
+ * GPU Compute Engine for data analysis
30
+ */
31
+ export declare class GpuCompute {
32
+ private options;
33
+ private device;
34
+ private statsPipeline;
35
+ private minmaxPipeline;
36
+ private downsamplePipeline;
37
+ private peaksPipeline;
38
+ private isInitialized;
39
+ constructor(options?: GpuComputeOptions);
40
+ /**
41
+ * Check if GPU compute is available
42
+ */
43
+ static isSupported(): boolean;
44
+ /**
45
+ * Initialize the compute engine
46
+ */
47
+ init(): Promise<void>;
48
+ private createPipelines;
49
+ /**
50
+ * Calculate statistics for a 1D array of values
51
+ */
52
+ calculateStats(data: Float32Array): Promise<DataStats>;
53
+ /**
54
+ * Calculate bounds for 2D point data
55
+ */
56
+ calculateBounds(points: Float32Array): Promise<DataBounds>;
57
+ /**
58
+ * Downsample point data using min-max algorithm
59
+ */
60
+ downsample(points: Float32Array, targetCount: number): Promise<Float32Array>;
61
+ /**
62
+ * Detect peaks in 1D data
63
+ */
64
+ detectPeaks(data: Float32Array, options?: {
65
+ threshold?: number;
66
+ minDistance?: number;
67
+ }): Promise<Peak[]>;
68
+ /**
69
+ * Cleanup resources
70
+ */
71
+ destroy(): void;
72
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * GPU Compute Index
3
+ */
4
+ export { GpuCompute } from './gpuCompute';
5
+ export type { DataStats, DataBounds, Peak, GpuComputeOptions, } from './gpuCompute';
6
+ export { STATS_COMPUTE_WGSL, MINMAX_COMPUTE_WGSL, DOWNSAMPLE_COMPUTE_WGSL, PEAK_DETECT_COMPUTE_WGSL, } from './shaders';
@@ -0,0 +1,9 @@
1
+ /**
2
+ * GPU Compute - Compute shader infrastructure for WebGPU
3
+ *
4
+ * Provides GPU-accelerated data analysis capabilities.
5
+ */
6
+ export declare const STATS_COMPUTE_WGSL = "\nstruct StatsResult {\n min_val: f32,\n max_val: f32,\n sum: f32,\n sum_sq: f32,\n count: u32,\n padding: vec3<u32>,\n}\n\n@group(0) @binding(0) var<storage, read> input_data: array<f32>;\n@group(0) @binding(1) var<storage, read_write> result: StatsResult;\n\nvar<workgroup> local_min: array<f32, 256>;\nvar<workgroup> local_max: array<f32, 256>;\nvar<workgroup> local_sum: array<f32, 256>;\nvar<workgroup> local_sum_sq: array<f32, 256>;\nvar<workgroup> local_count: array<u32, 256>;\n\n@compute @workgroup_size(256)\nfn main(\n @builtin(global_invocation_id) global_id: vec3<u32>,\n @builtin(local_invocation_id) local_id: vec3<u32>,\n @builtin(workgroup_id) workgroup_id: vec3<u32>\n) {\n let idx = global_id.x;\n let lid = local_id.x;\n let data_len = arrayLength(&input_data);\n \n // Initialize local values\n if (idx < data_len) {\n let val = input_data[idx];\n local_min[lid] = val;\n local_max[lid] = val;\n local_sum[lid] = val;\n local_sum_sq[lid] = val * val;\n local_count[lid] = 1u;\n } else {\n local_min[lid] = 3.402823e+38; // f32 max\n local_max[lid] = -3.402823e+38; // f32 min\n local_sum[lid] = 0.0;\n local_sum_sq[lid] = 0.0;\n local_count[lid] = 0u;\n }\n \n workgroupBarrier();\n \n // Parallel reduction\n for (var stride: u32 = 128u; stride > 0u; stride = stride >> 1u) {\n if (lid < stride) {\n local_min[lid] = min(local_min[lid], local_min[lid + stride]);\n local_max[lid] = max(local_max[lid], local_max[lid + stride]);\n local_sum[lid] = local_sum[lid] + local_sum[lid + stride];\n local_sum_sq[lid] = local_sum_sq[lid] + local_sum_sq[lid + stride];\n local_count[lid] = local_count[lid] + local_count[lid + stride];\n }\n workgroupBarrier();\n }\n \n // First thread writes result (atomic for multi-workgroup)\n if (lid == 0u) {\n // Use atomics for multi-workgroup reduction\n // For now, we assume single workgroup or post-process on CPU\n result.min_val = local_min[0];\n result.max_val = local_max[0];\n result.sum = local_sum[0];\n result.sum_sq = local_sum_sq[0];\n result.count = local_count[0];\n }\n}\n";
7
+ export declare const MINMAX_COMPUTE_WGSL = "\nstruct MinMax {\n min_x: f32,\n max_x: f32,\n min_y: f32,\n max_y: f32,\n}\n\n@group(0) @binding(0) var<storage, read> points: array<vec2<f32>>;\n@group(0) @binding(1) var<storage, read_write> result: MinMax;\n\nvar<workgroup> local_min_x: array<f32, 256>;\nvar<workgroup> local_max_x: array<f32, 256>;\nvar<workgroup> local_min_y: array<f32, 256>;\nvar<workgroup> local_max_y: array<f32, 256>;\n\n@compute @workgroup_size(256)\nfn main(\n @builtin(global_invocation_id) global_id: vec3<u32>,\n @builtin(local_invocation_id) local_id: vec3<u32>\n) {\n let idx = global_id.x;\n let lid = local_id.x;\n let data_len = arrayLength(&points);\n \n if (idx < data_len) {\n let pt = points[idx];\n local_min_x[lid] = pt.x;\n local_max_x[lid] = pt.x;\n local_min_y[lid] = pt.y;\n local_max_y[lid] = pt.y;\n } else {\n local_min_x[lid] = 3.402823e+38;\n local_max_x[lid] = -3.402823e+38;\n local_min_y[lid] = 3.402823e+38;\n local_max_y[lid] = -3.402823e+38;\n }\n \n workgroupBarrier();\n \n for (var stride: u32 = 128u; stride > 0u; stride = stride >> 1u) {\n if (lid < stride) {\n local_min_x[lid] = min(local_min_x[lid], local_min_x[lid + stride]);\n local_max_x[lid] = max(local_max_x[lid], local_max_x[lid + stride]);\n local_min_y[lid] = min(local_min_y[lid], local_min_y[lid + stride]);\n local_max_y[lid] = max(local_max_y[lid], local_max_y[lid + stride]);\n }\n workgroupBarrier();\n }\n \n if (lid == 0u) {\n result.min_x = local_min_x[0];\n result.max_x = local_max_x[0];\n result.min_y = local_min_y[0];\n result.max_y = local_max_y[0];\n }\n}\n";
8
+ export declare const DOWNSAMPLE_COMPUTE_WGSL = "\nstruct Params {\n input_count: u32,\n output_count: u32,\n bucket_size: u32,\n padding: u32,\n}\n\n@group(0) @binding(0) var<uniform> params: Params;\n@group(0) @binding(1) var<storage, read> input_points: array<vec2<f32>>;\n@group(0) @binding(2) var<storage, read_write> output_points: array<vec2<f32>>;\n\n@compute @workgroup_size(64)\nfn main(@builtin(global_invocation_id) global_id: vec3<u32>) {\n let bucket_idx = global_id.x;\n \n if (bucket_idx >= params.output_count / 2u) {\n return;\n }\n \n let start = bucket_idx * params.bucket_size;\n let end = min(start + params.bucket_size, params.input_count);\n \n if (start >= params.input_count) {\n return;\n }\n \n var min_y = input_points[start].y;\n var max_y = input_points[start].y;\n var min_idx = start;\n var max_idx = start;\n \n for (var i = start; i < end; i = i + 1u) {\n let y = input_points[i].y;\n if (y < min_y) {\n min_y = y;\n min_idx = i;\n }\n if (y > max_y) {\n max_y = y;\n max_idx = i;\n }\n }\n \n // Output min and max points (preserving x,y pairs)\n let out_base = bucket_idx * 2u;\n \n // Ensure min comes before max in x order\n if (min_idx <= max_idx) {\n output_points[out_base] = input_points[min_idx];\n output_points[out_base + 1u] = input_points[max_idx];\n } else {\n output_points[out_base] = input_points[max_idx];\n output_points[out_base + 1u] = input_points[min_idx];\n }\n}\n";
9
+ export declare const PEAK_DETECT_COMPUTE_WGSL = "\nstruct Params {\n data_count: u32,\n threshold: f32,\n min_distance: u32,\n padding: u32,\n}\n\nstruct Peak {\n index: u32,\n value: f32,\n is_peak: u32,\n padding: u32,\n}\n\n@group(0) @binding(0) var<uniform> params: Params;\n@group(0) @binding(1) var<storage, read> data: array<f32>;\n@group(0) @binding(2) var<storage, read_write> peaks: array<Peak>;\n\n@compute @workgroup_size(64)\nfn main(@builtin(global_invocation_id) global_id: vec3<u32>) {\n let idx = global_id.x;\n \n if (idx >= params.data_count) {\n return;\n }\n \n peaks[idx].index = idx;\n peaks[idx].value = data[idx];\n peaks[idx].is_peak = 0u;\n \n // Skip edges\n if (idx < params.min_distance || idx >= params.data_count - params.min_distance) {\n return;\n }\n \n let val = data[idx];\n \n // Check if above threshold\n if (val < params.threshold) {\n return;\n }\n \n // Check if local maximum\n var is_max = true;\n for (var i = 1u; i <= params.min_distance; i = i + 1u) {\n if (data[idx - i] >= val || data[idx + i] >= val) {\n is_max = false;\n break;\n }\n }\n \n if (is_max) {\n peaks[idx].is_peak = 1u;\n }\n}\n";
@@ -0,0 +1,77 @@
1
+ import { BufferId, TextureId, RGBA } from './types';
2
+
3
+ /**
4
+ * Draw kinds matching the original NativeWebGLRenderer series types
5
+ */
6
+ export type DrawKind = "triangles" | "line" | "points" | "scatter" | "line+scatter" | "step" | "step+scatter" | "band" | "bar" | "heatmap";
7
+ /**
8
+ * Common style properties for all draw calls
9
+ */
10
+ export interface CommonStyle {
11
+ color?: RGBA;
12
+ opacity?: number;
13
+ }
14
+ /**
15
+ * Style for line-type series
16
+ */
17
+ export interface LineStyle extends CommonStyle {
18
+ lineWidth?: number;
19
+ }
20
+ /**
21
+ * Point symbol types matching the original implementation
22
+ */
23
+ export type PointSymbol = "circle" | "square" | "diamond" | "triangle" | "triangleDown" | "cross" | "x" | "star";
24
+ /**
25
+ * Style for point/scatter-type series
26
+ */
27
+ export interface PointStyle extends CommonStyle {
28
+ pointSize?: number;
29
+ symbol?: PointSymbol;
30
+ }
31
+ /**
32
+ * Style for heatmap-type series
33
+ */
34
+ export interface HeatmapStyle {
35
+ zBounds?: {
36
+ min: number;
37
+ max: number;
38
+ };
39
+ colormap?: string;
40
+ }
41
+ /**
42
+ * Combined style type
43
+ */
44
+ export type DrawStyle = CommonStyle | LineStyle | PointStyle | HeatmapStyle;
45
+ /**
46
+ * A single draw call in the draw list
47
+ */
48
+ export interface DrawCall {
49
+ /** Unique identifier for this draw call */
50
+ id: string;
51
+ /** Type of primitive to draw */
52
+ kind: DrawKind;
53
+ /** Reference to the vertex buffer */
54
+ bufferId: BufferId;
55
+ /** Number of vertices/instances to draw */
56
+ count: number;
57
+ /** Whether this draw call should be rendered */
58
+ visible: boolean;
59
+ /** Styling properties */
60
+ style?: DrawStyle;
61
+ /** Reference to texture (for heatmaps) */
62
+ textureId?: TextureId;
63
+ /** Step buffer for step charts */
64
+ stepBufferId?: BufferId;
65
+ stepCount?: number;
66
+ /** Optional Y-bounds override for multi-axis support */
67
+ yBounds?: {
68
+ min: number;
69
+ max: number;
70
+ };
71
+ }
72
+ /**
73
+ * The draw list contains all draw calls for a frame
74
+ */
75
+ export interface DrawList {
76
+ items: DrawCall[];
77
+ }
@@ -0,0 +1,20 @@
1
+ export interface GpuDemo {
2
+ name: string;
3
+ description: string;
4
+ init: (canvas: HTMLCanvasElement) => Promise<{
5
+ render: () => void;
6
+ destroy: () => void;
7
+ }>;
8
+ }
9
+ /**
10
+ * 1M Line Demo
11
+ */
12
+ export declare const LinePerformanceDemo: GpuDemo;
13
+ /**
14
+ * Instanced Scatter Demo
15
+ */
16
+ export declare const ScatterInstancedDemo: GpuDemo;
17
+ /**
18
+ * Dynamic Heatmap Demo
19
+ */
20
+ export declare const DynamicHeatmapDemo: GpuDemo;
@@ -0,0 +1,3 @@
1
+ export * from './gallery';
2
+ export * from './webgpu-line-demo';
3
+ export * from './webgpu-triangle';
@@ -0,0 +1,8 @@
1
+ /**
2
+ * WebGPU Line Demo - Demonstrates line rendering with the GPU abstraction layer
3
+ */
4
+ export declare function runWebGPULineDemo(container: HTMLElement): Promise<() => void>;
5
+ /**
6
+ * WebGPU Chart Demo - Demonstrates multiple series types
7
+ */
8
+ export declare function runWebGPUChartDemo(container: HTMLElement): Promise<() => void>;
@@ -0,0 +1 @@
1
+ export declare function runWebGPUTriangleDemo(container: HTMLElement): Promise<() => void>;
@@ -0,0 +1,25 @@
1
+ import { GpuViewport, RGBA } from './types';
2
+
3
+ /**
4
+ * Frame uniforms passed to each render call
5
+ */
6
+ export interface FrameUniforms {
7
+ /** Viewport dimensions */
8
+ viewport: GpuViewport;
9
+ /** Background/clear color */
10
+ clearColor: RGBA;
11
+ /** Optional bounds for coordinate transforms */
12
+ bounds?: {
13
+ xMin: number;
14
+ xMax: number;
15
+ yMin: number;
16
+ yMax: number;
17
+ };
18
+ /** Optional plot area for clipping */
19
+ plotArea?: {
20
+ x: number;
21
+ y: number;
22
+ width: number;
23
+ height: number;
24
+ };
25
+ }
@@ -0,0 +1,24 @@
1
+ /**
2
+ * GPU Abstraction Layer - Backend-agnostic GPU API
3
+ *
4
+ * This module provides a unified interface for GPU rendering
5
+ * that can work with WebGPU (primary) or WebGL (fallback).
6
+ */
7
+ export type { GpuBackendType, RGBA, GpuViewport, GpuLimits, GpuBackendInfo, BufferId, TextureId, BufferUsage, BufferDescriptor, TextureFormat, Texture1DDescriptor, Dispose, GpuBackend, } from './types';
8
+ export type { FrameUniforms } from './frame';
9
+ export type { DrawKind, CommonStyle, LineStyle, PointStyle, PointSymbol, HeatmapStyle, DrawStyle, DrawCall, DrawList, } from './drawList';
10
+ export type { BufferEntry, IBufferStore, TextureEntry, ITextureStore, PipelineKind, PipelineKey, IPipelineCache, } from './resources';
11
+ export { BaseBufferStore, BaseTextureStore, PipelineCache } from './resources';
12
+ export { SeriesAdapter, parseColorToRGBA, GpuRenderer, createGpuRenderer, } from './adapter';
13
+ export type { SeriesData, SeriesStyle, Bounds, GpuSeriesRenderData, GpuRenderOptions, BackendPreference, GpuRendererOptions, } from './adapter';
14
+ export { WebGPUBackend } from './backends/webgpu/WebGPUBackend';
15
+ export type { WebGPUBackendOptions } from './backends/webgpu/WebGPUBackend';
16
+ export { WebGLBackend } from './backends/webgl/WebGLBackend';
17
+ export type { WebGLBackendOptions } from './backends/webgl/WebGLBackend';
18
+ export { runWebGPUTriangleDemo, runWebGPULineDemo, runWebGPUChartDemo, } from './examples';
19
+ export { GpuBenchmark } from './benchmark';
20
+ export type { BenchmarkResult, BenchmarkOptions } from './benchmark';
21
+ export { GpuCompute } from './compute';
22
+ export type { DataStats, DataBounds, Peak, GpuComputeOptions, } from './compute';
23
+ export { MassiveDataRenderer } from './backends/webgpu/MassiveDataRenderer';
24
+ export type { MassiveDataConfig, RenderStats, LODLevel, } from './backends/webgpu/MassiveDataRenderer';
@@ -0,0 +1,40 @@
1
+ import { BufferId, BufferUsage } from '../types';
2
+
3
+ export interface BufferEntry {
4
+ id: BufferId;
5
+ usage: BufferUsage;
6
+ byteLength: number;
7
+ lastUpdated: number;
8
+ }
9
+ export interface IBufferStore {
10
+ /** Create or update a buffer with new data */
11
+ createOrUpdate(id: BufferId, data: ArrayBufferView, usage?: BufferUsage): void;
12
+ /** Partially update a buffer at an offset */
13
+ partialUpdate(id: BufferId, data: ArrayBufferView, offsetBytes: number): boolean;
14
+ /** Get buffer metadata */
15
+ getInfo(id: BufferId): BufferEntry | undefined;
16
+ /** Check if buffer exists */
17
+ has(id: BufferId): boolean;
18
+ /** Delete a buffer */
19
+ delete(id: BufferId): void;
20
+ /** Get all buffer IDs */
21
+ keys(): IterableIterator<BufferId>;
22
+ /** Get buffer count */
23
+ readonly size: number;
24
+ /** Cleanup all buffers */
25
+ destroy(): void;
26
+ }
27
+ /**
28
+ * Abstract base class for buffer stores
29
+ */
30
+ export declare abstract class BaseBufferStore implements IBufferStore {
31
+ protected entries: Map<string, BufferEntry>;
32
+ abstract createOrUpdate(id: BufferId, data: ArrayBufferView, usage?: BufferUsage): void;
33
+ abstract partialUpdate(id: BufferId, data: ArrayBufferView, offsetBytes: number): boolean;
34
+ abstract delete(id: BufferId): void;
35
+ abstract destroy(): void;
36
+ getInfo(id: BufferId): BufferEntry | undefined;
37
+ has(id: BufferId): boolean;
38
+ keys(): IterableIterator<BufferId>;
39
+ get size(): number;
40
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Resources Index - Export all resource management utilities
3
+ */
4
+ export type { BufferEntry, IBufferStore } from './bufferStore';
5
+ export { BaseBufferStore } from './bufferStore';
6
+ export type { TextureEntry, ITextureStore } from './textureStore';
7
+ export { BaseTextureStore } from './textureStore';
8
+ export type { PipelineKind, PipelineKey, IPipelineCache } from './pipelineCache';
9
+ export { PipelineCache } from './pipelineCache';
@@ -0,0 +1,33 @@
1
+ /**
2
+ * PipelineCache - Manages GPU pipeline lifecycle
3
+ *
4
+ * Caches compiled pipelines to avoid recompilation overhead.
5
+ */
6
+ export type PipelineKind = "triangle" | "line" | "point" | "band" | "heatmap";
7
+ export interface PipelineKey {
8
+ kind: PipelineKind;
9
+ variant?: string;
10
+ }
11
+ export interface IPipelineCache {
12
+ /** Get or create a pipeline */
13
+ getOrCreate<T>(key: PipelineKey, factory: () => T): T;
14
+ /** Check if pipeline exists */
15
+ has(key: PipelineKey): boolean;
16
+ /** Delete a pipeline */
17
+ delete(key: PipelineKey): void;
18
+ /** Get pipeline count */
19
+ readonly size: number;
20
+ /** Cleanup all pipelines */
21
+ destroy(): void;
22
+ }
23
+ /**
24
+ * Generic pipeline cache implementation
25
+ */
26
+ export declare class PipelineCache implements IPipelineCache {
27
+ private pipelines;
28
+ getOrCreate<T>(key: PipelineKey, factory: () => T): T;
29
+ has(key: PipelineKey): boolean;
30
+ delete(key: PipelineKey): void;
31
+ get size(): number;
32
+ destroy(): void;
33
+ }
@@ -0,0 +1,41 @@
1
+ import { TextureId, TextureFormat } from '../types';
2
+
3
+ export interface TextureEntry {
4
+ id: TextureId;
5
+ format: TextureFormat;
6
+ width: number;
7
+ height: number;
8
+ lastUpdated: number;
9
+ }
10
+ export interface ITextureStore {
11
+ /** Create or update a 1D texture (for colormaps) */
12
+ createOrUpdate1D(id: TextureId, data: Uint8Array, width?: number): void;
13
+ /** Create or update a 2D texture */
14
+ createOrUpdate2D(id: TextureId, data: Uint8Array, width: number, height: number): void;
15
+ /** Get texture metadata */
16
+ getInfo(id: TextureId): TextureEntry | undefined;
17
+ /** Check if texture exists */
18
+ has(id: TextureId): boolean;
19
+ /** Delete a texture */
20
+ delete(id: TextureId): void;
21
+ /** Get all texture IDs */
22
+ keys(): IterableIterator<TextureId>;
23
+ /** Get texture count */
24
+ readonly size: number;
25
+ /** Cleanup all textures */
26
+ destroy(): void;
27
+ }
28
+ /**
29
+ * Abstract base class for texture stores
30
+ */
31
+ export declare abstract class BaseTextureStore implements ITextureStore {
32
+ protected entries: Map<string, TextureEntry>;
33
+ abstract createOrUpdate1D(id: TextureId, data: Uint8Array, width?: number): void;
34
+ abstract createOrUpdate2D(id: TextureId, data: Uint8Array, width: number, height: number): void;
35
+ abstract delete(id: TextureId): void;
36
+ abstract destroy(): void;
37
+ getInfo(id: TextureId): TextureEntry | undefined;
38
+ has(id: TextureId): boolean;
39
+ keys(): IterableIterator<TextureId>;
40
+ get size(): number;
41
+ }
@@ -0,0 +1,47 @@
1
+ import { DrawList } from './drawList';
2
+ import { FrameUniforms } from './frame';
3
+
4
+ export type GpuBackendType = "webgpu" | "webgl";
5
+ export type RGBA = readonly [number, number, number, number];
6
+ export interface GpuViewport {
7
+ width: number;
8
+ height: number;
9
+ dpr: number;
10
+ }
11
+ export interface GpuLimits {
12
+ maxTextureDimension2D?: number;
13
+ maxBufferSize?: number;
14
+ [key: string]: unknown;
15
+ }
16
+ export interface GpuBackendInfo {
17
+ type: GpuBackendType;
18
+ available: boolean;
19
+ limits?: GpuLimits;
20
+ }
21
+ export type BufferId = string;
22
+ export type TextureId = string;
23
+ export type BufferUsage = "vertex" | "index" | "uniform";
24
+ export interface BufferDescriptor {
25
+ id: BufferId;
26
+ usage: BufferUsage;
27
+ byteStride?: number;
28
+ }
29
+ export type TextureFormat = "rgba8unorm" | "bgra8unorm";
30
+ export interface Texture1DDescriptor {
31
+ id: TextureId;
32
+ format: TextureFormat;
33
+ width: number;
34
+ }
35
+ export interface Dispose {
36
+ destroy(): void;
37
+ }
38
+ export interface GpuBackend extends Dispose {
39
+ readonly info: GpuBackendInfo;
40
+ init(): Promise<void>;
41
+ setViewport(viewport: GpuViewport): void;
42
+ createOrUpdateBuffer(id: BufferId, data: ArrayBufferView, desc?: Partial<BufferDescriptor>): void;
43
+ deleteBuffer(id: BufferId): void;
44
+ createOrUpdateTexture1D(id: TextureId, data: Uint8Array, desc?: Partial<Texture1DDescriptor>): void;
45
+ deleteTexture(id: TextureId): void;
46
+ render(drawList: DrawList, frame: FrameUniforms): void;
47
+ }