Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for matrix decompose and compose #136

Closed
sanjayc77 opened this issue Sep 22, 2014 · 4 comments
Closed

Add support for matrix decompose and compose #136

sanjayc77 opened this issue Sep 22, 2014 · 4 comments

Comments

@sanjayc77
Copy link

Based on CSS3 transform spec:

http://www.w3.org/TR/css3-transforms/#decomposing-a-3d-matrix
It also describes decomposing 2d matrix.

While we are at it, maybe support composing matrices given its component parts (translation, rotation, skew, perspective, etc).

Chromium also has an implementation in C++:
https://github.com/ChromiumWebApps/chromium/blob/master/ui/gfx/transform_util.cc

@stefnotch
Copy link
Collaborator

These function have been implemented.

@gonnavis
Copy link

@stefnotch Hello, thank you very much for your work!

I saw decompose have been implemented, but compose not yet?

@stefnotch
Copy link
Collaborator

stefnotch commented Dec 31, 2021

@gonnavis See https://glmatrix.net/docs/module-mat4.html#.fromRotationTranslationScale and other matrix functions. To compose them, you multiply them.

The only thing that I think isn't in there is skew. There was a pull request to add it a while back, but nothing happened since then. I suppose skewing is a quite rare operation.

@gonnavis
Copy link

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants