
Security News
Researcher Exposes Zero-Day Clickjacking Vulnerabilities in Major Password Managers
Hacker Demonstrates How Easy It Is To Steal Data From Popular Password Managers
mat4-recompose
Advanced tools
Recompose a 4x4 matrix from translation, scale, skew, perspective, and rotation. This is commonly used in matrix animations (i.e. after decompose and interpolation). Code ported from W3 CSS Spec. PRs for more tests/robustness/optimizations welcome.
You may also be interested in mat4-interpolate, mat4-decompose, and css-mat4.
recompose(matrix, translation, scale, skew, perspective, quaternion)
Recomposes a matrix with the given vectors, storing the result into matrix
(a 16 float array).
translation
[x, y, z]scale
[x, y, z]skew
[xy, xz, yz] skew factorsperspective
[x, y, z, w]quaternion
[x, y, z, w]Returns the matrix
being recomposed.
Builds a translation matrix, then applies the quaternion rotation and perspective. The matrix is then multiplied by YZ shear, then XZ shear, then XY shear (if they are non-zero). Finally multiplied by scale to get the resulting recomposed matrix.
MIT, see LICENSE.md for details.
FAQs
recomposes a 4x4 matrix
The npm package mat4-recompose receives a total of 12,269 weekly downloads. As such, mat4-recompose popularity was classified as popular.
We found that mat4-recompose demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
Hacker Demonstrates How Easy It Is To Steal Data From Popular Password Managers
Security News
Oxlint’s new preview brings type-aware linting powered by typescript-go, combining advanced TypeScript rules with native-speed performance.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.