d2
d2 copied to clipboard
gif work with `animated` keyword
Currently the animated keyword works on connections to make them appear animated in SVGs, but it doesn't work in GIF. GIF only works for multi-board diagrams.
Reasonable for GIF to work with just one board that has an animated connection.
"d2.exe --animate-interval" and "style.animated: true" what are you going to do about the coexistence?
There's no conflict.
--animate-interval dictates how long the GIF lingers on each board.
style.animated makes the line animated at a constant rate.
i could not imagine that each one is animated in its own time interval in the gif file. but you said there was no problem. thank you.
I tried this-
A -> B : "Animated" {
style: {
"animated": true
}
}
Then export like this-
d2 test.d2 test.gif --animate-interval=1200
It the preview it works, as well as in the svg export. But for gif export, it doesn't animate.
I am on Mac by the way.
+1, a lot of apps (eg Slack) don't support SVGs. I'm working around it with an SVG->GIF service, but it loses tooltips