shape2path:将 SVG 形状转换为 SVG 路径
形状2路径 将 SVG转换为 SVG。 看看。 安装 如果您使用 NPM,请npm install shape2path 。 否则,请下载。 支持 AMD、CommonJS 和 vanilla 环境。 在 vanilla 中,导出 shape2path 全局: < script src =" https://unpkg.com/shape2path@3.0.5/build/shape2path.min.js " > </ script > < script > const path = shape2path . circle ( ) . attr ( "r" , 50 ) // Paths can be configured with constants... . attr ( "cx" , d => d . cx ) ; // ...or with functions. //