Open alexcjohnson opened 8 months ago
@alexcjohnson
I have tested all WebGL dash-bio
components, as well as dash-vtk
with the shared WebGL context, and all seem to be working fine as far as I can tell.
dash-deck
I'm less familiar with; the basic "Hello World" example seems to be loading OK but I haven't yet been able to put together a more comprehensive example to test with.
Perhaps @graingert-coef or @vogt31337 could be enticed to test out dash-deck
with virtual webgl, and provide a more complete test case?
Plotly.js v2.28.0 added support for
virtual-webgl
, which allows you to put arbitrarily many WebGL-based graphs on a single page, as opposed to the limit of typically 4-8 before you hit the maximum contexts a browser will give you (note most desktop browsers give you up to 16 contexts, but one plotly.js graph uses up to 3 contexts). We would like to expose this option in Dash too. It can already be done by addinghttps://unpkg.com/virtual-webgl@1.0.6/src/virtual-webgl.js
toexternal_scripts
(or downloading that and putting it in yourassets
folder), so we could just document that, but it would be nicer to have a built-in way to do this.Two important things to note about this:
dcc.Graph
), WebGL is used by somedash-bio
components,dash-vtk
,dash-deck
, and possibly others (I don't thinkdash-cytoscape
ordash-leaflet
use WebGL but I'm not 100% sure of this).Initially I was thinking we would make this opt-in as a prop of
dcc.Graph
, but because of the global (and irreversible) nature of this I'm now thinking a global setting like aDash()
constructor arg would be better.