Skip to content

Set Default Playback Settings & Triggers

Set how long, how many times and what starts it once, in the editor, and forget about it: the settings travel inside the file, every player reads them, and the animation plays correctly with no configuration on the page.

This page is the editor side: which control writes which value. To change any of it at runtime, from component props or the player API, see Playback settings & triggers. For the editor itself — every panel, tool and dialog — see the full editor manual.

These are settings of the whole document, not of an element, so the panel shows them when nothing is selected — deselect everything (click an empty part of the canvas), or select the root <svg> element. Everything here is written into the document’s animator block on save.

ControlWritesNotes
Durationtimeline.outTime (ms)the end of the content window — one pass plays from 0 to it; keyframe times are absolute
In Time / Play Durationtimeline.inTime / timeline.playDuration (ms)the window’s start, and the window remapped to wall time (slower or faster)
Delaytimeline.delay (ms)wait before the first iteration starts
Loop · Iterationstimeline.iterationsa number, or “infinite” — in the Playback Loop section
Directiontimeline.iterationDirection“normal”, “reverse”, “alternate” (ping-pong), “alternateReverse” — in the Playback Loop section
Frame ratetimeline.frameRatea target rate for the frame-loop engine only; leave it unset to run uncapped

Engine writes timeline.engine, and decides how the animated attributes actually get updated in a browser:

  • Auto (default) — the browser’s own machinery (the Web Animations API; for a scroll-driven animation also its scroll timeline), falling back to the player’s frame loop by itself when the document animates something the browser cannot express.
  • Native — the browser only: Web Animations API, and the browser’s scroll timeline for a scroll-driven animation.
  • JS — the player’s own requestAnimationFrame loop (and its own scroll measurement); identical in every browser, honours frame rate.

Leave it on auto unless you need a guarantee. React Native ignores it — playback there is always native-driven.

Where it sits: for a Pixodesk JSON file, Engine is a section of its own, the dropdown in its title row. For a pre-rendered SVG with embedded JS it is a dropdown in the Runtime section, and each choice shows the size of the player it embeds in the file.

Loop, Iterations and Direction have their own Playback Loop section: the Loop checkbox sits in its title row, and the section opens only while Loop is ticked.

The Playback Preset dropdown sets the trigger lists, the four actions and Loop in one pick. Open it to see each preset playing in a small example, with what it does and where it is typically used.

PresetSetsTypical use
Loop when seenPlay on Load · Loop · Out-of-View Pauseloaders, spinners, backgrounds
Play once when seenPlay on Load · one iteration · End Hold · Out-of-View Pauseintros, counters, charts
Replay each time seenas above, but Out-of-View Resetillustrations down a long page
Run alwaysPlay on Load · Loop · Out-of-View Continueclocks and tickers
Hover: play / pausePlay on Hover in · Pause on Hover out · Loop · Out-of-View Continuecards and links
Hover: there and backPlay on Hover in · one iteration · End Rewind · Out-of-View Continueicons that move and settle back
Hover: one nudgePlay on Hover in · Play Restart · one iteration · End Reset · Out-of-View Continueplayful icons
Click: play / pausePlay on Click · Pause on Click · Loopplay / pause toggles
Manual: loopnothing in Play on · Loopbackground jobs, the current step of a progress list
Manual: oncenothing in Play on · one iteration · End Holdsuccess and error ticks

A preset is not saved in the file — the dropdown recognises it from those settings, and shows Custom as soon as one of them no longer matches (a loop count such as 3× is Custom too). Settings a preset doesn’t name go back to their defaults; Direction, Duration, Delay and the in-view numbers are left as they are. In a CSS keyframes (no JS) file each preset is marked (CSS) or (JS), and picking a (JS) one switches the file type to CSS keyframes (JS-triggers).

A trigger lists which events play, stop and pause the animation, and the editor works out what resumes it. The Playback Triggers section writes timeline.actionTriggers:

ControlWritesOffersActs while the animation is…
Play onactionTriggers.startLoad · Hover in · Clickstopped — a play, per Play Action below
Stop onactionTriggers.stopHover out · Clickplaying or paused — a stop, per Stop Action below
Pause onactionTriggers.pauseHover in · Hover out · Clickplaying — freezes the current frame
Resume onnothing — worked outshown, not editedpaused — continues

