Closed thednp closed 8 years ago
If you want to learn about this stuff, I’d take a look at the CSS Transform specification (and perhaps Graphics Gems). The 2D matrix is decomposed into x- and y-translation, rotation, x-skew and x- and y-scale. The reason that y-skew is not part of that list is that it is redundant given that the decomposition already includes the other factors.
That said, this implementation was originally based on an earlier version of the specification for 3D transform interpolation, back when the specification did not provide as much detail for decomposing and interpolating 2D transforms (see d3/d3@e3f6f33b3d6e8845ad47dc069a00b985e9d569e9). It looks like my implementation is slightly different than the specification for some edge cases, and it might be worth verifying consistent behavior. I’ll file a separate issue for that.
Thanks so much for your time to reply.
I was wondering if I can learn something from your interpolation methods and I found
skewY
to be missing. I ask because I want to sharpen my scripting; I want to develop a unified methods to do HTML & SVG animation (if SVG do the transform attribute with the below codes, else do the HTML).You know regular HTML elements do use
skewY
and I don't understand why you decided not to use it for D3 functions as well. D3 is above and beyond me and any other scripting there is for SVG, so I'm here to learn, I hope I can find some help here or in SO website.As of now, we have in the
decompose.js
:As for
skewX
we havesimilar for
skewY
In the
index.js
we haveskewX
Could this mean that
skewY
would look like this?Please, are the decomposition and interpolation functions correct for 'skewY' in the above?