Skip to content

Commit 2659b21

Browse files
committed
feat: bump native versions for scripting support
1 parent 0068df8 commit 2659b21

File tree

6 files changed

+53
-7
lines changed

6 files changed

+53
-7
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
Rive React Native Scripting Example
3+
4+
Resources:
5+
- Rive Scripting: https://rive.app/docs/scripting
6+
*/
7+
8+
import { SafeAreaView, ScrollView, StyleSheet } from 'react-native';
9+
import Rive, { Alignment, AutoBind, Fit } from 'rive-react-native';
10+
11+
export default function DemoScripting() {
12+
return (
13+
<SafeAreaView style={styles.safeAreaViewContainer}>
14+
<ScrollView contentContainerStyle={styles.container}>
15+
<Rive
16+
fit={Fit.Contain}
17+
alignment={Alignment.Center}
18+
style={styles.animation}
19+
autoplay={true}
20+
dataBinding={AutoBind(true)}
21+
source={require('../../assets/rive/blinko.riv')}
22+
/>
23+
</ScrollView>
24+
</SafeAreaView>
25+
);
26+
}
27+
28+
const styles = StyleSheet.create({
29+
safeAreaViewContainer: {
30+
flex: 1,
31+
},
32+
container: {
33+
flexGrow: 1,
34+
alignItems: 'center',
35+
justifyContent: 'center',
36+
},
37+
animation: {
38+
width: '100%',
39+
height: 300,
40+
},
41+
});

example/app/_layout.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ function RootLayoutNav() {
6767
name="(examples)/Simple"
6868
options={{ title: 'Simple' }}
6969
/>
70+
<Stack.Screen
71+
name="(examples)/DemoScripting"
72+
options={{ title: 'Demo Scripting' }}
73+
/>
7074
<Stack.Screen
7175
name="(examples)/DataBinding"
7276
options={{ title: 'DataBinding' }}

example/app/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export default function Home() {
2323
<ScrollView contentContainerStyle={styles.container}>
2424
<StyledLink href="/(examples)/QuickStart">Quick Start</StyledLink>
2525
<StyledLink href="/(examples)/Simple">Simple</StyledLink>
26+
<StyledLink href="/(examples)/DemoScripting">Demo Scripting</StyledLink>
2627
<StyledLink href="/(examples)/DataBinding">Data Binding</StyledLink>
2728
<StyledLink href="/(examples)/Http">HTTP</StyledLink>
2829
<StyledLink href="/(examples)/MeshExample">Mesh Example</StyledLink>

example/assets/rive/blinko.riv

2.56 MB
Binary file not shown.

example/ios/Podfile.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1690,10 +1690,10 @@ PODS:
16901690
- React-logger (= 0.76.7)
16911691
- React-perflogger (= 0.76.7)
16921692
- React-utils (= 0.76.7)
1693-
- rive-react-native (9.7.0):
1693+
- rive-react-native (9.7.1):
16941694
- React-Core
1695-
- RiveRuntime (= 6.12.3)
1696-
- RiveRuntime (6.12.3)
1695+
- RiveRuntime (= 6.13.0)
1696+
- RiveRuntime (6.13.0)
16971697
- RNCPicker (2.11.0):
16981698
- DoubleConversion
16991699
- glog
@@ -2222,8 +2222,8 @@ SPEC CHECKSUMS:
22222222
React-utils: 0342746d2cf989cf5e0d1b84c98cfa152edbdf3f
22232223
ReactCodegen: e1c019dc68733dd2c5d3b263b4a6dc72002c0045
22242224
ReactCommon: 81e0744ee33adfd6d586141b927024f488bc49ea
2225-
rive-react-native: 85786a4ed5937b0b11bb841989ee30467dbcefb2
2226-
RiveRuntime: ecde073222c6279c6f7f439132ac7f0a461b344b
2225+
rive-react-native: 368b57cf974b87f309819be2f59c433876010e4a
2226+
RiveRuntime: 903690a5ba698b2a7e8d462e8aa7ceeba862614c
22272227
RNCPicker: c657bd58a82b164a957812f82a0b4bab4245de2e
22282228
RNGestureHandler: 16ef3dc2d7ecb09f240f25df5255953c4098819b
22292229
RNReanimated: a2692304a6568bc656c04c8ffea812887d37436e

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"name": "rive-react-native",
33
"version": "9.7.1",
44
"runtimeVersions": {
5-
"ios": "6.12.3",
6-
"android": "10.5.3"
5+
"ios": "6.13.0",
6+
"android": "11.1.0"
77
},
88
"workspaces": [
99
"example"

0 commit comments

Comments
 (0)