npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@rustle/matrix

v0.0.9

Published

A html element matrix transform library.

Readme

Matrix

NPM version

A html element matrix transform library.

CDN

<script src="https://cdn.jsdelivr.net/gh/imtaotao/matrix/dist/matrix.min.js"></script>

API

The Matrix is a function, call this function will return a Matrix object. The Matrix object has the following API.

  • Matrix: HTMLElement => matrix
  import Matrix from '@rustle/matrix'

  // Will get the initial matrix value of the element and return a matrix object
  const matrix = Matrix(document.getElementById('id'))

  // Will move 100px along the x axis and rotate 45 degrees
  matrix.translateX(100).rotateZ(45).to()

  // Continue move 200px along y-axis
  matrix.translateY(200).to()

rotate

  • rotate3d(x: number, y: number, z: number, deg: number) : matrix
  • rotateX(deg: number) : matrix
  • rotateY(deg: number) : matrix
  • rotateZ(deg: number) : matrix
  • rotate(deg: number) : matrix

translate

  • translate3d(x: number, y: number, z: number) : matrix
  • translateX(x: number) : matrix
  • translateY(y: number) : matrix
  • translateZ(z: number) : matrix
  • translate(x: number, y: number) : matrix

scale

  • scale3d(x: number, y: number, z: number) : matrix
  • scaleX(x: number) : matrix
  • scaleY(y: number) : matrix
  • scaleZ(z: number) : matrix
  • scale(x: number, y: number) : matrix

skew

  • skew(x: number, y: number) : matrix
  • skewX(x: number) : matrix
  • skewY(y: number) : matrix

set style to element

  • to() : matrix

update the value of the staging

  • update() : matrix

View all methods

  import Matrix from '@rustle/matrix'
  console.log(Object.keys(Matrix(node).__proto__))

Notes

  1. Since each matrix transformation is performed on the previous basis, So you need to call the to method to render the data to the view. But it's best to render after the final calculation of the data is complete, which can reduce the operation on dom.

  2. Matrix will cache the value of each conversion, which will reduce the value of the matrix in the dom, but sometimes the matrix of dom will change for other reasons. At this point, we can call the update method to update the cache value in Matrix.