Socket
Socket
Sign inDemoInstall

@antv/matrix-util

Package Overview
Dependencies
4
Maintainers
33
Versions
30
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @antv/matrix-util

A common util collection for antv projects


Version published
Weekly downloads
345K
decreased by-1.21%
Maintainers
33
Install size
1.09 MB
Created
Weekly downloads
 

Readme

Source

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]
]);

Keywords

FAQs

Last updated on 21 Dec 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc