{"id":20093101,"url":"https://github.com/lottiefiles/lottie-js","last_synced_at":"2025-04-05T18:07:12.824Z","repository":{"id":40467166,"uuid":"302323802","full_name":"LottieFiles/lottie-js","owner":"LottieFiles","description":"An object model for representing and manipulating the Lottie JSON structure in JS.","archived":false,"fork":false,"pushed_at":"2024-04-21T16:51:35.000Z","size":1431,"stargazers_count":133,"open_issues_count":17,"forks_count":18,"subscribers_count":15,"default_branch":"main","last_synced_at":"2024-04-28T03:44:39.903Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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":"CHANGELOG.md","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":"2020-10-08T11:51:02.000Z","updated_at":"2024-06-18T19:46:31.691Z","dependencies_parsed_at":"2024-06-18T19:46:14.217Z","dependency_job_id":"4358b00d-5711-4499-a473-5ea0e70c30f8","html_url":"https://github.com/LottieFiles/lottie-js","commit_stats":{"total_commits":137,"total_committers":9,"mean_commits":"15.222222222222221","dds":0.6642335766423357,"last_synced_commit":"68db6ea51e7c7d0a7b21c7a7a3cb2125c2d1ec43"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LottieFiles%2Flottie-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LottieFiles%2Flottie-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LottieFiles%2Flottie-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LottieFiles%2Flottie-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LottieFiles","download_url":"https://codeload.github.com/LottieFiles/lottie-js/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247378141,"owners_count":20929296,"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","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:52.807Z","updated_at":"2025-04-05T18:07:12.804Z","avatar_url":"https://github.com/LottieFiles.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lottie-js\n\nAn object model for representing the Lottie JSON structure.\n\nThis library was created to make interacting with the Lottie JSON object simpler. The library consists of methods to map\nthe Lottie JSON to the object model and interact with properties as well as manipulate them. The goal is to fully map\nthe Lottie object model and add in enough helper methods to the library such that Lottie manipulation can be made easier\nwithout having to learn the entire complex structure of a Lottie file.\n\n### Full Documentation is available here [Click me](https://docs.lottiefiles.com/lottie-js/)\n\n### Usage\n\n1. Install\n\n```\nyarn add @lottiefiles/lottie-js@0.0.1\n```\n\n2. Use\n\n```\nimport { Animation } from '@lottiefiles/lottie-js';\n\nasync function loadAnimation() {\n  // Create Lottie instance\n  // (you can also use Animation.fromJSON method if you already have the Lottie JSON loaded)\n  const anim = await Animation.fromURL('https://assets1.lottiefiles.com/packages/lf20_u4j3xm6r.json');\n\n  // Print some data of the animation\n  console.log('Frame Rate', anim.frameRate);\n  console.log('Number of Layers', anim.layers.length);\n  console.log(anim.getColors());\n\n  // Manipulate animation\n  anim.name = 'Woohoo';\n  anim.width = 512;\n  anim.height = 512;\n\n  // Get the new JSON\n  const woohooLottie = JSON.stringify(anim);\n  console.log(woohooLottie);\n}\n\nPromise.resolve(loadAnimation());\n```\n\n### Documentation \u0026amp; API\n\n---\n\nThe documenting system used is [TypeDoc](https://typedoc.org/).\n\nClone the repo and run the yarn command: `yarn docs` to generate the docs to browse locally.\n\nThe generated documentation is placed in the docs/ folder.\n\n### Testing\n\n---\n\nThe testing system used is [Jest](https://jestjs.io/) and each file should have an accompanying test suite for\nfunctional and integration tests.\n\n### Development\n\n---\n\nDevelopment work on the toolkit requires Nodejs and Yarn.\n\n#### Guidelines\n\n- Use [defensive programming](https://en.wikipedia.org/wiki/Defensive_programming) techniques: Ensure type and range of\n  input values, cast values to native representation whenever possible, etc.\n- Refrain from using external dependencies: Discuss before adding a dependency. Check with\n  [Bundlephobia](https://bundlephobia.com/) for package size and dependencies when choosing one.\n- Use code formatting in the IDE using the given eslint+prettier configs.\n- Write tests to cover all functions and code branches with valid and invalid values.\n\n#### Setting up\n\n```\ngit clone https://github.com/LottieFiles/lottie-js\n\ncd lottie-js\n\nyarn install\n```\n\n#### Running test suite\n\n```\nyarn test\n```\n\n#### Building\n\n```\nyarn build\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flottiefiles%2Flottie-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flottiefiles%2Flottie-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flottiefiles%2Flottie-js/lists"}