From e74fc29c1b91108df448eac4b266a42953e87729 Mon Sep 17 00:00:00 2001 From: Anak Mirasing Date: Tue, 22 Nov 2016 01:17:42 +0700 Subject: [PATCH] Update README.md --- README.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/README.md b/README.md index aaee219..714371a 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,39 @@ # CATransform3D-in-Swift Basics example of using CATransform3D functions in Swift + +## Example App +CATransform3D Example +CATransform3D Example +CATransform3D Example + +## Exploring ? :D +* 3D transformations in X,Y,Z axis +* Moving the anchor point from default (0.5,0.5) +* Set m34 (matrix element in the 3rd row at the 4th column) for your z-axis perspective +* 4x4 Matrix for 3D Spaces +* +```swift +// 4x4 Matrix +[X][0][0][0] +[0][Y][0][0] +[0][0][Z][0] +[0][0][0][1] + +// Structure in Swift +public struct CATransform3D { + public init(m11: CGFloat, m12: CGFloat, m13: CGFloat, m14: CGFloat, + m21: CGFloat, m22: CGFloat, m23: CGFloat, m24: CGFloat, + m31: CGFloat, m32: CGFloat, m33: CGFloat, m34: CGFloat, + m41: CGFloat, m42: CGFloat, m43: CGFloat, m44: CGFloat) +} +``` + +## Contact Me + +Anak Mirasing + +- https://github.com/igroomgrim +- https://www.linkedin.com/in/anakmirasing +- https://twitter.com/igroomgrim +- http://www.igroomgrim.com/ +- thaihooligan@hotmail.com