Help guide

.fmtion file format

Updated June 19, 2026

.fmtion file format

Product media placeholder

Replace this area with a screenshot or short walkthrough video during the media sweep.

A .fmtion file is JSON. The generated schema is broad because it supports legacy and modern authoring paths, but the v1 docs should be explicit about which fields are current and which are transitional.

Root keys

  • Required root keys: meta.
  • Known root keys in the generated schema: $vars, assets, canvas, carousels, customEases, dataBindings, dataTables, dom, domGraph, domSpritesheetTracks, enums, fmtionVersion, imageTrail, inputs, listeners, meta, parameters, pointerFollow, scenes, smoothScroll, videoTracks.
  • Current version constant: 8.
  • Use scenes[] for modern 2D/3D scene authoring. Legacy DOM, Canvas, and older 3D blocks remain present during migration and are still read by loader paths where needed.

Metadata and parameters

  • meta.name is the required human-facing name. Optional metadata includes author, description, duration, fps, contracts, createdAt, modifiedAt, and runtime.
  • Parameter types: float, int, bool, trigger, string, enum, color.
  • A parameter definition accepts type, default, name, min, max, step, readOnly, enumId, and enumValues.
  • Enums can be declared in enums[] with id, name, and values.

Modern scene shape

  • Each Scene uses kind: "2d" or kind: "3d".
  • Common scene fields include id, name, activeWhen, duration, mountSelector, output, renderer, width, height, and backgroundColor.
  • mountSelector and output are mutually exclusive. A scene is either mounted in the DOM or rendered headlessly for another consumer.
  • tex://scene/<id> references a headless scene output from a material texture slot.

Assets

  • The assets library can contain media, fonts, paths, spritesheets, and textures.
  • A media asset uses assetId, kind (video, audio, or image), url, and optional metadata such as dimensions, duration, poster, provider, credit, and hash.
  • Font assets use id, family, src, and optional weight and style.

Verified runnable examples

This guide points to proof-backed sample coverage. The full ledger lives in Generated examples and proof log.

DOM: Scroll fade reveal

  • Source: faster-motion/demo/tests/dom/catalog/scroll-animations/fade-reveal/fade-reveal.domgraph.fmtion
  • Expected output: Sections fade and translate into place as their trigger elements enter the configured viewport range.
  • Validation: Schema validation passed. Runtime proof reports zero structural/runtime issues and 17 loaded nodes.
  • Desktop proof: generated-assets/faster-motion-docs/proofs/screenshots/dom-fade-reveal-desktop.png
  • Mobile proof: generated-assets/faster-motion-docs/proofs/screenshots/dom-fade-reveal-mobile.png

Canvas: Fill rule diagnostic

  • Source: faster-motion/demo/tests/canvas/fillrule-diagnostic/fillrule-diagnostic.fmtion
  • Expected output: A contained Canvas scene renders paired path cases so nonzero and evenodd fill handling can be compared visually.
  • Validation: Schema validation passed. Runtime proof reports zero blocking runtime issues and 10 rendered objects; the accepted metadata note is preserved in the proof ledger.
  • Desktop proof: generated-assets/faster-motion-docs/proofs/screenshots/canvas-fillrule-diagnostic-desktop.png
  • Mobile proof: generated-assets/faster-motion-docs/proofs/screenshots/canvas-fillrule-diagnostic-mobile.png

Guide-specific sample target: Schema fixture sample that validates one minimal file, one DOM graph file, one 2D scene file, and one 3D scene file.

Faster Motion docs

Use this local map together with the left navigation. The source-backed content tree controls the main article order; this section keeps related pages one click away.

Start

DOM animation

Canvas animation

3D and procedural

Reference

Was this guide helpful?

Sunny Arora

Written by

Sunny Arora

Get technical deep dives delivered to your inbox

Join creators and developers who get exclusive insights, tutorials, and behind-the-scenes content every week.

No spam. Unsubscribe anytime.

Continue Exploring

You might also enjoy