question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Degrees/radians become undefined when repeating a rotate transition

See original GitHub issue

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I have put the details for this on issue #217. I can close this issue once #217 is reopened.

Expected Behavior

No response

Steps To Reproduce

afds

Versions

Moti: 0.18.0
Reanimated: 2.5.0
React Native: 0.68.0

Screenshots

No response

Reproduction

http://localhost:6006/?path=/story/components-spinner--with-back-ground

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
nandorojocommented, Sep 6, 2022

good find. that would certainly be a reanimated issue. could you open an issue / PR there?

0reactions
nandorojocommented, Nov 19, 2022
import Animated, { useAnimatedStyle, withTiming, useSharedValue } from 'react-native-reanimated'

export default function App() {
  const rotate = useSharedValue('0deg')
  const style = useAnimatedStyle(() => ({
    transform: [{ rotate: withTiming(rotate.value) }]
  }))

  const onPress = () => {
     rotate.value = rotate.value == '0deg' ? '360deg' : '0deg'
  }

  return <Animated.View style={style} />
}

Does this give you what you need? Would like to close this out or find a fix ideally. Thanks @clayrisser!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · nandorojo/moti - GitHub
The React Native (+ Web) animation library, powered by Reanimated 2. ... Degrees/radians become undefined when repeating a rotate transition.
Read more >
Make a object rotate back to origin in three js - Stack Overflow
I hope I'm understanding your objective properly but to me it seems that there may be some confusion with degrees and radians as...
Read more >
Ruby extension group-rotation question - SketchUp Community
the rotation operation needs an angle in radians. 45 degrees = PI * 45 / 180. You can simply type 45.degrees to get...
Read more >
The Cotangent Function - TechnologyUK
It then transitions to its negative peak, returning to zero at one hundred and eighty degrees before repeating the cycle again.
Read more >
Radian Measure Given any circle with radius r, if θ is a central ...
If the terminal side of the angle is obtained via a clockwise rotation, we have a negative angle. Using this definition, it is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found