friction2d / friction

Friction Graphics
https://friction.graphics
GNU General Public License v3.0
294 stars 14 forks source link

using bounce preset on path animaiton crashes #319

Closed adambelis closed 1 day ago

adambelis commented 1 day ago
  1. create path.
  2. add two keyframes in timeline on path properties
  3. select both kyes
  4. chose any bounce preset
  5. crash

master win 10

rodlie commented 1 day ago

Not able to replicate, please provide more info or a test project.

adambelis commented 1 day ago

https://github.com/user-attachments/assets/4a5690e7-e215-47ad-bd82-ccb3c272c715

win 10 last build master https://github.com/friction2d/friction/commit/3a0a32d4

rodlie commented 1 day ago

Ahh, that's what you mean when you said paths.

Paths like this does not support expressions etc and of course will crash, didn't think about that.

rodlie commented 1 day ago

Will need to figure out a workaround or disable this function when paths are involved

adambelis commented 1 day ago

yes disbling for path would make sense . or just ignore command for path+ add warning this feature is not suported

rodlie commented 1 day ago

Will first check if there is a possibility to enable it for paths, but I assume expressions are disabled internally for a reason.

adambelis commented 1 day ago

its probably non trivial to create such a keyframnes. since it would need to know how create new shapes by keeping track of position of every node and handle .

image

rodlie commented 1 day ago

Yes, you are correct. The easing algorithm will always return bad values that don't "compute" with the paths (why we crash), so it's probably best to just find a way to disable this feature for paths.

adambelis commented 1 day ago

i mean it would be cool feature to add in future just not that easy

rodlie commented 1 day ago

I agree, but at this point we just need to avoid a crash.

rodlie commented 1 day ago

Crash fixed in https://github.com/friction2d/friction/commit/de4bc1048fcc8f4bf765f4f17b0294153e8469a1

Will add support for status messages later.

rodlie commented 1 day ago

Add status message in https://github.com/friction2d/friction/commit/4e824b1921f19532511c02e738fe93c8cc6fd6c6

I consider this issue fixed.