Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
igroomgrim authored Nov 21, 2016
1 parent fc63ed7 commit e74fc29
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,39 @@
# CATransform3D-in-Swift
Basics example of using CATransform3D functions in Swift

## Example App
<img alt="CATransform3D Example" width=280 src="https://github.com/igroomgrim/CATransform3D-in-Swift/blob/master/catransfrom3d_ex3.png"/>
<img alt="CATransform3D Example" width=280 src="https://github.com/igroomgrim/CATransform3D-in-Swift/blob/master/catransfrom3d_ex1.png"/>
<img alt="CATransform3D Example" width=280 src="https://github.com/igroomgrim/CATransform3D-in-Swift/blob/master/catransfrom3d_ex2.png"/>

## 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/
- [email protected]

0 comments on commit e74fc29

Please sign in to comment.