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

[FEATURE REQUEST] Support for Declarative (SMIL) Animation #39

Open
christianhujer opened this issue Oct 2, 2020 · 5 comments
Open
Labels
enhancement New feature or request

Comments

@christianhujer
Copy link

When recording a declarative (SMIL) animation, the animation speed in the recorded video does not match the animation speed in the actual SVG file.

@tungs
Copy link
Owner

tungs commented Oct 2, 2020

Hi @christianhujer, unfortunately due to its implementation, timecut/timesnap does not support SVG animations-- it only aims to support JavaScript and (some) video.

@christianhujer
Copy link
Author

I guessed so. Maybe we can keep this ticket open as a feature request? I understand that upstream changes may be required, even as far as to Chromium itself.

@tungs
Copy link
Owner

tungs commented Oct 2, 2020

This project primarily uses only JavaScript and Puppeteer for time handling, so changes to Chromium would probably be outside of the scope.

That said, it's not completely out of the question to make a JavaScript implementation of SMIL. In fact, a quick search shows that there's a JavaScript polyfill for SMIL at https://github.com/ericwilligers/svg-animation, which might work for you (though it might require some work to force an overwrite with browsers that already support it and disabling native SMIL support).

See Also:
https://bugs.chromium.org/p/chromium/issues/detail?id=498081 (maybe using --disable-blink-feature=smil to disable native SMIL handling)

@tungs tungs added the enhancement New feature or request label Oct 2, 2020
@tungs tungs changed the title Declarative (SMIL) animation not recorded correctly [FEATURE REQUEST] Support for Declarative (SMIL) Animation Jun 18, 2021
@Minoru
Copy link

Minoru commented Jul 14, 2021

I'm not a web developer, so I might be entirely wrong here, but it appears that SVGs have a couple methods that can help:

  • pauseAnimations() can stop the animation;
  • setCurrentTime() can move the animation to the desired point in time, in seconds.

Can't they be used to pause the animation and then advance it along with the "virtual time" in which all other elements live?

@tungs
Copy link
Owner

tungs commented Jul 14, 2021

Thanks @Minoru for the information; I wasn't aware of these methods. This does make SVG Animations look a lot more promising. I'll take a look into this when I have some time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants