who the hell knows
parent
4e9e92f976
commit
87245480d4
|
@ -2,6 +2,7 @@ import React, {useCallback, useEffect} from 'react'
|
||||||
import {View, StyleSheet, Image as RNImage} from 'react-native'
|
import {View, StyleSheet, Image as RNImage} from 'react-native'
|
||||||
import * as SplashScreen from 'expo-splash-screen'
|
import * as SplashScreen from 'expo-splash-screen'
|
||||||
import {Image} from 'expo-image'
|
import {Image} from 'expo-image'
|
||||||
|
import {platformApiLevel} from 'expo-device'
|
||||||
import Animated, {
|
import Animated, {
|
||||||
interpolate,
|
interpolate,
|
||||||
runOnJS,
|
runOnJS,
|
||||||
|
@ -136,34 +137,51 @@ export function Splash(props: React.PropsWithChildren<Props>) {
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<MaskedView
|
{platformApiLevel && platformApiLevel <= 27 ? (
|
||||||
style={[StyleSheet.absoluteFillObject]}
|
<>
|
||||||
maskElement={
|
{!isAnimationComplete && (
|
||||||
<Animated.View
|
<View
|
||||||
style={[
|
style={[
|
||||||
StyleSheet.absoluteFillObject,
|
StyleSheet.absoluteFillObject,
|
||||||
{
|
{backgroundColor: 'white'},
|
||||||
// Transparent background because mask is based off alpha channel.
|
]}
|
||||||
backgroundColor: 'transparent',
|
/>
|
||||||
flex: 1,
|
)}
|
||||||
justifyContent: 'center',
|
<Animated.View style={[{flex: 1}, appAnimation]}>
|
||||||
alignItems: 'center',
|
{props.children}
|
||||||
transform: [{translateY: -(insets.top / 2)}, {scale: 0.1}], // scale from 1000px to 100px
|
|
||||||
},
|
|
||||||
]}>
|
|
||||||
<AnimatedLogo style={[logoAnimations]} />
|
|
||||||
</Animated.View>
|
</Animated.View>
|
||||||
}>
|
</>
|
||||||
{!isAnimationComplete && (
|
) : (
|
||||||
<View
|
<MaskedView
|
||||||
style={[StyleSheet.absoluteFillObject, {backgroundColor: 'white'}]}
|
style={[StyleSheet.absoluteFillObject]}
|
||||||
/>
|
maskElement={
|
||||||
)}
|
<Animated.View
|
||||||
|
style={[
|
||||||
<Animated.View style={[{flex: 1}, appAnimation]}>
|
{
|
||||||
{props.children}
|
// Transparent background because mask is based off alpha channel.
|
||||||
</Animated.View>
|
backgroundColor: 'transparent',
|
||||||
</MaskedView>
|
flex: 1,
|
||||||
|
justifyContent: 'center',
|
||||||
|
alignItems: 'center',
|
||||||
|
transform: [{translateY: -(insets.top / 2)}, {scale: 0.1}], // scale from 1000px to 100px
|
||||||
|
},
|
||||||
|
]}>
|
||||||
|
<AnimatedLogo style={[logoAnimations]} />
|
||||||
|
</Animated.View>
|
||||||
|
}>
|
||||||
|
{!isAnimationComplete && (
|
||||||
|
<View
|
||||||
|
style={[
|
||||||
|
StyleSheet.absoluteFillObject,
|
||||||
|
{backgroundColor: 'white'},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
<Animated.View style={[{flex: 1}, appAnimation]}>
|
||||||
|
{props.children}
|
||||||
|
</Animated.View>
|
||||||
|
</MaskedView>
|
||||||
|
)}
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue