Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid cubic bezier formula #10

Open
tmaxmax opened this issue Apr 23, 2020 · 2 comments
Open

Invalid cubic bezier formula #10

tmaxmax opened this issue Apr 23, 2020 · 2 comments

Comments

@tmaxmax
Copy link

tmaxmax commented Apr 23, 2020

Something I have noticed is that the formula you use for determining the Bezier easing percentage isn't valid.

The formula finds either the horizontal or vertical coordinate of a point on the Cubic Bezier curve. Although it is correct, you are mixing the coordinates, using both coordinates of the control points, instead of only one. This error results in an incorrect completion percentage of the animation.

I would suggest using a separate implementation of the Cubic Bezier easing curves if you wish to keep this feature or use only the timing functions for easing.

@PASHANSX
Copy link

PASHANSX commented Apr 27, 2020

+++

var config = {
        'scrollableDomEle': window,
	'duration': 1500,
	'direction': "bottom",
	'scrollAmount': 1400,
	'cubicBezierPoints': {
		'x1': 0.42,
		'y1': 0,
		'x2': 0.58,
		'y2': 1
	}
};

@tarundugar
Copy link
Contributor

will check on this, thanks!

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

No branches or pull requests

3 participants