Skip to content

From a comp to a file

Without a player: SVG, GSAP or video on a page ​

A Lottie file needs a player script on the page. Three of AXO's outputs do not: an animated SVG plays by itself, a GSAP folder is plain web code, and a video is a video. You will pick the one that fits, build it, and put it on a page. About ten minutes.

You needA comp, a text editor and a browser. For video also the full version and ffmpeg (install it once).
You getAn .svg, a .gsap folder or a video file, and the few lines of HTML that show it.
TrialSVG and GSAP work in the trial. The trial writes no video.

Which one? ​

You wantUseOn the page
A vector animation that just plays, with no script at allSVG (SMIL)one <img>
Vector code a developer will edit, pause, reverse or tie to scrollGSAP folderan SVG and a few scripts
Effects, plug-ins, 3D: anything a vector format cannot drawwebm, avif, webp or gifone <video> or <img>

A Lottie with a player stays the better choice when you need themes or a state machine (those exist only in a .lottie), or when the comp uses what SVG and GSAP do not carry.

1. Ask the audit what the format will lose ​

  1. In Audit, open Target players and tick SVG SMIL (XML) or SVG + GSAP (JS).
  2. Press Run Audit.

The audit now lists what this comp would lose in that format, for example an effect or a Repeater. Fix what carries a tick, change the rest by hand, or pick another format. The whole list of what each format carries: Output formats. Video needs no check: After Effects draws every frame.

2. Build it ​

  1. In Build, press All formats… and tick SVG (SMIL), GSAP folder or the video formats you want. Each gets a chip in the bar.
  2. Turn the chip on, tick the comp and press Build selected.
  3. Go to Files and press the eye: an .svg and a .gsap folder play there as they will on a page.

3a. An animated SVG ​

The file is one .svg. Use it like any picture:

html
<img src="logo.svg" alt="The logo drawing itself" width="240" height="240">

Give it a width and height so the page does not jump while it loads. To recolour or resize parts of it with your own CSS, open the file and paste its <svg>…</svg> into the page instead of linking it.

3b. A GSAP folder ​

The .gsap folder is a small web page you can open as it is:

FileWhat it is
index.htmlThe page that plays the animation. Open it in a browser to check.
animation.svgThe artwork alone, ready to paste into your own page or component.
animation.jsThe timeline: the code your developer edits.
style.cssHow the page fits the animation in the window.
gsap.min.js, CustomEase.min.jsGSAP itself and its easing plugin.
MotionPathPlugin.min.js, DrawSVGPlugin.min.js, MorphSVGPlugin.min.jsGSAP plugins. index.html loads only the ones this animation uses.

To move it into your own page, copy the folder next to the page and take two things from index.html:

  1. The <svg id="axo-stage" …> block. Keep the id: animation.js finds the artwork by it.
  2. The <script> lines under it, in the same order: GSAP first, the plugins, animation.js last.

Everything is in the folder, so the page needs no CDN and works offline. Visitors who asked their system for reduced motion see the finished picture instead of the animation.

3c. A video ​

webm goes in a <video> tag. muted and playsinline are what let a browser start it by itself:

html
<video autoplay loop muted playsinline width="480" height="270">
  <source src="hero.webm" type="video/webm">
</video>

avif, webp and gif are animated images. Offer the small one first and let the browser fall back:

html
<picture>
  <source srcset="hero.avif" type="image/avif">
  <source srcset="hero.webp" type="image/webp">
  <img src="hero.gif" alt="The hero animation" width="480" height="270">
</picture>

Which format for which job, and the settings that change size and quality: Make a GIF or a video.

If it does not look like the comp ​

What you seeWhyWhat to do
A layer is missing its effect, or a Repeater draws onceThe format does not carry it; the audit said so in step 1.Use a video, or a Lottie with a player.
The SVG is the wrong size on the pageAn <img> with no size takes the comp's own pixels.Set width and height, or size it in CSS.
The GSAP page is blank on your siteA script is missing or out of order.Copy every <script> line from index.html, in its order.
The video does not start by itselfIt is not muted.Keep muted and playsinline on the <video>.

AXO for After Effects