File tree Expand file tree Collapse file tree 5 files changed +38
-57
lines changed
Expand file tree Collapse file tree 5 files changed +38
-57
lines changed Original file line number Diff line number Diff line change 11import { StyleSheet , Text , View } from 'react-native' ;
2- import { RiveTest } from './RiveTest' ;
2+ import { RiveAnimation } from './ios/RiveAnimation' ;
3+ import { Alignment , Fit , type RNRiveError } from 'rive-react-native' ;
34
45export default function App ( ) {
56 return (
67 < View style = { styles . container } >
7- < RiveTest />
8+ < RiveAnimation
9+ source = { require ( './assets/main_menu.riv' ) }
10+ autoplay = { true }
11+ fit = { Fit . FitWidth }
12+ alignment = { Alignment . BottomCenter }
13+ style = { styles . box }
14+ onError = { ( riveError : RNRiveError ) => {
15+ console . log ( riveError ) ;
16+ } }
17+ />
18+ < RiveAnimation
19+ fit = { Fit . Cover }
20+ alignment = { Alignment . Center }
21+ style = { styles . animation }
22+ autoplay = { true }
23+ artboardName = "AI LOOP"
24+ source = { require ( "./assets/large-animation.riv" ) }
25+ />
826 </ View >
927 ) ;
28+
1029}
1130
1231const styles = StyleSheet . create ( {
1332 container : {
1433 flex : 1 ,
1534 alignItems : 'center' ,
1635 justifyContent : 'center' ,
36+ backgroundColor : 'black' ,
1737 } ,
18- } ) ;
38+ box : {
39+ width : '100%' ,
40+ height : 500 ,
41+ marginVertical : 20 ,
42+ } ,
43+ animation : {
44+ width : "100%" ,
45+ height : "100%" ,
46+ position : "absolute" ,
47+ } ,
48+ } ) ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1414 "expo-status-bar" : " ~2.0.1" ,
1515 "react" : " 18.3.1" ,
1616 "react-native" : " 0.76.6" ,
17- "rive-react-native" : " ^9.2.0 "
17+ "rive-react-native" : " ^9.2.1 "
1818 },
1919 "devDependencies" : {
2020 "@babel/core" : " ^7.25.2" ,
Original file line number Diff line number Diff line change @@ -4929,10 +4929,10 @@ rimraf@~2.6.2:
49294929 dependencies :
49304930 glob "^7.1.3"
49314931
4932- rive-react-native@^9.2.0 :
4933- version "9.2.0 "
4934- resolved "https://registry.yarnpkg.com/rive-react-native/-/rive-react-native-9.2.0 .tgz#1cd8ed5fa3fd53cbaacdf42f57707d45de8366ca "
4935- integrity sha512-xDc2F7RnleBt2Rur3OP4j8+kir2C0tAHH4kug5jkfRsY4/9qBsrpnNfClbsq5EqDPCEqAz4jeZNkMqIChJRpTQ ==
4932+ rive-react-native@^9.2.1 :
4933+ version "9.2.1 "
4934+ resolved "https://registry.yarnpkg.com/rive-react-native/-/rive-react-native-9.2.1 .tgz#0b7841cfd5f42acd7e0e5bc4f1fb77d9e01762e9 "
4935+ integrity sha512-OcCh5EXl69nCsu8OrmaJ5VNFapaLs9stVIeyKZV/v36TJXGeXNdgado5H88cfJ8s/BBfA3DqRgEYF6HwLdew8A ==
49364936
49374937run-parallel@^1.1.9 :
49384938 version "1.2.0"
You can’t perform that action at this time.
0 commit comments