Last active
March 2, 2017 05:05
-
-
Save ochanje210/a39330df8df5d154162acb5e036730fa to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| handlePanResponderMove (e, gestureState) { | |
| const {dx, dy} = gestureState; | |
| const sideLength = 100; | |
| const origin = {x: 0, y: 0, z: -sideLength / 2}; | |
| let matrix = this.rotateX(dx, dy); | |
| // from https://gist.github.com/jmurzy/0d62c0b5ea88ca806c16b5e8a16deb6a#file-foldview-transformutil-transformorigin-js | |
| transformOrigin(matrix, origin); | |
| this.refView.setNativeProps({style: {transform: [{perspective: 1000}, {matrix: matrix}]}}); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment