@antv/matrix-util
A common util collection for antv projects
Last updated 5 years ago by dxq613 .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ npm 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.3                                ...           beta (3 years ago)
  • 3.0.4                                ...           latest (4 years ago)

30 Versions

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

© 2010 - cnpmjs.org x YWFE | Home | YWFE