@antv/path-util
A common util collection for antv projects
Last updated a month ago by atool .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @antv/path-util 
SYNC missed versions from official npm registry.

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 完善上述各个方法的使用实例。

Current Tags

  • 2.0.9                                ...           latest (a month ago)

13 Versions

  • 2.0.9                                ...           a month ago
  • 2.0.8                                ...           9 months ago
  • 2.0.7                                ...           10 months ago
  • 2.0.6                                ...           a year ago
  • 2.0.5                                ...           a year ago
  • 2.0.4                                ...           a year ago
  • 2.0.3                                ...           2 years ago
  • 2.0.3-beta.3                                ...           2 years ago
  • 2.0.3-beta.2                                ...           2 years ago
  • 2.0.3-beta.1                                ...           2 years ago
  • 2.0.2                                ...           2 years ago
  • 2.0.1                                ...           2 years ago
  • 2.0.0                                ...           2 years ago

Copyright 2014 - 2017 © taobao.org |