@antv/matrix-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/matrix-util 
SYNC missed versions from official npm registry.

matrix-util

扩展了 gl-matrx 的 vec2, vec3, mat3, transform 方法

安装下载

tnpm i --save @antv/util

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

vec2.angle(v1, v2);

API 文档

推荐使用的 API 文档如下:

  • vec2 新增了以下方法:
    • angle(v1, v2)
    • direction(v1, v2)
    • angleTo(v1, v2)
    • vertical(out, in) 求垂直向量
  • vec3 未新增方法
  • mat3 新增:
    • translate(out, m, v)
    • rotate(out, m, rad)
    • scale(out, m, v)
  • transform(m, [])
transform(m, [
    ['t', 100, 200],
    ['r', 40],
    ['s', 2, 2]
]);

Current Tags

  • 3.1.0-beta.2                                ...           beta (8 months ago)
  • 3.0.4                                ...           latest (a month ago)

29 Versions

  • 3.0.4                                ...           a month ago
  • 3.1.0-beta.2                                ...           8 months ago
  • 3.1.0-beta.1                                ...           8 months ago
  • 3.0.4-beta.7                                ...           8 months ago
  • 3.0.4-beta.6                                ...           8 months ago
  • 3.0.4-beta.5                                ...           8 months ago
  • 3.0.4-beta.4                                ...           8 months ago
  • 3.0.4-beta.3                                ...           8 months ago
  • 3.0.4-beta.2                                ...           8 months ago
  • 3.0.4-beta.1                                ...           8 months ago
  • 3.0.3                                ...           8 months ago
  • 3.0.2                                ...           9 months ago
  • 3.0.1-beta.3                                ...           9 months ago
  • 3.0.1-beta.2                                ...           9 months ago
  • 3.0.1-beta.1                                ...           9 months ago
  • 3.0.0                                ...           9 months ago
  • 2.0.7                                ...           9 months ago
  • 2.0.6 [deprecated]           ...           9 months ago
  • 2.0.6-beta.4                                ...           9 months ago
  • 2.0.6-beta.3                                ...           9 months ago
  • 2.0.6-beta.2                                ...           9 months ago
  • 2.0.6-beta.1                                ...           9 months ago
  • 2.0.5                                ...           10 months ago
  • 2.0.4                                ...           a year ago
  • 2.0.4-beta.1                                ...           a year ago
  • 2.0.3                                ...           a year ago
  • 2.0.2                                ...           a year ago
  • 2.0.1-beta.1                                ...           2 years ago
  • 2.0.0                                ...           2 years ago

Copyright 2014 - 2017 © taobao.org |