-
-
Save itsmikita/d2566516a4a5310d7447 to your computer and use it in GitHub Desktop.
CATransform3D matrix with values explained
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CATransform3D transformation = CATransform3DIdentity; | |
// x line | |
transformation.m11 = 1; // 20% less wide wall | |
transformation.m12 = 0; //-1 / 10.0; // skews left up, right down if >0 | |
transformation.m13 = 0; // extends sideways for a short time | |
transformation.m14 = 0;// // 1 / 5000 = left side towards viewer, right side away from viewer | |
// y line | |
transformation.m21 = 0; //-1 / 2.0; // skews bottom left, top right if <0 | |
transformation.m22 = 1; // .8 - 20% less tall | |
transformation.m23 = 0; // extends upward for a short time | |
transformation.m24 = 0;//1 / 500.0; // 1 / 500.0 = top towards the viewer | |
// z line | |
transformation.m31 = 0; | |
transformation.m32 = 0; | |
transformation.m33 = 1; // 1 makes no change | |
transformation.m34 = 0; | |
// repositioning all axis | |
transformation.m41 = 0; //-40; // >0 pushes on x-axis right | |
transformation.m42 = 0; //-20; // >0 pushes on y-axis down | |
transformation.m43 = 0; // pushes on z-axis | |
transformation.m44 = 1; // 0.8 - makes the layer disappear |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment