@antv/path-util
TypeScript icon, indicating that this package has built-in type declarations

3.0.1 • Public • Published

path-util

antv 开发的轻量级 path 处理的工具库。

安装下载

tnpm i --save @antv/util

// 所有的 api 是都这么引入,名字不同而已
import { parsePathString, path2Curve } from '@antv/path-util';

API 文档

  • catmullRom2Bezier(arr, closed): 将点的数组转成曲线
  • fillPath(source, target): 动画前填充path
  • fillPathByDiff(source, target): 左右平移动画前的填充 path
  • pathIntersection(path1, path2): 两条线的交点
  • parsePathArray(arr) String : 将数组转成字符串
  • parsePathString(str)String[]: 将字符串转换成数组
  • path2Curve(arr|str) String[]: 转曲
  • path2Absolute(arr|str) String[]: 都转换成大写绝对路径的写法
  • reactPath(x, y, w, h, r) String[]: 支持圆角的矩形

实例

TODO 完善上述各个方法的使用实例。

Readme

Keywords

Package Sidebar

Install

npm i @antv/path-util

Weekly Downloads

282,427

Version

3.0.1

License

MIT

Unpacked Size

360 kB

Total Files

157

Last publish

Collaborators

  • lvisei
  • yisi.wang
  • basketduck
  • biupiubiupiu
  • flash1
  • dreammy23
  • laixingui.lxg
  • zhangjunjie-loki
  • rainy25ghz
  • zeyuwang
  • yanxiong
  • susiwen8
  • freestyle21
  • soundquiet
  • elaine.q.10
  • sturuby
  • sakuya223
  • serializedowen
  • xdzhao
  • yangzhanmei
  • wjgogogo
  • leungwensen
  • dori
  • iaaron
  • yard
  • simaq
  • dxq613
  • intchous
  • susan_ann
  • jinke.li
  • lzxue
  • army8735
  • atool
  • baizn
  • dengfuping
  • neoddish
  • jeffy2012
  • zqlu
  • afc163
  • pomelo-nwu
  • kopiluwaky
  • ccnuzindex
  • panyuqi
  • bubkoo
  • zengyue
  • kasmine
  • boyu.zlj
  • l1ud0ngq1
  • newbyvector
  • winniexing
  • chenluli
  • kn9117
  • xdddst
  • semious2020
  • esora
  • nadia_liu
  • bbsqq
  • mxz96102
  • openwayne
  • pearmini
  • pddpd
  • yiqianyao
  • zhanba
  • cxxxxxn