chenglou / chenglou/react-motion

Continously rotating without jumps between tours

Open
#608 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
21.9k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

I'm trying to achieve a very simple thing, rotating a square continuously without a jump between 2 tours.
I want to keep control of the position and therefore I don't want to use the loop property available in the different hooks.

I created a codesandbox to explain the current situation : https://codesandbox.io/s/twilight-http-l0jm0?file=/src/App.js

As you can see when it goes forward 360 degrees, it's animating all the way back to go to 0.
I suppose this is the expected behaviour. Thus, my question is, is there any way to smoothly animate between 2 rotation tours instead of animating all the way back?

Thanks in advance!

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the linked CodeSandbox at /src/App.js and reproduce the rotation behavior described in the issue. Investigate the relevant animation hooks and determine whether two 360-degree tours can run continuously without using the loop property; done means the square rotates without jumping backward while position remains controllable.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.