Use this scaffolding to get started using the WebGL renderer. Instead of being directly usable after loading Vega, as the SVG and Canvas renderers are, the WebGL renderer is a plugin which requires the inclusion of an additional JavaScript library.
The WebGL renderer requires Vega 3.0 (currently in beta).
<body>
<script src="https://d3js.org/d3.v4.min.js"></script>
<script src="https://unpkg.com/vega/build/vega.min.js" charset="utf-8"></script>
<script src="https://unpkg.com/vega-webgl-renderer/build/vega-webgl-renderer.js" charset="utf-8"></script>
<div id="vis"></div>
<script>
// Load in your own Vega spec here.
d3.json('https://vega.github.io/vega-webgl-renderer/spec/bar-hover-label.vg.json', function (spec) {
var view = new vega.View(vega.parse(spec))
.initialize(document.querySelector('#vis'))
.renderer('webgl')
.run();
});
</script>
</body>
npm install
npm run build
Testing requires that the Selenium server is running with the Chrome driver installed. To run all tests:
npm run test
To just run the linter:
npm run lint
Please try it out and let us know how it works for you. Bug reports, feature and improvement ideas, and PRs welcome.
This code is built and maintained by the Kitware Resonant team in collaboration with the UW Interactive Data Lab. The work is supported by the DARPA AFRL XDATA program.
There is one minor change to extrude-polyline which hacks in a way to close mitered strokes, which has not been merged upstream.