@chartgpu/chartgpu 0.2.6 → 0.2.8

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 (59) hide show
  1. package/README.md +9 -0
  2. package/dist/ChartGPU.d.ts +54 -2
  3. package/dist/ChartGPU.d.ts.map +1 -1
  4. package/dist/components/createTextOverlay.d.ts +8 -1
  5. package/dist/components/createTextOverlay.d.ts.map +1 -1
  6. package/dist/config/OptionResolver.d.ts +20 -1
  7. package/dist/config/OptionResolver.d.ts.map +1 -1
  8. package/dist/config/defaults.d.ts +15 -0
  9. package/dist/config/defaults.d.ts.map +1 -1
  10. package/dist/config/types.d.ts +73 -0
  11. package/dist/config/types.d.ts.map +1 -1
  12. package/dist/core/PipelineCache.d.ts +58 -0
  13. package/dist/core/PipelineCache.d.ts.map +1 -0
  14. package/dist/core/createPipelineCache.d.ts +23 -0
  15. package/dist/core/createPipelineCache.d.ts.map +1 -0
  16. package/dist/core/createRenderCoordinator.d.ts +6 -0
  17. package/dist/core/createRenderCoordinator.d.ts.map +1 -1
  18. package/dist/core/renderCoordinator/annotations/processAnnotations.d.ts.map +1 -1
  19. package/dist/core/renderCoordinator/gpu/textureManager.d.ts +22 -4
  20. package/dist/core/renderCoordinator/gpu/textureManager.d.ts.map +1 -1
  21. package/dist/core/renderCoordinator/render/renderAnnotationLabels.d.ts.map +1 -1
  22. package/dist/core/renderCoordinator/render/renderOverlays.d.ts.map +1 -1
  23. package/dist/core/renderCoordinator/render/renderSeries.d.ts +7 -7
  24. package/dist/core/renderCoordinator/render/renderSeries.d.ts.map +1 -1
  25. package/dist/core/renderCoordinator/renderers/rendererPool.d.ts +9 -0
  26. package/dist/core/renderCoordinator/renderers/rendererPool.d.ts.map +1 -1
  27. package/dist/index.d.ts +4 -2
  28. package/dist/index.d.ts.map +1 -1
  29. package/dist/index.js +6011 -5397
  30. package/dist/index.js.map +1 -1
  31. package/dist/renderers/createAnnotationMarkerRenderer.d.ts +5 -0
  32. package/dist/renderers/createAnnotationMarkerRenderer.d.ts.map +1 -1
  33. package/dist/renderers/createAreaRenderer.d.ts +12 -0
  34. package/dist/renderers/createAreaRenderer.d.ts.map +1 -1
  35. package/dist/renderers/createAxisRenderer.d.ts +12 -0
  36. package/dist/renderers/createAxisRenderer.d.ts.map +1 -1
  37. package/dist/renderers/createBarRenderer.d.ts +12 -0
  38. package/dist/renderers/createBarRenderer.d.ts.map +1 -1
  39. package/dist/renderers/createCandlestickRenderer.d.ts +12 -0
  40. package/dist/renderers/createCandlestickRenderer.d.ts.map +1 -1
  41. package/dist/renderers/createCrosshairRenderer.d.ts +12 -0
  42. package/dist/renderers/createCrosshairRenderer.d.ts.map +1 -1
  43. package/dist/renderers/createGridRenderer.d.ts +21 -0
  44. package/dist/renderers/createGridRenderer.d.ts.map +1 -1
  45. package/dist/renderers/createHighlightRenderer.d.ts +12 -0
  46. package/dist/renderers/createHighlightRenderer.d.ts.map +1 -1
  47. package/dist/renderers/createLineRenderer.d.ts +14 -1
  48. package/dist/renderers/createLineRenderer.d.ts.map +1 -1
  49. package/dist/renderers/createPieRenderer.d.ts +12 -0
  50. package/dist/renderers/createPieRenderer.d.ts.map +1 -1
  51. package/dist/renderers/createReferenceLineRenderer.d.ts +5 -0
  52. package/dist/renderers/createReferenceLineRenderer.d.ts.map +1 -1
  53. package/dist/renderers/createScatterDensityRenderer.d.ts +12 -0
  54. package/dist/renderers/createScatterDensityRenderer.d.ts.map +1 -1
  55. package/dist/renderers/createScatterRenderer.d.ts +12 -0
  56. package/dist/renderers/createScatterRenderer.d.ts.map +1 -1
  57. package/dist/renderers/rendererUtils.d.ts +10 -2
  58. package/dist/renderers/rendererUtils.d.ts.map +1 -1
  59. package/package.json +1 -1
@@ -1,3 +1,4 @@
1
+ import type { PipelineCache } from '../core/PipelineCache';
1
2
  export type AnnotationMarkerInstance = Readonly<{
2
3
  /**
3
4
  * Center in CANVAS-LOCAL CSS pixels.
@@ -53,6 +54,10 @@ export interface AnnotationMarkerRendererOptions {
53
54
  * Defaults to 1 (no MSAA).
54
55
  */
55
56
  readonly sampleCount?: number;
57
+ /**
58
+ * Optional shared cache for shader modules + render pipelines.
59
+ */
60
+ readonly pipelineCache?: PipelineCache;
56
61
  }
