[ 源代码: node-d3-path ]
软件包:node-d3-path(1.0.5-3)
Serialize Canvas path commands to SVG
Say you have some code that draws to a 2D canvas, the d3-path module lets you take this exact code and additionally render to SVG. It works by serializing CanvasPathMethods calls to SVG path data.
Now code you write once can be used with both Canvas (for performance) and SVG (for convenience). For a practical example, see d3-shape.
Node.js is an event-based server-side JavaScript engine.