__________________________________________________________

╔════════════════════════════════════════╗
║	This is a FBF.SVG animation file	 ║
╚════════════════════════════════════════╝

FBF.SVG stands for "Frame-By-Frame SVG".

FBF.SVG is a format meant to be the MPEG of vector animations.
It is designed to be compact, portable, and optimized for streaming.

The following are some of the mandatory specifications:

    - The FBF.SVG format is a subset of the SVG 1.1 Full profile.
    - No CSS or external JavaScript allowed. No imperative scripting.
    - Only exception: mesh gradient polyfill script (if meshgradients present).
    - The file is minified because it is a format meant for the
      exchange and playback of vector encoded video animations,
      like those exported by OpenToonz or other vector applications.
    - The FBF.SVG format is designed to be played as an XML stream, so
      each frame is encoded in a way to include only the
      differences from the previous frame and minimize the size.
    - The structure of the FBF.SVG file must follow the schema
      available online[1], and it should be composed by the
      following parts disposed in this exact order:

            SVG[
                metadata[]
                desc[]
                ANIMATION_BACKDROP[
                    ANIMATION_STAGE[
                        ANIMATED_GROUP[
                            PROSKENION
                ]	]	]
                defs[
                    SHARED_DEFINITIONS[]
                    FRAMES[]
                ]
            ]

    - The PROSKENION Animation element must always have the
      following attributes set at these values:

                attributeName="xlink:href"
                begin="0s"
                calcMode="discrete"
                repeatCount="indefinite"

    - The 'values' attribute must contain a string with the
      concatenated id of all the group frames present in the
      'FRAMES' group under the 'defs' section. The order is
      the same order of the playback.
    - The frame group IDs must have the form: 'FRAME0...1',
      where the digits are the left-zero-padded frame numbers,
      with the frame count starting from 1 not 0. The number of
      digits varies according to the number of frames, but
      there should always be an additional 0 before the other
      digits. Frame group IDs like 'FRAME1' are not allowed.
    - The attribute 'repeatCount' can be changed to allow looping,
      repeat once or ping-pong modes.
    - The PROSKENION 'use' element should have the xlink:href
      attribute set with the value of the first frame id, for
      example:

                xlink:href="#FRAME0001"

    - The value of the 'dur' attribute of the PROSKENION animation should be
      expressed in seconds. The value represents the duration of the
      entire animated sequence. For example if you have "1.0s"
      this is equal to each frame duration multiplied by the number of
      frames. For example: for an animation of 3 frames, "1.0s" means 0.333*3,
      where 0.333s is the 'Frame Duration' (FD) in seconds. A FD of 1.0 means
      1 frame per second (1 fps). For 60fps the frame duration is "0.01667s".
      For 24fps you have "0.04167" seconds. To get it just divide 1 second
      for the number of frames per second (fps) that you want.
      More explicitly:

                fps = 60
                FD = 1/60=0.0166666... approx: 0.01667s
                NumberOfFrames = 3
                dur = 0.01667*3 = 0.05001s

        The general formula for 'dur' then is:

                dur = (1/fps)*NumberOfFrames

        And the inverse formulas for fps and FD are:

                fps = NumberOfFrames/dur
                FD  = 1/fps

    - The FBF.SVG files extension must ALWAYS be ".fbf.svg".
    - Document has always the attributes height and width set at 100%.
    - SVG attribute preserveAspectRatio must be set as "xMidYMid meet".
    - Viewport values are mandatory and should be defined in pixels,
      with the first two values always set to 0.
    - Any rendering server recognizing this format must render it
      only in SECURE ANIMATED MODE.[2]
    - No external resources allowed (except optional meshgradient polyfill).
    - All resources must be embedded in base64.

METADATA:
    - FBF.SVG files include comprehensive RDF/XML metadata in the &lt;metadata&gt; element
    - Metadata uses Dublin Core (dc:), Creative Commons (cc:), and FBF.SVG (fbf:) namespaces
    - Required metadata fields include: title, creator, date, format, language
    - Optional fields: description, subject, rights, license, source
    - FBF-specific fields: frameCount, frameRate, duration, generatorName, generatorVersion
    - All metadata is machine-readable and follows the FBF.SVG metadata specification[3]

For more information about the FBF.SVG format and svg2fbf, refer to:
https://github.com/Emasoft/svg2fbf

For information about OpenToonz:
https://opentoonz.github.io


[1] Schema and specification: https://github.com/Emasoft/svg2fbf
[2] Secure animated mode: https://www.w3.org/TR/SVG/conform.html#secure-animated-mode
[3] Metadata specification: https://github.com/Emasoft/svg2fbf/blob/main/docs/FBF_METADATA_SPEC.md

___________________________________________________________________
