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

    3.0.4 • Public • Published

    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

    Install

    npm i @antv/matrix-util

    DownloadsWeekly Downloads

    108,168

    Version

    3.0.4

    License

    ISC

    Unpacked Size

    20.1 kB

    Total Files

    16

    Last publish

    Collaborators

    • freestyle21
    • soundquiet
    • elaine.q.10
    • sturuby
    • lviser
    • 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