简体   繁体   English

Matrix3d属性值和其他

[英]Matrix3d propertyValues and beyond

Basically, what I'm trying to do, is store the transform value of an element, manipulate & update it... 基本上,我想做的是存储元素的转换值,对其进行操作和更新...

I'm looking for some js function-methods that can destructure the matrix3d value into it's initial transform properties. 我正在寻找一些可以将matrix3d值解构为其初始转换属性的js函数方法。


I've looked into webkitcssmatrix but that's limited and I can't quite figure out the outcome.. 我已经研究过webkitcssmatrix了,但是那是有限的,我还不太清楚结果。

this is the briefest explanation I've found on what the matrix3d is: 这是我发现的有关matrix3d的最简短的解释:

  [1,0,0,0], [0,cos(a), sin(-a), 0], [0,sin(a), cos( a), 0], [0,0,0,1] 

I also found an unmatrix in C (maybe it can be useful...) 我还发现了C中的一个非矩阵 (也许可能有用...)

It is hard to decompose such matrix because it may be built of many sequential transformations, such as translation, rotation, scaling, skewing, rotation again etc. You may decompose it into basic transformations(which unmatrix.c does) but they might not be initial ones. 很难分解这种矩阵,因为它可能是由许多顺序的变换构成的,例如平移,旋转,缩放,倾斜,再次旋转等。您可以将其分解为基本变换(unmatrix.c可以做到),但它们可能不是最初的。 And there is definitely no built-in function in JavaScript. 而且JavaScript中绝对没有内置函数。

If you know there is only one transformation applied and you know what type it is you may decompose matrices as they described here for example. 如果您知道仅应用了一个变换,并且知道它是什么类型,则可以分解矩阵,例如此处所述。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM