layerchart icon indicating copy to clipboard operation
layerchart copied to clipboard

WebGL support

Open techniq opened this issue 6 months ago • 2 comments

Consider adding WebGL layer (<WebGL> / <Layer type="webgl">) and primitives support, although Svg, Canvas, and Html typically fulfill most needs, and there is more performance opportunity to unlock.

Might be able to leverage an abstraction to simplify implementation

  • https://github.com/karellodewijk/canvas-webgl
  • https://github.com/jagenjo/Canvas2DtoWebGL
  • https://g.antv.antgroup.com/en

Note: WebGL does have a limit on the number of concurrent WebGL contexts (also mentioned by uPlot and Rive).

techniq avatar Jun 24 '25 17:06 techniq

you can kinda work around the limit using virtual-webgl, like plotly did: https://github.com/plotly/plotly.js/pull/6784

leeoniya avatar Jun 24 '25 23:06 leeoniya

@leeoniya Thanks, that's great to know!

techniq avatar Jun 25 '25 01:06 techniq