{"id":17236468,"url":"https://github.com/pissang/lottie-parser","last_synced_at":"2025-04-14T02:22:29.909Z","repository":{"id":52187843,"uuid":"434928329","full_name":"pissang/lottie-parser","owner":"pissang","description":"Parsing lottie files and display it in the Apache ECharts.","archived":false,"fork":false,"pushed_at":"2022-01-22T06:53:18.000Z","size":683,"stargazers_count":24,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-06T05:34:26.437Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/pissang.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}},"created_at":"2021-12-04T14:48:38.000Z","updated_at":"2024-11-05T19:59:26.000Z","dependencies_parsed_at":"2022-08-24T02:11:09.957Z","dependency_job_id":null,"html_url":"https://github.com/pissang/lottie-parser","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pissang%2Flottie-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pissang%2Flottie-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pissang%2Flottie-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pissang%2Flottie-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pissang","download_url":"https://codeload.github.com/pissang/lottie-parser/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240142739,"owners_count":19754632,"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-10-15T05:36:14.765Z","updated_at":"2025-02-24T14:31:27.971Z","avatar_url":"https://github.com/pissang.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lottie Parser\n\nParsing lottie files and display it in the Apache ECharts.\n\n## Demo\n\n[![Edit eager-ives-yiqn7](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/eager-ives-yiqn7?fontsize=14\u0026hidenavigation=1\u0026theme=dark)\n\n## Install\n\n```bash\nnpm i lottie-parser\n```\n\n## Basic Usage\n\n```ts\nimport * as lottieParser from 'lottie-parser';\nimport * as echarts from 'echarts';\n\n// Install required shapes to echarts\nlottieParser.install(echarts);\n\nconst chart = echarts.init(dom);\n\nfetch(`lottie.json`)\n  .then((response) =\u003e response.json())\n  .then((data) =\u003e {\n    const { elements, width, height } = lottieParser.parse(data, {\n      // 循环播放动画\n      loop: true,\n    });\n\n    // Scale to 400px\n    const scale = 400 / Math.min(width, height);\n\n    chart.setOption({\n      graphic: {\n        elements: [\n          {\n            type: 'group',\n            scaleX: scale,\n            scaleY: scale,\n            // Elements is compatitable with echarts graphic.\n            children: elements,\n          },\n        ],\n      },\n    });\n  });\n```\n\n## Limitations\n\n- Expressions are not supported\n- Text and image layers are not supported\n- Repeat on the rect and ellipsis doesn't support trim yet.\n- Gradient animation is not supported.\n\nSome other unknown issues can be reported in the issue list.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpissang%2Flottie-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpissang%2Flottie-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpissang%2Flottie-parser/lists"}