{"id":20093094,"url":"https://github.com/lottiefiles/test-files","last_synced_at":"2025-10-06T00:00:09.014Z","repository":{"id":176519299,"uuid":"657566915","full_name":"LottieFiles/test-files","owner":"LottieFiles","description":"A collection of basic lotties to test lottie tooling","archived":false,"fork":false,"pushed_at":"2025-05-17T05:43:18.000Z","size":486,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-05-17T06:27:43.821Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LottieFiles.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-23T10:49:14.000Z","updated_at":"2025-05-17T05:43:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"ca958b42-02f5-4d84-b4ac-89e2aa25becf","html_url":"https://github.com/LottieFiles/test-files","commit_stats":null,"previous_names":["lottiefiles/test-files"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LottieFiles/test-files","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LottieFiles%2Ftest-files","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LottieFiles%2Ftest-files/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LottieFiles%2Ftest-files/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LottieFiles%2Ftest-files/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LottieFiles","download_url":"https://codeload.github.com/LottieFiles/test-files/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LottieFiles%2Ftest-files/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278537758,"owners_count":26003250,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T16:45:50.899Z","updated_at":"2025-10-06T00:00:08.996Z","avatar_url":"https://github.com/LottieFiles.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Lottie Feature Files\n====================\n\nThis repository contains several files that can be used to validate Lottie\nrenderers and similar tools.\n\n\nFile Structure\n--------------\n\nAll the files are in the `data/` subdirectory.\nHere you find other directories that are used to group examples into categories.\nEach category can contain multiple examples.\n\nAn example is composed of multiple files. Assuming the example\n`category/example`, the following files could be found in `data/category`:\n\n* `example.aep`: (optional) The Aftereffects project file corresponding to this example\n* `example.json`: (required) The lottie to test\n* `example.svg`: (optional) An equivalent SVG, it's important it should be rendered the same as the AE project\n* `example-meta.json`: (required) Example metadata (more on this later)\n* `example-XX.png`: (recommended) Reference render of the example, `XX` is the frame number.\n\nThe metadata file will have contents like these:\n\n```js\n{\n    // Internal feature list, using path syntax\n    \"features\": [\n        \"category/example/feature-1\",\n        \"category/example/feature-2\"\n    ]\n}\n```\n\nEverything is optional in the metadata file, if there are no features,\nthe contents are assumed to be\n\n```js\n\"features\": [\n    \"category/example\"\n]\n```\n\nIf you need additional files for a test file, use `asset` in their file name, so they will be ignored by the tooling.\nThis also means that you cannot have the word `asset` appear in the test name.\n\n\nCreating Test Files\n-------------------\n\n### Guidelines\n\nPlease keep the features in a file to a minimum, and keep duration under 100 frames.\n\nWhenever possible, do include an AEP file with the same contents as the lottie.\n\nIf the lottie doesn't have animations, only provide a single rendered frame,\nif it does try to keep renders to a minimum and only provide necessary frames.\n\nKeep the animation dimensions (width, height) to a minimum so it's easier\nto compare renders.\n\n\n### AE script\n\nTo export everything needed for a test file you can install `./tools/Test File Export.jsx` in the After Effects\nScriptUI folder. Once installed, restart after effects and the you can toggle the panel from the _Window_ menu.\n\nIn order to export PNG, you need to update the AE _Lossless_ template to export as \"PNG Sequence\" \"RGB + Alpha\".\n\nIn the panel you can find a text box used to debug values, and the export button.\nClicking on _Export_ will save a bunch of files based on the ticked checkboxes.\nIf the project has not been saved, you'll be prompted to select the file, otherwise it will use the current project\nfile name.\n\nBy default it exports frame 0, to changed it update the relevant text box, you can also export multiple frames at once\nby separating them with spaces or commas.\n\nSimilarly, you can list the features to add to the metadata file on the textbox that says \"feature\".\n\nThis script can also be used to generate missing files for an example.\n\n\n### `add-file` script\n\nThis script will copy all the matching files in a directory, this is ueseful if you have a test file set up somewhere\nand you want to import it. It will also generate a basic metadata file.\n\nNote that this script expect a single test file in the given directory.\n\n\n### Metadata\n\nEnsure the file `(example)-meta.json` is valid and has the features listed.\n\nYou should also add feature-specific metadata in the features file (`./tools/features.json`).\n\n\n### Verifying the new example\n\nAlways call `./tools/verify-examples` after adding some example, as this will highlight missing files and other problems.\n\nIdeally also run a render and report to check the new test files work as intended.\n\nTools\n-----\n\n`./tools/features` Inspects and modifies feature metadata\n`./tools/add-file` imports a test and generates its metadata\n`./tools/verify-examples` shows a table with all the examples, you should invoke after adding new examples\n`./tools/render` uses the given parameter to invoke scripts that render PNGs given a JSON\n`./tools/report` generates a JSON file reporting on the status of a directory containing renders to examine\n`./tools/render-report` shorthand script to call `render` and `report` with some sensible defaults\n\n### Installation\n\nYou should set up a python virtual environment and install dependencies from the requirements file:\n\n```bash\npip install ./tools/requirements.txt\n```\n\n\n### Render Sets\n\n`./tools/render` generates a \"render set\", which contains the png files in the same structure as `./data/`.\nAdditionally, it creates a metadata file (`meta.json`) which is used by `./tools/report`.\n\nThe metadata file has the following structure:\n\n```json\n{\n    \"title\": \"Title of the report\",\n    \"label\": \"Label for the columns in the report\",\n    \"comment\": \"Optional comment\",\n    \"command\": \"Command used to render the images\",\n    \"skipped\": [\"list of skipped tests\"],\n    \"format\": \"Input format\",\n    \"times\": {\n        \"reference-image-id\": \"time of the render in nanoseconds\"\n    }\n}\n```\n\nYou can genrate a report on a single render set or from multiple ones.\nIf you generate a report formn multiple render sets, you should ensure they have different labels.\n\n\n### Generating a Report\n\nFollows a practical example on how to generate a report with a given renderer\n(here `glaxnimate` is used as a renderer for demonstation).\n\n```bash\n# Render images\ntools/render -o /tmp/lottie-test/img glaxnimate {} -r {out} --frame {frame}\n# Generate report data based on image accuracy\ntools/report /tmp/lottie-test/img -o /tmp/lottie-test/report.json\n# Generate HTML page for the report\ntools/html-report /tmp/lottie-test/report.json -o /tmp/lottie-test/report.html\n```\n\nIf you are OK with the default settings, you can also use the shorthand command `render-report`:\n\n```bash\ntools/render-report -o /tmp/lottie-test -f json glaxnimate {} -r {out} --frame {frame}\n```\n\n### Rendering with lottie-web\n\nThere's also an utility script that can render using lottie-web, it uses playwright\nto render browser output.\n\nFirst you need to install the dependencies:\n\n```bash\npip install playwright\nplaywright install chromium\n```\n\nYou can use it to generate a render set like so:\n\n```bash\ntools/render -o /tmp/lottie-test/img ./tools/lottie-web {} -o {out} --frame {frame} --browser chromium\n```\n\n### CI integration\n\nYou can force an error on an automated CI pipeline like this:\n\n```bash\ntools/error-report /tmp/lottie-test/report.json\n```\n\nIt will print failed tests and exit with an error code if any tests aren't up to par.\n\nYou can ignore individual failures with `-i`.\n\n\nLicense\n-------\n\nEverything in `./data/` is public domain (CC0), everything else is MIT (see `LICENSE`).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flottiefiles%2Ftest-files","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flottiefiles%2Ftest-files","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flottiefiles%2Ftest-files/lists"}