Each list offers only the events that make sense for it — nothing starts on Hover out or stops on Load. Resume on follows the other lists: Hover out resumes what Hover in paused (and the other way round), a click resumes what a click paused, and the Play on events that do not also stop it resume it too. A new document plays on load. Ticking Hover in under Play on adds Hover out under Pause on for you — the usual pair, and yours to change. Click under both Play on and Pause on makes every click play or pause. Play on shows every choice; the other lists are dropdowns, and the × next to one empties it. Choose None (manual) under Play on and nothing starts the animation until your code calls play().

Two lists that react to the same event at the same moment are marked in red: Stop on and Pause on both on Hover out (the pause wins), or Stop on on the event that resumes a pause (the resume wins).

To play an animation when it scrolls into view, leave Play on at “Load” and Out-of-View Action on “pause” (both are the defaults). The animation then waits until enough of it is on screen, plays, pauses when it scrolls away, and carries on when it comes back.

Out-of-View Action writes timeline.actions.outOfView — what happens while none of it is on screen: “pause” (the default; it resumes where it left off), “continue” (keep running, and start without waiting to be seen) or “reset” (back to the start, so it replays on the next entry).

In-View Threshold writes timeline.inViewThreshold — how much must be on screen before it may run, from 0 (any part) to 1 (all of it), 0.5 by default. In-View Delay writes timeline.inViewDebounce — how long that must hold, in milliseconds, so scrolling straight past starts nothing.

How a play, a stop and the natural end look. The Playback Behaviour section writes them into timeline.actions, beside the triggers — each action the word of its preset ("stop": "rewind"), or an object when it has more to say ("stop": { "do": "rewind", "completeIteration": true }) — and the same words apply whoever asks for the play or the stop — the trigger, a component’s play property, or play() / stop() from code:

ControlWritesChoices
Play Actionactions.startResume (default — continues from where it is; at the start or the end, a fresh run) · Restart (from the beginning every time) · Jump to end (shows the end, no motion)
Stop Actionactions.stopReset (default — jumps back to the start state) · Rewind (plays back to it)
Complete Iteration (under Stop Action)actions.stop.completeIterationa stop waits for the current iteration to finish first — a heartbeat should not die mid-beat
End Actionactions.finishHold (default — keeps the last frame) · Reset · Rewind

The SVG + CSS animation export comes in two flavours — the File Type choice in the Runtime section (and on the welcome screen and in the Export dialog): CSS keyframes (no JS) or CSS keyframes (JS-triggers). It decides how the trigger is implemented in the file:

  • With CSS keyframes (no JS), the file contains no script at all — pure CSS. “Load” works, and “Hover in” / “Hover out” work through CSS :hover (a hover out may pause or stop, not both, and only when “Hover in” plays it). “Click” and waiting until the animation is on screen cannot be done in pure CSS; a class cannot restart keyframes or play them backwards. In this mode the playback sections show what the file will actually do: every choice is marked (CSS) or (JS), and a setting pure CSS cannot honour is shown at the value the file falls back to. Picking a (JS) choice switches the file type to CSS keyframes (JS-triggers) for you — a message says so and the panel scrolls to the flashing choice — and the marks go away, everything works.
  • With CSS keyframes (JS-triggers), the export adds a few lines of inline script (no library), and the file behaves exactly as this panel says: every list, every action and the gate.

The JSON format and the SVG + JS animation export always honour the full setting. The Export dialog offers the same three File Type flavours, with the same marks and the same rule.

Timeline chooses what the playhead follows — it writes timeline.type:

  • Time (default) — the clock. The animation plays on its own once triggered.
  • Scroll (in development) — the page’s scroll position drives the playhead: scrolling down plays the animation forward, scrolling back up rewinds it, and it stays at whatever frame you stop on. Pinning and range options choose which part of the page’s scroll maps to the animation. The “Scroll” option is still in development: expect gaps and changes.

Which export formats keep the playback settings and triggers

Section titled “Which export formats keep the playback settings and triggers”

Not every export can carry every setting from this page. What each one keeps:

ExportKept in the file
Pixodesk JSONeverything
SVG + CSS animationtiming; “Load”, and “Hover in” / “Hover out” via CSS :hover. “Click” and the visibility gate fall back to “Load”; the play actions keep their defaults
SVG + CSS + JS triggerstiming, every list, every action and the gate — through a few inline lines of script (added by the editor app), no library
SVG + JS animationeverything

Choosing a format has the full comparison.