File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed
Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 11import React , { Component } from 'react' ;
2- import withAnimationFrame from 'react-animation-frame' ;
2+ import withAnimationFrame from '@panter/ react-animation-frame' ;
33
44import { NativeModules , Animated } from 'react-native' ;
55
@@ -13,7 +13,7 @@ const ARSprite = withAnimationFrame(
1313 super ( props ) ;
1414 this . state = {
1515 zIndex : new Animated . Value ( ) ,
16- pos2D : new Animated . ValueXY ( ) , // inits to zero
16+ pos2D : new Animated . ValueXY ( ) // inits to zero
1717 } ;
1818 }
1919 onAnimationFrame ( ) {
@@ -22,9 +22,9 @@ const ARSprite = withAnimationFrame(
2222 {
2323 x : this . state . pos2D . x ,
2424 y : this . state . pos2D . y ,
25- z : this . state . zIndex ,
26- } ,
27- ] ) ,
25+ z : this . state . zIndex
26+ }
27+ ] )
2828 ) ;
2929 }
3030
@@ -34,18 +34,18 @@ const ARSprite = withAnimationFrame(
3434 style = { {
3535 position : 'absolute' ,
3636 transform : this . state . pos2D . getTranslateTransform ( ) ,
37- ...this . props . style ,
37+ ...this . props . style
3838 } }
3939 >
4040 { this . props . children }
4141 </ Animated . View >
4242 ) ;
4343 }
44- } ,
44+ }
4545) ;
4646
4747ARSprite . propTypes = {
48- position,
48+ position
4949} ;
5050
5151module . exports = ARSprite ;
Original file line number Diff line number Diff line change 2020 "lodash" : " ^4.17.4" ,
2121 "prop-types" : " ^15.5.7" ,
2222 "react" : " 16.0.0-alpha.12" ,
23- "react-animation-frame" : " ^0.3.5 "
23+ "@panter/ react-animation-frame" : " ^0.3.6 "
2424 },
2525 "devDependencies" : {
2626 "babel-eslint" : " ^7.2.3" ,
You can’t perform that action at this time.
0 commit comments