57
62
  export declare function createAnnotationMarkerRenderer(device: GPUDevice, options?: AnnotationMarkerRendererOptions): AnnotationMarkerRenderer;
58
63
  //# sourceMappingURL=createAnnotationMarkerRenderer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createAnnotationMarkerRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/createAnnotationMarkerRenderer.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,wBAAwB,GAAG,QAAQ,CAAC;IAC9C;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IAEf,qCAAqC;IACrC,SAAS,EAAE,MAAM,CAAC;IAElB,gDAAgD;IAChD,QAAQ,EAAE,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;IAEhE,+DAA+D;IAC/D,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,2DAA2D;IAC3D,UAAU,CAAC,EAAE,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;CACpE,CAAC,CAAC;AAEH,MAAM,WAAW,wBAAwB;IACvC;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,MAAM,EAAE,QAAQ,CAAC;QACvB,WAAW,EAAE,MAAM,CAAC;QACpB,YAAY,EAAE,MAAM,CAAC;QACrB,gBAAgB,EAAE,MAAM,CAAC;QACzB,SAAS,EAAE,SAAS,wBAAwB,EAAE,CAAC;KAChD,CAAC,GAAG,IAAI,CAAC;IAEV,6CAA6C;IAC7C,MAAM,CAAC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AAE,MAAM,CAAC;QACpB,YAAY,EAAE,MAAM,CAAC;QACrB,gBAAgB,EAAE,MAAM,CAAC;QACzB,SAAS,EAAE,SAAS,wBAAwB,EAAE,CAAC;KAChD,CAAC,GAAG,IAAI,CAAC;IAEV,6CAA6C;IAC7C,MAAM,CAAC,WAAW,EAAE,oBAAoB,EAAE,aAAa,CAAC,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhG,6CAA6C;IAC7C,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,+BAA+B;IAC9C;;;;;OAKG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAEzC;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B;;OAEG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,aAAa,CAAC;CACxC;AAiBD,wBAAgB,8BAA8B,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,+BAA+B,GAAG,wBAAwB,CAmNrI"}
@@ -1,6 +1,7 @@
1
1
  import type { ResolvedAreaSeriesConfig } from '../config/OptionResolver';
2
2
  import type { CartesianSeriesData } from '../config/types';
3
3
  import type { LinearScale } from '../utils/scales';
