News for hackers. Stuff that matters.
Re:Show HN: Create animations by dragging an element with yo... by mrhektor on Friday January 14, 2022 @01:10AM (#29931140)
This is such a cool project. Quick suggestion: would be nice to have some way of "smoothening" the animations; I think a simple interface for that would make it a lot more usable in practice. The human hand is a bit shaky :)

Anyway, bookmarked!

Re:Show HN: Create animations by dragging an element with yo... by heleninboodler on Friday January 14, 2022 @02:43AM (#29931621)
Agreed with the suggestion. OP, one cheap trick you can do without having to get into smoothing algorithms is to just make the mouse position affect the velocity of the object rather than the position. It makes it a little more difficult to control but isn't hard to get used to. This was the mouse control method for your spaceship on an old 2d mac game called Crystal Quest[1] and it gives a slight rubber band feeling to the movement.

[1] https://www.youtube.com/watch?v=xpLQAfxSnIk