rive-app / rive-app/rive-react-native
Animation is not smooth on first fire
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 783
- Forks
- 81
- Avg merge
- 3d 6h
- Merged PRs (30d)
- 3
Description
Description
I just installed the Rive to test it out on Android, it's working but not as expected.
So in Rive's Discord i found a dark mode switch project which is here
Dark mode switch
My knowledge about Rive is quite limited so simply i wanted to create a dark switch with a onPress event.
so when I press for first time the switch is switching but not with animation, after second click its starting to work as expected.
<TouchableOpacity
onPress={() => {
setIsDark(!isDark);
riveRef.current.setInputState("State Machine 1", "isDark", isDark);
}}
autoplay={true}
style={{width: 100, height: 50}}
>
<Text>FIRE</Text>
</TouchableOpacity>
<Rive
ref={riveRef}
resourceName="dark"
style={{width: "100%", height: 40}}
autoplay={false}
/>
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The report names no source file or test. Start by reproducing the provided React Native example and compare the first and second calls to setInputState; done means the first press triggers the dark-mode animation as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100