Skip to content

Commit daf81ac

Browse files
authored
Merge pull request #17 from blazejkustra/feat/new-shader-examples
feat(example): add Thanos dissolve, AI Orb, AI Shimmer, AI Voice and Holo Foil examples
2 parents aec4b78 + 57e2a22 commit daf81ac

31 files changed

Lines changed: 1923 additions & 7 deletions

example/app.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@
2929
"minSdkVersion": 26
3030
}
3131
}
32+
],
33+
[
34+
"react-native-audio-api",
35+
{
36+
"iosMicrophonePermission": "RN Effects uses the microphone so the shaders react to your voice."
37+
}
3238
]
3339
]
3440
}
53.5 KB
Loading
52.9 KB
Loading
728 KB
Loading
-211 Bytes
Binary file not shown.

example/assets/components/holo.png

-64.1 KB
Loading
495 KB
Loading
253 KB
Loading

example/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@
1515
"@react-navigation/native-stack": "7.16.0",
1616
"expo": "~56.0.9",
1717
"expo-build-properties": "~56.0.17",
18+
"expo-sensors": "~56.0.5",
1819
"react": "19.2.3",
1920
"react-native": "0.85.3",
21+
"react-native-audio-api": "^0.12.2",
2022
"react-native-effects": "workspace:*",
2123
"react-native-gesture-handler": "~2.31.1",
2224
"react-native-reanimated": "4.3.1",

example/src/App.tsx

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
// App.tsx
2-
import { NavigationContainer } from '@react-navigation/native';
2+
import {
3+
NavigationContainer,
4+
DefaultTheme,
5+
type Theme,
6+
} from '@react-navigation/native';
37
import { createNativeStackNavigator } from '@react-navigation/native-stack';
48
import { Platform, StyleSheet } from 'react-native';
59
import { GestureHandlerRootView } from 'react-native-gesture-handler';
@@ -19,14 +23,32 @@ import HoloCardScreen from './screens/HoloCardScreen';
1923
import WeatherScreen from './screens/WeatherScreen';
2024
import ScrollReactiveScreen from './screens/ScrollReactiveScreen';
2125
import TouchFieldScreen from './screens/TouchFieldScreen';
26+
import ThanosScreen from './screens/ThanosScreen';
27+
import AiShimmerScreen from './screens/AiShimmerScreen';
28+
import AiOrbScreen from './screens/AiOrbScreen';
29+
import AiVoiceScreen from './screens/AiVoiceScreen';
30+
import HoloFoilScreen from './screens/HoloFoilScreen';
2231
import type { RootStackParamList } from './types';
2332

2433
const Stack = createNativeStackNavigator<RootStackParamList>();
2534

35+
// Dark theme so the surface revealed behind/around the cards during a stack
36+
// transition is black, not React Navigation's default light grey (which flashed
37+
// white at the screen edges while sliding).
38+
const navTheme: Theme = {
39+
...DefaultTheme,
40+
dark: true,
41+
colors: {
42+
...DefaultTheme.colors,
43+
background: '#000',
44+
card: '#000',
45+
},
46+
};
47+
2648
export default function App() {
2749
return (
2850
<GestureHandlerRootView style={styles.root}>
29-
<NavigationContainer>
51+
<NavigationContainer theme={navTheme}>
3052
<Stack.Navigator
3153
screenOptions={{
3254
headerShown: false,
@@ -75,6 +97,11 @@ export default function App() {
7597
component={ScrollReactiveScreen}
7698
/>
7799
<Stack.Screen name="TouchFieldExample" component={TouchFieldScreen} />
100+
<Stack.Screen name="ThanosExample" component={ThanosScreen} />
101+
<Stack.Screen name="AiShimmerExample" component={AiShimmerScreen} />
102+
<Stack.Screen name="AiOrbExample" component={AiOrbScreen} />
103+
<Stack.Screen name="AiVoiceExample" component={AiVoiceScreen} />
104+
<Stack.Screen name="HoloFoilExample" component={HoloFoilScreen} />
78105
</Stack.Navigator>
79106
</NavigationContainer>
80107
</GestureHandlerRootView>
@@ -84,5 +111,6 @@ export default function App() {
84111
const styles = StyleSheet.create({
85112
root: {
86113
flex: 1,
114+
backgroundColor: '#000',
87115
},
88116
});

0 commit comments

Comments
 (0)