theatre-js / theatre

Motion design editor for the web
https://www.theatrejs.com
Apache License 2.0
10.82k stars 337 forks source link

Bug - Bezier curve drag bug #463

Open tomorrowevening opened 6 months ago

tomorrowevening commented 6 months ago

Once a keyframe has easing on both sides, changing the value in-editor results in exponential curvature.

https://github.com/theatre-js/theatre/assets/626143/792a2e3f-6028-4f4e-bd59-0d6d9384cde1

bigmistqke commented 6 months ago

to clarify:

to illustrate: while relative to the plane works when the delta in y-values is not close to 0

Screenshot 2023-10-23 at 08 51 15

it creates enormous values once it does come close to 0

Screenshot 2023-10-23 at 08 51 25

if you then start moving the points you will get the erratic behavior as seen above

my proposal: have the y-value of the bezier's handles be defined in an absolute unit, while the x-value is relative to the distance from 1 point to the consecutive point.

Screenshot 2023-10-23 at 09 02 49

an example of how that looks like: