-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Description
So I've done a first draft of some Matrix2D tests (I'll link the code in a second).
My main issues are that the decomposition test is unverified (i.e. I did the comparison calculations in easeljs, so obviously it's going to pass at this point) and that the EaselJS skew isn't working in the same was as my calculations.
easeljs skew method:
p.skew = function(skewX, skewY) {
skewX = skewX*Matrix2D.DEG_TO_RAD;
skewY = skewY*Matrix2D.DEG_TO_RAD;
this.append(Math.cos(skewY), Math.sin(skewY), -Math.sin(skewX), Math.cos(skewX), 0, 0);
return this;
};
whereas I was using tans, which in easel would be
p.skew = function(skewX, skewY) {
skewX = skewX*Matrix2D.DEG_TO_RAD;
skewY = skewY*Matrix2D.DEG_TO_RAD;
this.append(1, Math.tan(skewY), Math.tan(skewX),1, 0, 0);
return this;
};
This is how it is done in CSS
They appear to give somewhat similar results except that the cos/sin method does add a scaling component.
Thoughts? I can just change to the cos/sin method if there's a reason for it.
Metadata
Metadata
Assignees
Labels
No labels