Skip to content

Commit e4c2f7d

Browse files
committed
add 2nd animation to break
1 parent d2682d5 commit e4c2f7d

File tree

5 files changed

+38
-57
lines changed

5 files changed

+38
-57
lines changed

App.tsx

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,48 @@
11
import { 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

45
export 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

1231
const 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+
});

RiveTest.tsx

Lines changed: 0 additions & 49 deletions
This file was deleted.

assets/large-animation.riv

7.39 MB
Binary file not shown.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
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",

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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

49374937
run-parallel@^1.1.9:
49384938
version "1.2.0"

0 commit comments

Comments
 (0)