@huangjs888/transform
TypeScript icon, indicating that this package has built-in type declarations

1.2.2 • Public • Published

transform

样式变换

安装使用

npm install @huangjs888/transform --save

css3样式:

body{
  transform: matrix3d(
    1, 0, 0, 0,
    0, 1, 0, 0,
    0, 0, 1, 0,
    0, 0, 0, 1
  );
}
  

使用方法

import Transform from '@huangjs888/transform';

const transform = new Transform({ a: 0, k: 1, x: 0, y: 0 });
const raw = transform.toRaw();
raw.a += 1;
raw.k *= 2;
raw.x += 1;
raw.y += 1;
document.body.style.transform = transform.toString();
  

Package Sidebar

Install

npm i @huangjs888/transform

Weekly Downloads

3

Version

1.2.2

License

MIT

Unpacked Size

191 kB

Total Files

11

Last publish

Collaborators

  • huangjs888