Repository navigation
Exporting Diagrams
FlowMotion can download an animated SVG from a diagram in Obsidian. Developers can also export static SVG and HTML files with the tools below.
Select SVG ↓ on the diagram's control bar. FlowMotion saves the current Obsidian theme colors in the .svg file, so the colors do not depend on Obsidian when you open it elsewhere.
The exported SVG uses SMIL animation and plays independently of Obsidian. Playback depends on the viewer's SVG animation support.
The download contains the whole timeline from the beginning, not the current frame or only the visible scene. It repeats independently and does not retain interactive Next pauses, the current slider position, or player speed settings. Open it in an SVG-animation-capable browser to check it. Some Markdown hosts or image previews may suppress animation.
The snapshot resolves FlowMotion's Obsidian theme palette. It is not a capture of arbitrary CSS snippets, custom fonts, or the surrounding note. Explicit scene colors are preserved.
There is no GIF export or export configuration keyword. For authoring rules, see the authoring reference.
The functions are in src/export/html.ts:
| Function | Output | Notes |
|---|---|---|
animatedSvg(model, theme) |
An SVG that animates by itself | Uses SMIL. Pass light, dark, or a concrete palette with resolved colors |
staticSvg(model, theme, at) |
An SVG with no movement |
at is the time shown. The default is the idle state, before anything runs |
standaloneHtml(models, runtimeJs, css, title, theme) |
One HTML page with the controls | Embeds the runtime bundle (dist/flowmotion-runtime.js) and the stylesheet |
The script scripts/build-examples.ts exports five YAML examples: retain-poc, retain, recall, reflect, and hindsight-retain. The last one is a storyboard.
- Run
npm run buildfirst. The script readsdist/flowmotion-runtime.jsandstyles.css, so the build must have run. - Run
npm run examples. - Open the
outfolder.
The script writes the following files:
| File | What it is |
|---|---|
out/<name>.animated.svg |
The animated diagram, light theme |
out/<name>.animated.dark.svg |
The animated diagram, dark theme |
out/<name>.static.svg |
The diagram with no movement |
out/preview.html |
One page with the five examples and their controls |
out/hindsight.html |
One page with only the hindsight-retain storyboard |
The out folder is created when it does not exist. The files are overwritten on each run.
scripts/render-one.ts writes the static SVG for a single source file:
npx tsx scripts/render-one.ts <source file> <output file> [theme]
The source can be any input format that buildModel accepts. The theme is optional. Use it to check a new diagram before you add it to the examples.
© 2026 @vrsarin. FlowMotion documentation.