Skip to content

Comments

Add css-ease-approx#7

Open
axyz wants to merge 4 commits intomattdesl:masterfrom
axyz:patch-1
Open

Add css-ease-approx#7
axyz wants to merge 4 commits intomattdesl:masterfrom
axyz:patch-1

Conversation

@axyz
Copy link

@axyz axyz commented Jul 8, 2017

Hi,
I've found this css ease (cubic-bezier(.25,.1,.25,1)) approximation.
source: https://github.com/mietek/ease-tween/blob/master/src/index.js#L26

I think it is a nice to have in order to be able to reproduce most of the css transition default easing in pure JS.
Of course for a 1:1 matching would be probably better to use https://github.com/gre/bezier-easing
but in most use cases the often more lightweight mathematically perfect alternative will probably be close enough.

This is the opposite case: an exponential approximation of the cubic-bezier result used by default on css, I didn't found a possible "original" curve that cubic-bezier(.25,.1,.25,1) may be trying to approximate, but if you have more knowledge on the topic or you have better ideas to get similar results being light on the CPU please let me know.

@axyz axyz changed the title Patch 1 Add css-ease-approx Jul 8, 2017
@sylvesteraswin
Copy link

+1

1 similar comment
@ytanruengsri
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants