svg: manually advance through animation #2714
timbertson
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to make some animations with d2 to illustrate algorithms. It's nice to animate these, but using a specific animation-interval means people can easily get lost if the animation goes too fast.
With pdf/pptx you allow the user to advance at their own pace, but embedding PDFs comes with a lot of visual bulk (toolbar and sidebar).
It seems like it should be possible to embed forward/backward controls in SVG, I hacked up a POC in a branch here. You can see the rendered result here. Obviously styling can be improved, this is just to show that it's doable.
Would you be interested if I polished this up and opened a PR, adding it as an (optional) alternative to --animation-interval when exporting to SVG?
I'd also love to get keyboard arrow (+space) shortcuts working as a stretch goal, I think that should be possible as well.
Beta Was this translation helpful? Give feedback.
All reactions