4
+ import type { PipelineCache } from '../core/PipelineCache';
4
5
  export interface AreaRenderer {
5
6
  prepare(seriesConfig: ResolvedAreaSeriesConfig, data: CartesianSeriesData, xScale: LinearScale, yScale: LinearScale, baseline?: number): void;
6
7
  render(passEncoder: GPURenderPassEncoder): void;
@@ -14,6 +15,17 @@ export interface AreaRendererOptions {
14
15
  * Defaults to `'bgra8unorm'` for backward compatibility.
15
16
  */
16
17
  readonly targetFormat?: GPUTextureFormat;
18
+ /**
19
+ * Multisample count for the render pipeline.
20
+ *
21
+ * Must match the render pass color attachment sampleCount.
22
+ * Defaults to 1 (no MSAA).
23
+ */
24
+ readonly sampleCount?: number;
25
+ /**
26
+ * Optional shared cache for shader modules + render pipelines.
27
+ */
28
+ readonly pipelineCache?: PipelineCache;
17
29
  }
18
30
  export declare function createAreaRenderer(device: GPUDevice, options?: AreaRendererOptions): AreaRenderer;
19
31
  //# sourceMappingURL=createAreaRenderer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createAreaRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/createAreaRenderer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAKnD,MAAM,WAAW,YAAY;IAC3B,OAAO,CACL,YAAY,EAAE,wBAAwB,EACtC,IAAI,EAAE,mBAAmB,EACzB,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,WAAW,EACnB,QAAQ,CAAC,EAAE,MAAM,GAChB,IAAI,CAAC;IACR,MAAM,CAAC,WAAW,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAChD,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC;;;;;OAKG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,gBAAgB,CAAC;CAC1C;AAoED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,YAAY,CA0KjG"}
1
+ {"version":3,"file":"createAreaRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/createAreaRenderer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAInD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,MAAM,WAAW,YAAY;IAC3B,OAAO,CACL,YAAY,EAAE,wBAAwB,EACtC,IAAI,EAAE,mBAAmB,EACzB,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,WAAW,EACnB,QAAQ,CAAC,EAAE,MAAM,GAChB,IAAI,CAAC;IACR,MAAM,CAAC,WAAW,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAChD,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC;;;;;OAKG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,gBAAgB,CAAC;IACzC;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B;;OAEG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,aAAa,CAAC;CACxC;AAoED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,YAAY,CAkLjG"}
@@ -1,6 +1,7 @@
1
1
  import type { AxisConfig } from '../config/types';
2
2
  import type { LinearScale } from '../utils/scales';
3
3
  import type { GridArea } from './createGridRenderer';
4
+ import type { PipelineCache } from '../core/PipelineCache';
4
5
  export interface AxisRenderer {
5
6
  prepare(axisConfig: AxisConfig, scale: LinearScale, orientation: 'x' | 'y', gridArea: GridArea, axisLineColor?: string, axisTickColor?: string, tickCount?: number): void;
6
7
  render(passEncoder: GPURenderPassEncoder): void;
@@ -14,6 +15,17 @@ export interface AxisRendererOptions {
14
15
  * Defaults to `'bgra8unorm'` for backward compatibility.
15
16
  */
16
17
  readonly targetFormat?: GPUTextureFormat;
18
+ /**
19
+ * Multisample count for the render pipeline.
20
+ *
21
+ * Must match the render pass color attachment sampleCount.
22
+ * Defaults to 1 (no MSAA).
23
+ */
24
+ readonly sampleCount?: number;
25
+ /**
26
+ * Optional shared cache for shader modules + render pipelines.
27
+ */
28
+ readonly pipelineCache?: PipelineCache;
17
29
  }
18
30
  export declare function createAxisRenderer(device: GPUDevice, options?: AxisRendererOptions): AxisRenderer;
19
31
  //# sourceMappingURL=createAxisRenderer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createAxisRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/createAxisRenderer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGrD,MAAM,WAAW,YAAY;IAC3B,OAAO,CACL,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,WAAW,EAClB,WAAW,EAAE,GAAG,GAAG,GAAG,EACtB,QAAQ,EAAE,QAAQ,EAClB,aAAa,CAAC,EAAE,MAAM,EACtB,aAAa,CAAC,EAAE,MAAM,EACtB,SAAS,CAAC,EAAE,MAAM,GACjB,IAAI,CAAC;IACR,MAAM,CAAC,WAAW,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAChD,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC;;;;;OAKG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,gBAAgB,CAAC;CAC1C;AAkKD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,YAAY,CAsLjG"}
1
+ {"version":3,"file":"createAxisRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/createAxisRenderer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,MAAM,WAAW,YAAY;IAC3B,OAAO,CACL,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,WAAW,EAClB,WAAW,EAAE,GAAG,GAAG,GAAG,EACtB,QAAQ,EAAE,QAAQ,EAClB,aAAa,CAAC,EAAE,MAAM,EACtB,aAAa,CAAC,EAAE,MAAM,EACtB,SAAS,CAAC,EAAE,MAAM,GACjB,IAAI,CAAC;IACR,MAAM,CAAC,WAAW,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAChD,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC;;;;;OAKG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,gBAAgB,CAAC;IACzC;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B;;OAEG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,aAAa,CAAC;CACxC;AAkKD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,YAAY,CA8LjG"}
@@ -2,6 +2,7 @@ import type { ResolvedBarSeriesConfig } from '../config/OptionResolver';
2
2
  import type { LinearScale } from '../utils/scales';
3
3
  import type { GridArea } from './createGridRenderer';
4
4
  import type { DataStore } from '../data/createDataStore';
5
+ import type { PipelineCache } from '../core/PipelineCache';
5
6
  export interface BarRenderer {
6
7
  prepare(seriesConfigs: ReadonlyArray<ResolvedBarSeriesConfig>, dataStore: DataStore, xScale: LinearScale, yScale: LinearScale, gridArea: GridArea): void;
7
8
  render(passEncoder: GPURenderPassEncoder): void;
@@ -15,6 +16,17 @@ export interface BarRendererOptions {
15
16
  * Defaults to `'bgra8unorm'` for backward compatibility.
16
17
  */
17
18
  readonly targetFormat?: GPUTextureFormat;
19
+ /**
20
+ * Multisample count for the render pipeline.
21
+ *
22
+ * Must match the render pass color attachment sampleCount.
23
+ * Defaults to 1 (no MSAA).
24
+ */
25
+ readonly sampleCount?: number;
26
+ /**
27
+ * Optional shared cache for shader modules + render pipelines.
28
+ */
29
+ readonly pipelineCache?: PipelineCache;
18
30
  }
19
31
  export declare function createBarRenderer(device: GPUDevice, options?: BarRendererOptions): BarRenderer;
20
32
  //# sourceMappingURL=createBarRenderer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createBarRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/createBarRenderer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAIzD,MAAM,WAAW,WAAW;IAC1B,OAAO,CACL,aAAa,EAAE,aAAa,CAAC,uBAAuB,CAAC,EACrD,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,WAAW,EACnB,QAAQ,EAAE,QAAQ,GACjB,IAAI,CAAC;IACR,MAAM,CAAC,WAAW,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAChD,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,kBAAkB;IACjC;;;;;OAKG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,gBAAgB,CAAC;CAC1C;AA8FD,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,WAAW,CA6Y9F"}
1
+ {"version":3,"file":"createBarRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/createBarRenderer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAGzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,MAAM,WAAW,WAAW;IAC1B,OAAO,CACL,aAAa,EAAE,aAAa,CAAC,uBAAuB,CAAC,EACrD,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,WAAW,EACnB,QAAQ,EAAE,QAAQ,GACjB,IAAI,CAAC;IACR,MAAM,CAAC,WAAW,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAChD,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,kBAAkB;IACjC;;;;;OAKG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,gBAAgB,CAAC;IACzC;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B;;OAEG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,aAAa,CAAC;CACxC;AA8FD,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,WAAW,CAqZ9F"}
@@ -1,6 +1,7 @@
1
1
  import type { ResolvedCandlestickSeriesConfig } from '../config/OptionResolver';
2
2
  import type { LinearScale } from '../utils/scales';
3
3
  import type { GridArea } from './createGridRenderer';
4
+ import type { PipelineCache } from '../core/PipelineCache';
4
5
  export interface CandlestickRenderer {
5
6
  prepare(series: ResolvedCandlestickSeriesConfig, data: ResolvedCandlestickSeriesConfig['data'], xScale: LinearScale, yScale: LinearScale, gridArea: GridArea, backgroundColor?: string): void;
6
7
  render(passEncoder: GPURenderPassEncoder): void;
@@ -14,6 +15,17 @@ export interface CandlestickRendererOptions {
14
15
  * Defaults to `'bgra8unorm'` for backward compatibility.
15
16
  */
16
17
  readonly targetFormat?: GPUTextureFormat;
18
+ /**
19
+ * Multisample count for the render pipeline.
20
+ *
21
+ * Must match the render pass color attachment sampleCount.
22
+ * Defaults to 1 (no MSAA).
23
+ */
24
+ readonly sampleCount?: number;
25
+ /**
26
+ * Optional shared cache for shader modules + render pipelines.
27
+ */
28
+ readonly pipelineCache?: PipelineCache;
17
29
  }
18
30
  export declare function createCandlestickRenderer(device: GPUDevice, options?: CandlestickRendererOptions): CandlestickRenderer;
19
31
  //# sourceMappingURL=createCandlestickRenderer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createCandlestickRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/createCandlestickRenderer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,0BAA0B,CAAC;AAEhF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAIrD,MAAM,WAAW,mBAAmB;IAClC,OAAO,CACL,MAAM,EAAE,+BAA+B,EACvC,IAAI,EAAE,+BAA+B,CAAC,MAAM,CAAC,EAC7C,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,WAAW,EACnB,QAAQ,EAAE,QAAQ,EAClB,eAAe,CAAC,EAAE,MAAM,GACvB,IAAI,CAAC;IACR,MAAM,CAAC,WAAW,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAChD,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,0BAA0B;IACzC;;;;;OAKG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,gBAAgB,CAAC;CAC1C;AAiJD,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,0BAA0B,GAAG,mBAAmB,CA2VtH"}
1
+ {"version":3,"file":"createCandlestickRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/createCandlestickRenderer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,0BAA0B,CAAC;AAEhF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,MAAM,WAAW,mBAAmB;IAClC,OAAO,CACL,MAAM,EAAE,+BAA+B,EACvC,IAAI,EAAE,+BAA+B,CAAC,MAAM,CAAC,EAC7C,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,WAAW,EACnB,QAAQ,EAAE,QAAQ,EAClB,eAAe,CAAC,EAAE,MAAM,GACvB,IAAI,CAAC;IACR,MAAM,CAAC,WAAW,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAChD,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,0BAA0B;IACzC;;;;;OAKG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,gBAAgB,CAAC;IACzC;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B;;OAEG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,aAAa,CAAC;CACxC;AAiJD,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,0BAA0B,GAAG,mBAAmB,CAmWtH"}
@@ -1,4 +1,5 @@
1
1
  import type { GridArea } from './createGridRenderer';
2
+ import type { PipelineCache } from '../core/PipelineCache';
2
3
  export interface CrosshairRenderOptions {
3
4
  /** Whether to render the vertical crosshair line. */
4
5
  readonly showX: boolean;
@@ -38,6 +39,17 @@ export interface CrosshairRendererOptions {
38
39
  * Defaults to `'bgra8unorm'` for backward compatibility.
39
40
  */
40
41
  readonly targetFormat?: GPUTextureFormat;
42
+ /**
43
+ * Multisample count for the render pipeline.
44
+ *
45
+ * Must match the render pass color attachment sampleCount.
46
+ * Defaults to 1 (no MSAA).
47
+ */
48
+ readonly sampleCount?: number;
49
+ /**
50
+ * Optional shared cache for shader modules + render pipelines.
51
+ */
52
+ readonly pipelineCache?: PipelineCache;
41
53
  }
42
54
  export declare function createCrosshairRenderer(device: GPUDevice, options?: CrosshairRendererOptions): CrosshairRenderer;
43
55
  //# sourceMappingURL=createCrosshairRenderer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createCrosshairRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/createCrosshairRenderer.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAErD,MAAM,WAAW,sBAAsB;IACrC,qDAAqD;IACrD,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,uDAAuD;IACvD,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,gDAAgD;IAChD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;;;;;OAKG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,iBAAiB;IAChC;;;;;;OAMG;IACH,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,sBAAsB,GAAG,IAAI,CAAC;IACzF,iEAAiE;IACjE,MAAM,CAAC,WAAW,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAChD,kEAAkE;IAClE,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IACnC,6CAA6C;IAC7C,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,wBAAwB;IACvC;;;;;OAKG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,gBAAgB,CAAC;CAC1C;AAgND,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,wBAAwB,GAAG,iBAAiB,CA+IhH"}
1
+ {"version":3,"file":"createCrosshairRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/createCrosshairRenderer.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,MAAM,WAAW,sBAAsB;IACrC,qDAAqD;IACrD,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,uDAAuD;IACvD,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,gDAAgD;IAChD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;;;;;OAKG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,iBAAiB;IAChC;;;;;;OAMG;IACH,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,sBAAsB,GAAG,IAAI,CAAC;IACzF,iEAAiE;IACjE,MAAM,CAAC,WAAW,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAChD,kEAAkE;IAClE,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IACnC,6CAA6C;IAC7C,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,wBAAwB;IACvC;;;;;OAKG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,gBAAgB,CAAC;IACzC;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B;;OAEG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,aAAa,CAAC;CACxC;AAgND,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,wBAAwB,GAAG,iBAAiB,CAuJhH"}
@@ -1,3 +1,4 @@
1
+ import type { PipelineCache } from '../core/PipelineCache';
1
2
  export interface GridRenderer {
2
3
  /**
3
4
  * Backward compatible:
@@ -31,6 +32,15 @@ export interface GridPrepareOptions {
31
32
  * Expected formats: `#rgb`, `#rrggbb`, `#rrggbbaa`, `rgb(r,g,b)`, `rgba(r,g,b,a)`.
32
33
  */
33
34
  readonly color?: string;
35
+ /**
36
+ * When true, appends additional grid line geometry to the existing prepared
37
+ * batch instead of replacing it. This enables rendering multiple grid batches
38
+ * (e.g. different colors for horizontal vs vertical lines).
39
+ *
40
+ * Backward compatible: call sites that don't use `append` continue to replace
41
+ * the prepared geometry each frame.
42
+ */
43
+ readonly append?: boolean;
34
44
  }
35
45
  export interface GridRendererOptions {
36
46
  /**
@@ -40,6 +50,17 @@ export interface GridRendererOptions {
40
50
  * Defaults to `'bgra8unorm'` for backward compatibility.
41
51
  */
42
52
  readonly targetFormat?: GPUTextureFormat;
53
+ /**
54
+ * Multisample count for the render pipeline.
55
+ *
56
+ * Must match the render pass color attachment sampleCount.
57
+ * Defaults to 1 (no MSAA).
58
+ */
59
+ readonly sampleCount?: number;
60
+ /**
61
+ * Optional shared cache for shader modules + render pipelines.
62
+ */
63
+ readonly pipelineCache?: PipelineCache;
43
64
  }
44
65
  export declare function createGridRenderer(device: GPUDevice, options?: GridRendererOptions): GridRenderer;
45
66
  //# sourceMappingURL=createGridRenderer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createGridRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/createGridRenderer.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,YAAY;IAC3B;;;;;;OAMG;IACH,OAAO,CAAC,QAAQ,EAAE,QAAQ,EAAE,kBAAkB,CAAC,EAAE,aAAa,GAAG,kBAAkB,GAAG,IAAI,CAAC;IAC3F,MAAM,CAAC,WAAW,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAChD,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,GAAG,EAA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C,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;CACnC;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,SAAS,CAAC,EAAE,aAAa,CAAC;IACnC;;;;OAIG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;;;OAOG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,mBAAmB;IAClC;;;;;OAKG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,gBAAgB,CAAC;IACzC;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B;;OAEG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,aAAa,CAAC;CACxC;AAoFD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,YAAY,CAyNjG"}
@@ -1,3 +1,4 @@
1
+ import type { PipelineCache } from '../core/PipelineCache';
1
2
  export type HighlightPoint = Readonly<{
2
3
  /** Center in *device pixels* (same coordinate space as fragment `@builtin(position)`). */
3
4
  centerDeviceX: number;
@@ -36,6 +37,17 @@ export interface HighlightRendererOptions {
36
37
  * Defaults to `'bgra8unorm'` for backward compatibility.
37
38
  */
38
39
  readonly targetFormat?: GPUTextureFormat;
40
+ /**
41
+ * Multisample count for the render pipeline.
42
+ *
43
+ * Must match the render pass color attachment sampleCount.
44
+ * Defaults to 1 (no MSAA).
45
+ */
46
+ readonly sampleCount?: number;
47
+ /**
48
+ * Optional shared cache for shader modules + render pipelines.
49
+ */
50
+ readonly pipelineCache?: PipelineCache;
39
51
  }
40
52
  export declare function createHighlightRenderer(device: GPUDevice, options?: HighlightRendererOptions): HighlightRenderer;
41
53
  //# sourceMappingURL=createHighlightRenderer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createHighlightRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/createHighlightRenderer.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC;IACpC,0FAA0F;IAC1F,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IAEtB,yDAAyD;IACzD,gBAAgB,EAAE,MAAM,CAAC;IAEzB,oEAAoE;IACpE,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IAErB,4CAA4C;IAC5C,OAAO,EAAE,QAAQ,CAAC;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACnE,CAAC,CAAC;AAEH,MAAM,WAAW,iBAAiB;IAChC;;;;;;OAMG;IACH,OAAO,CAAC,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAClE,MAAM,CAAC,WAAW,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAChD,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IACnC,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,wBAAwB;IACvC;;;;;OAKG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,gBAAgB,CAAC;CAC1C;AAmBD,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,wBAAwB,GAAG,iBAAiB,CA6IhH"}
1
+ {"version":3,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import type { ResolvedLineSeriesConfig } from '../config/OptionResolver';
2
2
  import type { LinearScale } from '../utils/scales';
3
+ import type { PipelineCache } from '../core/PipelineCache';
3
4
  export interface LineRenderer {
4
- prepare(seriesConfig: ResolvedLineSeriesConfig, dataBuffer: GPUBuffer, xScale: LinearScale, yScale: LinearScale, xOffset?: number): void;
5
+ prepare(seriesConfig: ResolvedLineSeriesConfig, dataBuffer: GPUBuffer, xScale: LinearScale, yScale: LinearScale, xOffset?: number, devicePixelRatio?: number, canvasWidthDevicePx?: number, canvasHeightDevicePx?: number): void;
5
6
  render(passEncoder: GPURenderPassEncoder): void;
6
7
  dispose(): void;
7
8
  }
@@ -13,6 +14,18 @@ export interface LineRendererOptions {
13
14
  * Defaults to `'bgra8unorm'` for backward compatibility.
14
15
  */
15
16
  readonly targetFormat?: GPUTextureFormat;
17
+ /**
18
+ * Multisample count for the render pipeline.
19
+ *
20
+ * Must match the render pass color attachment sampleCount.
21
+ * Defaults to 1 (no MSAA).
22
+ */
23
+ readonly sampleCount?: number;
24
+ /**
25
+ * Optional shared cache for shader modules + render pipelines.
26
+ * Opt-in only: if omitted, behavior is identical to the uncached path.
27
+ */
28
+ readonly pipelineCache?: PipelineCache;
16
29
  }
17
30
  export declare function createLineRenderer(device: GPUDevice, options?: LineRendererOptions): LineRenderer;
18
31
  //# sourceMappingURL=createLineRenderer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createLineRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/createLineRenderer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAKnD,MAAM,WAAW,YAAY;IAC3B,OAAO,CACL,YAAY,EAAE,wBAAwB,EACtC,UAAU,EAAE,SAAS,EACrB,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,WAAW,EACnB,OAAO,CAAC,EAAE,MAAM,GAC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C,EAAE,mBAAmB,GAAG,YAAY,CAqJjG"}
@@ -1,5 +1,6 @@
1
1
  import type { ResolvedPieSeriesConfig } from '../config/OptionResolver';
2
2
  import type { GridArea } from './createGridRenderer';
3
+ import type { PipelineCache } from '../core/PipelineCache';
3
4
  export interface PieRenderer {
4
5
  prepare(seriesConfig: ResolvedPieSeriesConfig, gridArea: GridArea): void;
5
6
  render(passEncoder: GPURenderPassEncoder): void;
@@ -13,6 +14,17 @@ export interface PieRendererOptions {
13
14
  * Defaults to `'bgra8unorm'` for backward compatibility.
14
15
  */
15
16
  readonly targetFormat?: GPUTextureFormat;
17
+ /**
18
+ * Multisample count for the render pipeline.
19
+ *
20
+ * Must match the render pass color attachment sampleCount.
21
+ * Defaults to 1 (no MSAA).
22
+ */
23
+ readonly sampleCount?: number;
24
+ /**
25
+ * Optional shared cache for shader modules + render pipelines.
26
+ */
27
+ readonly pipelineCache?: PipelineCache;
16
28
  }
17
29
  export declare function createPieRenderer(device: GPUDevice, options?: PieRendererOptions): PieRenderer;
18
30
  //# sourceMappingURL=createPieRenderer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createPieRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/createPieRenderer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAGxE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGrD,MAAM,WAAW,WAAW;IAC1B,OAAO,CAAC,YAAY,EAAE,uBAAuB,EAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IACzE,MAAM,CAAC,WAAW,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAChD,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,kBAAkB;IACjC;;;;;OAKG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,gBAAgB,CAAC;CAC1C;AAgID,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,WAAW,CA0R9F"}
1
+ {"version":3,"file":"createPieRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/createPieRenderer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAGxE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,MAAM,WAAW,WAAW;IAC1B,OAAO,CAAC,YAAY,EAAE,uBAAuB,EAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IACzE,MAAM,CAAC,WAAW,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAChD,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,kBAAkB;IACjC;;;;;OAKG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,gBAAgB,CAAC;IACzC;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B;;OAEG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,aAAa,CAAC;CACxC;AAgID,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,WAAW,CAkS9F"}
@@ -1,4 +1,5 @@
1
1
  import type { GridArea } from './createGridRenderer';
2
+ import type { PipelineCache } from '../core/PipelineCache';
2
3
  export type ReferenceLineAxis = 'vertical' | 'horizontal';
3
4
  export interface ReferenceLineInstance {
4
5
  /**
@@ -57,6 +58,10 @@ export interface ReferenceLineRendererOptions {
57
58
  * Defaults to 1 (no MSAA).
58
59
  */
59
60
  readonly sampleCount?: number;
61
+ /**
62
+ * Optional shared cache for shader modules + render pipelines.
63
+ */
64
+ readonly pipelineCache?: PipelineCache;
60
65
  }
61
66
  export interface ReferenceLineRenderer {
62
67
  /**
@@ -1 +1 @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AI,CAAC;CACjB;AAiDD,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,4BAA4B,GAAG,qBAAqB,CA+O5H"}
@@ -1,6 +1,7 @@
1
1
  import type { RawBounds, ResolvedScatterSeriesConfig } from '../config/OptionResolver';
2
2
  import type { LinearScale } from '../utils/scales';
3
3
  import type { GridArea } from './createGridRenderer';
4
+ import type { PipelineCache } from '../core/PipelineCache';
4
5
  export interface ScatterDensityRenderer {
5
6
  prepare(seriesConfig: ResolvedScatterSeriesConfig, pointBuffer: GPUBuffer, pointCount: number, visibleStartIndex: number, visibleEndIndex: number, xScale: LinearScale, yScale: LinearScale, gridArea: GridArea, rawBounds?: RawBounds): void;
6
7
  encodeCompute(encoder: GPUCommandEncoder): void;
@@ -9,6 +10,17 @@ export interface ScatterDensityRenderer {
9
10
  }
10
11
  export interface ScatterDensityRendererOptions {
11
12
  readonly targetFormat?: GPUTextureFormat;
13
+ /**
14
+ * Multisample count for the render pipeline.
15
+ *
16
+ * Must match the render pass color attachment sampleCount.
17
+ * Defaults to 1 (no MSAA).
18
+ */
19
+ readonly sampleCount?: number;
20
+ /**
21
+ * Optional shared cache for shader modules + render pipelines.
22
+ */
23
+ readonly pipelineCache?: PipelineCache;
12
24
  }
13
25
  export declare function createScatterDensityRenderer(device: GPUDevice, options?: ScatterDensityRendererOptions): ScatterDensityRenderer;
14
26
  //# sourceMappingURL=createScatterDensityRenderer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createScatterDensityRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/createScatterDensityRenderer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AACvF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGrD,MAAM,WAAW,sBAAsB;IACrC,OAAO,CACL,YAAY,EAAE,2BAA2B,EACzC,WAAW,EAAE,SAAS,EACtB,UAAU,EAAE,MAAM,EAClB,iBAAiB,EAAE,MAAM,EACzB,eAAe,EAAE,MAAM,EACvB,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,WAAW,EACnB,QAAQ,EAAE,QAAQ,EAClB,SAAS,CAAC,EAAE,SAAS,GACpB,IAAI,CAAC;IACR,aAAa,CAAC,OAAO,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAChD,MAAM,CAAC,WAAW,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAChD,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,YAAY,CAAC,EAAE,gBAAgB,CAAC;CAC1C;AAuID,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,SAAS,EACjB,OAAO,CAAC,EAAE,6BAA6B,GACtC,sBAAsB,CAsZxB"}
1
+ {"version":3,"file":"createScatterDensityRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/createScatterDensityRenderer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AACvF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,MAAM,WAAW,sBAAsB;IACrC,OAAO,CACL,YAAY,EAAE,2BAA2B,EACzC,WAAW,EAAE,SAAS,EACtB,UAAU,EAAE,MAAM,EAClB,iBAAiB,EAAE,MAAM,EACzB,eAAe,EAAE,MAAM,EACvB,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,WAAW,EACnB,QAAQ,EAAE,QAAQ,EAClB,SAAS,CAAC,EAAE,SAAS,GACpB,IAAI,CAAC;IACR,aAAa,CAAC,OAAO,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAChD,MAAM,CAAC,WAAW,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAChD,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,YAAY,CAAC,EAAE,gBAAgB,CAAC;IACzC;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B;;OAEG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,aAAa,CAAC;CACxC;AA2ID,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,SAAS,EACjB,OAAO,CAAC,EAAE,6BAA6B,GACtC,sBAAsB,CAoaxB"}
@@ -2,6 +2,7 @@ import type { ResolvedScatterSeriesConfig } from '../config/OptionResolver';
2
2
  import type { CartesianSeriesData } from '../config/types';
3
3
  import type { LinearScale } from '../utils/scales';
4
4
  import type { GridArea } from './createGridRenderer';
5
+ import type { PipelineCache } from '../core/PipelineCache';
5
6
  export interface ScatterRenderer {
6
7
  prepare(seriesConfig: ResolvedScatterSeriesConfig, data: CartesianSeriesData, xScale: LinearScale, yScale: LinearScale, gridArea?: GridArea): void;
7
8
  render(passEncoder: GPURenderPassEncoder): void;
@@ -15,6 +16,17 @@ export interface ScatterRendererOptions {
15
16
  * Defaults to `'bgra8unorm'` for backward compatibility.
16
17
  */
17
18
  readonly targetFormat?: GPUTextureFormat;
19
+ /**
20
+ * Multisample count for the render pipeline.
21
+ *
22
+ * Must match the render pass color attachment sampleCount.
23
+ * Defaults to 1 (no MSAA).
24
+ */
25
+ readonly sampleCount?: number;
26
+ /**
27
+ * Optional shared cache for shader modules + render pipelines.
28
+ */
29
+ readonly pipelineCache?: PipelineCache;
18
30
  }
19
31
  export declare function createScatterRenderer(device: GPUDevice, options?: ScatterRendererOptions): ScatterRenderer;
20
32
  //# sourceMappingURL=createScatterRenderer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createScatterRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/createScatterRenderer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAC5E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAIrD,MAAM,WAAW,eAAe;IAC9B,OAAO,CACL,YAAY,EAAE,2BAA2B,EACzC,IAAI,EAAE,mBAAmB,EACzB,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,WAAW,EACnB,QAAQ,CAAC,EAAE,QAAQ,GAClB,IAAI,CAAC;IACR,MAAM,CAAC,WAAW,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAChD,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,sBAAsB;IACrC;;;;;OAKG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,gBAAgB,CAAC;CAC1C;AAgFD,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,sBAAsB,GAAG,eAAe,CAuP1G"}
1
+ {"version":3,"file":"createScatterRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/createScatterRenderer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAC5E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,MAAM,WAAW,eAAe;IAC9B,OAAO,CACL,YAAY,EAAE,2BAA2B,EACzC,IAAI,EAAE,mBAAmB,EACzB,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,WAAW,EACnB,QAAQ,CAAC,EAAE,QAAQ,GAClB,IAAI,CAAC;IACR,MAAM,CAAC,WAAW,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAChD,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,sBAAsB;IACrC;;;;;OAKG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,gBAAgB,CAAC;IACzC;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B;;OAEG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,aAAa,CAAC;CACxC;AAgFD,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,sBAAsB,GAAG,eAAe,CA+P1G"}
@@ -10,6 +10,7 @@
10
10
  * - All helpers are pure functions; they create resources but do not mutate external state.
11
11
  * - First argument is always `device: GPUDevice`.
12
12
  */
13
+ import type { PipelineCache } from '../core/PipelineCache';
13
14
  export type ShaderStageModuleSource = {
14
15
  /** Use an existing module. */
15
16
  readonly module: GPUShaderModule;
@@ -62,7 +63,7 @@ export interface RenderPipelineConfigBase {
62
63
  /**
63
64
  * Creates a shader module from WGSL source.
64
65
  */
65
- export declare function createShaderModule(device: GPUDevice, code: string, label?: string): GPUShaderModule;
66
+ export declare function createShaderModule(device: GPUDevice, code: string, label?: string, pipelineCache?: PipelineCache): GPUShaderModule;
66
67
  /**
67
68
  * Creates a render pipeline with reduced boilerplate and sensible defaults.
68
69
  *
@@ -73,7 +74,14 @@ export declare function createShaderModule(device: GPUDevice, code: string, labe
73
74
  * - `primitive.topology: 'triangle-list'`
74
75
  * - `multisample.count: 1`
75
76
  */
76
- export declare function createRenderPipeline(device: GPUDevice, config: RenderPipelineConfig): GPURenderPipeline;
77
+ export declare function createRenderPipeline(device: GPUDevice, config: RenderPipelineConfig, pipelineCache?: PipelineCache): GPURenderPipeline;
78
+ /**
79
+ * Creates a compute pipeline, optionally using a pipeline cache for deduplication.
80
+ *
81
+ * Unlike render pipelines, compute pipelines typically use explicit layouts (not 'auto'),
82
+ * so we do NOT force layout: 'auto' when caching.
83
+ */
84
+ export declare function createComputePipeline(device: GPUDevice, descriptor: GPUComputePipelineDescriptor, pipelineCache?: PipelineCache): GPUComputePipeline;
77
85
  /**
78
86
  * Creates a uniform buffer suitable for `@group/@binding` uniform bindings.
79
87
  *
@@ -1 +1 @@
1
- {"version":3,"file":"rendererUtils.d.ts","sourceRoot":"","sources":["../../src/renderers/rendererUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,MAAM,uBAAuB,GAC/B;IACE,8BAA8B;IAC9B,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;IACjC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAAC;CAC/D,GACD;IACE,oCAAoC;IACpC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAAC;CAC/D,CAAC;AAEN,MAAM,MAAM,iBAAiB,GAAG,uBAAuB,GAAG;IACxD,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,qBAAqB,EAAE,CAAC;CACrD,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,uBAAuB,GAAG;IAC1D;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,mBAAmB,EAAE,CAAC;IAClD;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,gBAAgB,GAAG,SA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OAAO,CAAC,EAAE;IAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GACjE,SAAS,CAoBX;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,YAAY,GAAG,IAAI,CAmBjG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chartgpu/chartgpu",
3
- "version": "0.2.6",
3
+ "version": "0.2.8",
4
4
  "description": "High-performance WebGPU charting library",
5
5
  "keywords": [
6
6
  "webgpu",