chenglou / chenglou/react-motion

Accessing velocity in children-function

Open
#219 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

Hi Cheng
Firstly, Awesome library! I've been having a lot of fun with it the past few days :smile:

So, I had the idea that the current velocity of a animated property is a nice value to animate specific css-properties with. However I haven't been able to acces the velocity using the current api. (Maybe, I have just overlooked something.)

So I forked react-motion and crudely exposed the velocities in StaggeredMotion's children-function as a second argument and tried driving translateZ and box-shadow with the current velocity
I'm pretty happy with the [result](https://b0513122f4e33807f0e8db82fdcbf846d3cad11e-www.googledrive.com/host/0BwUo2j-YQKKoRUNiSzhBMkFfMVE), but I feel like my approach is too difficult..

I'd love it to have your opinion on this. :)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the current StaggeredMotion children-function API and compare it with the issue author's forked behavior. Done means the current velocity is exposed through a documented API and can be used to drive related animated properties.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
api, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.