Animation brings a whole lot more to explanations, making simple explanations of how request coalescing works easy to understand, token simulations [0] through to helping explain concepts like Fresnel lenses [1]. Embedding them into GitHub READMEs, tweets and documentation would be awesome.
Google do it to illustrate posts (e.g. https://blog.chromium.org/2021/03/a-safer-default-for-naviga...).
I found Excalidraw Claymate [2] but the stop motion approach with no tweening support makes it painful to create animations where circles move from place to place. There's also Manim [3] but I think this is more for maths.
Adobe Flash used to be the go-to; what do you reach for when you want to illustrate a concept with an animated diagram?
0. https://github.com/bpmn-io/bpmn-js-token-simulation
1. https://news.ycombinator.com/item?id=30576688
Then export the transitions to a video [0].
[0]: https://support.microsoft.com/en-us/office/save-a-presentati...
https://www.diagrams.net/blog/interactive-diagram-layers
https://drawio-app.com/interactive-diagrams-with-custom-link...
Edit: remove links about the obscure undocumented features p=ex and p=anim
In the last year I have been using x6 from AntV for animated/interactive graph visualisaton. It is outstandingly powerful and well designed (like all their libraries) - but unless you can read Mandarin you'll eventually be using a translator to read the docs/issues, and reading the code to figure out APIs. That said, I've been able to quickly build out things that I didn't think possible before with x6 and their other libs.
Recently I've also had a good experience with react-flow from webkid - who also make excellent stuff. I'm using this in MDX components for modular documentation. It's quick and simple to create an animated graph visualisation from a JSON representing the graph.
I have on my to-do list to make a mermaid -> react-flow component
Examples here: https://twitter.com/ariaminaei/status/1439918117807853575?s=...
Adobes flash suite is now called Adobe animate and still works mostly the same and you can export to the html canvas.
Scripting is a bit limited/complicated, compared to doing it with actionscript - but if you worked with flash before, this is probably the most easy solution, as it is still very powerful and straight forward.
The video itself shows a debugging issue that I asked the Pharo community, which is the ability to single step through your debugger and see the animation updated. As far as I understood there was a prototype out within a day for that.
[1] https://drive.google.com/file/d/1Z3UwTAj4A2CRo_TXk6JNG-mN9yM...
Recently, I had a presentation with a diagram showing several components. One slide would have an arrow pointing from Component A to Component B. The next slide had an arrow pointing in the opposite direction. I just pressed back and forward quickly while I was explaining that these two components talk to each other. It got the message across well enough.
On the other hand, if you are explaining known concepts, there might be footage out there already for you to appropriate into your own work
"Concepts" https://concepts.app/en/
I like this approach because it decouples drawing and animating, and with SVG it is resolution and bandwidth-friendly. I was already used to making figures for research papers with Sketch, so I just suck with that, and added anime.js on top. However, for more complex motion like you might be hinting with your post, I could imagine a GUI tool with a proper timeline and tweening to be more ergonomic.
[1] https://maxwellforbes.com/posts/every-phd-is-different/ [2] https://maxwellforbes.com/garage/animating-svgs-from-sketch-...
It distracts, eats cpu/drains battery, can't be printed, has bad UX.
User have to wait for the animation to cycle, and you can't pause it to read something if it's moving too fast.
Figma only does the equivalent of “magic move,” but it’s better than Keynote’s. I’ve used it to make sophisticated animations. See my Yow! presentation “Evolutionary Design Animated” for an example.
Prior to making that presentation, I looked at a variety of 2D animation tools, but they were meant for artistic animation and had so much power and flexibility that Figma was easier and faster.
It's an authoring environment that allows text-free coding (using Programming By Demonstration) of interactive graphical software, like animations and games.
I do however have the 2D tool pulled out which is only lacking the guts since I'm rethinking the suite of things to put in boxes: http://ide.adama-platform.com/solo/
I'm thinking about how to mix a stateful backend (Adama) with animation data driven by "volatile data": https://www.adama-platform.com/2022/03/11/introducing-volati...
You can also export to a video there.
However, it doesn't support you in creating animations where objects follow paths. But you're free to code that on your own!
Slides.com is the commercial offer from the creators of the open source web presentation lib RevealJs.
I'd have thought (knowing nothing) that AI should be really good at tweeting between a start and end point of anything, diagrams included, but is there a good CS reason why this isn't the case?
Although the focus of the library is interactivity and not setting up sequences of animation, but that is possible too.
It is an online HTML5 animation editor.
Earlier today I also stumbled with Manim (https://www.manim.community/) which I think can be adapted to your needs.
I hope you find them useful.
The problem I wanted to solve is more whiteboarding and presentation: I often am in calls describing something that only needs fairly simple drawings - boxes, lines, labels - but whiteboard where you scribble or even lay out rectangles makes me sweat the small stuff, resizing and moving everything all the time when the diagram changes. Also, I wanted animation: to show transition between states. I'd tried using mingrammer to do diagrams as code, but I find graphviz layouts unpredictable. Most often what I want is: just boxes, lines, labels, size things to fit, keep everything 'evenly spaced'.
So, I wrote some JS (it's ~700 lines of code, no external libraries). I divide a web page into two areas: one textarea where I type commands line-by-line, and the drawing, which is svg. On selectionchange events for the textarea, I debounce for 500ms, so if I've paused the layout&animation kick in. The drawing state has a map of nodes (boxes), which contain a title, an icon, map of connections to other boxes, and a list of children (ids of other nodes), as well as recording the node we are currently zoomed in to, the node we are currently editing, and a few other details. There is a node called 'top' which is the starting point.
The commands are pretty simple and were added as I needed things, eg:
add internet # add a child to the currently edited node with id 'internet'
# its title and icon are also set to 'internet'
edit internet
add host1 icon host # this has id host1, title host1, icon host
add host2 icon host title "banana stand" # other attrs are layout and stroke
edit top
edit aws # editing a non-existent node adds it
add ec2
arrow host1 ec2
zoom aws # this node expands to fill the screen
top # same as 'zoom top', zooms to the top level
It's interpreted line-by-line so that each line represents one state of the diagram. There are commands to delete nodes: when I delete a node I just remove it from its parent but leave it in the top-level state. That has the neat effect that if I re-add it, I get the node with all its descendents and connections restored in one step, which I can use to pre-diagram things I talk about often.After calculating the drawing state by applying all the commands from the start to the current selection, the next step is to limit this to the visible pieces. I make a copy of the drawing state, starting from the currently zoomed node and following all children. Then I add all connections, if all the 'to' ends of the connections are visible.
Next, I do layout. Starting with the visible tree, annotate all nodes with positions of the box (if any), the icon, and the label. The diagrams I'm drawing are similar to those produced by AWS Perspective: https://aws.amazon.com/solutions/implementations/aws-perspec... , so if a node has no children I draw it as a large icon with a label below, if it has children, it is a box with a small icon to the top left, a centred label at the top. Each node can choose one of a small number of layouts that I can do automatically with just a list of children: 'ring' (a circle of nodes), 'row', 'column', or 'snake' (the default: alternate rtl-ltr rows to evenly fill the space; this will be a grid if that fits or could end up like 4-3-4-3 if it doesn't). In ring & snake, boxes are always 4:3; in row and column they are stretched to fit.
Next, I do animation. I keep around the previous layed-out state, and use window.requestAnimationFrame to calculate the position of boxes between the start and end state. A box that is in both start and end states is moved, if it is only in start or end I fade it in or out as need be. This lets me animate between _any_ two states of the drawing, so I can talk about one bit of the diagram, then jump back and forth by clicking in the command window, and it smoothly animates between them. I found animating for just 0.5s worked best for interactivity; it's nice to see a slower move but it feels laggy when typing.
I calculate arrow positions after calculating the final position of boxes and icons. I chose to use circular arcs, because you will never get an awkward situation where an arc lies directly along the edge of a box; straight things are always boxes, curvy things are always arrows. SVG wants two endpoints and a centre to draw these. So, I start with an arc between the centres of the two boxes, choose a radius twice as long as the distance between these points; then I calculate the intersection of the arc with the boxes, and use those two intersection points as the start/end of the arc. (this isn't that difficult, the formula for the arc is in the svg spec, and it's checking 4 straight lines, choose the intersection point closest to the other box). Like the boxes, the arrows fade in and out if they are not needed in one of the start or end states.
All of this then just replaces the content of the svg. It's surprisingly smooth.
One last detail is icons. I'm using the icons from mingrammer (https://github.com/mingrammer/diagrams/tree/master/resources), which gives me about 1600(!). Finding an icon _while you type_ is awkward and initially I had to drop to the shell to find the file I was going to refer to. I tried giving the drawing tool a mode that would let me visually pick the icon, but 1600 is too many. So I changed it to use a fuzzy search to find an appropriate icon: it looks for the icon where the sequence of characters appear in the shortest substring of the icon path: eg for 'ec2' it constructs the regex `.*(e.*?c.*?2)`, scoring the matching substring 'ec2' better than 'elastic2', and the shorter containing string 'aws/compute/ec2' better than eg 'aws/compute/ec2-rounded'. (I have a further round of preferences so that the top level aws iconset is preferred to eg the ibm one, which has terrible icons). This gives you an icon for almost anything you type, and encourages a more playful approach to picking the icon than the exact-match approach.
There's a bit more to it, I also accept some markdown which fades from the diagram to slides with bullet points, then back to the diagram if the current command is a diagramming command. But the description above is most of it. I could probably have done this better with eg d3 to do the drawing but I am not a front end developer at all and the whole thing was more of a hack over a couple of weekends. I should clean it up a bit, but it works.
I serve up pre-prepared pages with this js attached from github pages, I can walk through eg the flow of data clicking the down arrow to change the selection which causes it to animate to the next state which has the next arrow... and so on.