npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vega-webgl-renderer

v1.0.0-beta.2

Published

Vega WebGL renderer.

Downloads

1,684

Readme

WebGL renderer for Vega

Demo

Major features

  • Implements nearly all Vega scene graph components as WebGL primitives. Falls back to 2D Canvas rendering for text and gradient fills, which are drawn to a WebGL texture and overlaid on the view.
  • Custom shaders for Rect and Symbol marks, enabling greater scalability (to the hundreds of thousands) beyond Canvas and SVG renderers. See the "scale" example in the demo (Note: Do not attempt that example with the SVG renderer, it will lock your browser for a while).

Usage

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>

Build

npm install
npm run build

Test

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

Contributing

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.

Known issues

  • Line dashes are not supported (see "barley", "nested-plot", "map-bind" examples).
  • Triangulation of trails is known to be buggy and leave holes at internal nodes.
  • Custom symbol shapes are not supported.
  • Triangulation of geometry sometimes results in spurious offshoots.

Notes

There is one minor change to extrude-polyline which hacks in a way to close mitered strokes, which has not been merged upstream.