-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor settings for multi-jinni support and update rendering image …
…for new api url config
- Loading branch information
1 parent
bd0f57c
commit 50645c5
Showing
16 changed files
with
400 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import React, { useEffect } from 'react'; | ||
import Animated, { useAnimatedStyle, useSharedValue, withSpring } from 'react-native-reanimated'; | ||
|
||
import { AvatarViewer } from 'components/index'; | ||
import DefaultAvatar from 'assets/avatars/red-yellow-egg'; | ||
|
||
const AvatarViewerDefault = () => { | ||
const eggRollAngle = useSharedValue(30); | ||
const eggAnimatedStyles = useAnimatedStyle(() => ({ | ||
transform: [{ rotate: `${eggRollAngle.value}deg` }], | ||
})); | ||
|
||
useEffect(() => { | ||
const intervalId = setInterval(() => { | ||
const otherSide = eggRollAngle.value < 0 ? 30 : -30; | ||
eggRollAngle.value = withSpring(otherSide, { | ||
duration: 2000, // 4 sec side to side, | ||
dampingRatio: 0.4, | ||
stiffness: 33, | ||
overshootClamping: false, | ||
restDisplacementThreshold: 0.01, | ||
restSpeedThreshold: 15.58, | ||
}); | ||
}, 2500); | ||
return () => clearInterval(intervalId); | ||
}); | ||
|
||
return ( | ||
<Animated.View style={[eggAnimatedStyles]}> | ||
<AvatarViewer SVG={DefaultAvatar} /> | ||
</Animated.View> | ||
); | ||
}; | ||
|
||
export default AvatarViewerDefault; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.