mat4-decompose

WebJar for mat4-decompose

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

mat4-decompose
Last Version

Last Version

1.0.4
Release Date

Release Date

Type

Type

jar
Description

Description

mat4-decompose
WebJar for mat4-decompose
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/mattdesl/mat4-decompose

Download mat4-decompose

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/mat4-decompose/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>mat4-decompose</artifactId>
    <version>1.0.4</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/mat4-decompose/
implementation 'org.webjars.npm:mat4-decompose:1.0.4'
// https://jarcasting.com/artifacts/org.webjars.npm/mat4-decompose/
implementation ("org.webjars.npm:mat4-decompose:1.0.4")
'org.webjars.npm:mat4-decompose:jar:1.0.4'
<dependency org="org.webjars.npm" name="mat4-decompose" rev="1.0.4">
  <artifact name="mat4-decompose" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='mat4-decompose', version='1.0.4')
)
libraryDependencies += "org.webjars.npm" % "mat4-decompose" % "1.0.4"
[org.webjars.npm/mat4-decompose "1.0.4"]

Dependencies

compile (2)

Group / Artifact Type Version
org.webjars.npm : gl-mat4 jar [1.0.1,2)
org.webjars.npm : gl-vec3 jar [1.0.2,2)

Project Modules

There are no modules declared in this project.

mat4-decompose

stable

Decomposes a 3D matrix, useful for animations. Code ported from W3 CSS Spec. PRs for more tests/robustness/optimizations welcome.

Order:

  • first isolates perspective
  • then determines translation
  • then determines X scale, XY shear, Y scale, XZ and YZ shear, and Z scale
  • then determines quaternion rotation

You may also be interested in mat4-interpolate, mat4-recompose, and css-mat4.

Usage

NPM

valid = decompose(matrix[, translation, scale, skew, perspective, quaternion])

Decomposes the given matrix (an array of 16 floats, like those gl-matrix operates on), storing the results into the specified optional vectors.

  • translation [x, y, z]
  • scale [x, y, z]
  • skew [xy, xz, yz] skew factors
  • perspective [x, y, z, w]
  • quaternion [x, y, z, w]

Returns false is this matrix cannot be decomposed, true otherwise.

License

MIT, see LICENSE.md for details.

Versions

Version
1.0.4