How to use the vega-scenegraph.pathCurves function in vega-scenegraph

To help you get started, we’ve selected a few vega-scenegraph examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vega / vega-webgl-renderer / src / path / shapes.js View on Github external
export function area(context, items) {
  var item = items[0],
      interp = item.interpolate || 'linear',
      s = (interp === 'trail' ? trailShape
        : (item.orient === 'horizontal' ? areahShape : areavShape)
            .curve(pathCurves(interp, item.orient, item.tension))
      )
  if (!context || context.arc) {
    return s.context(context)(items);
  }
  return geometryForPath(context, s.context(null)(items), 0.1);
}
github vega / vega-webgl-renderer / src / path / shapes.js View on Github external
export function line(context, items) {
  var item = items[0],
      interp = item.interpolate || 'linear',
      s = lineShape.curve(pathCurves(interp, item.orient, item.tension));
  if (!context || context.arc) {
    return s.context(context)(items);
  }
  return geometryForPath(context, s.context(null)(items));
}