Git Product home page Git Product logo

lottie-stand's Introduction

lottie-stand 简介

注意:该插件涉及到上传静态资源的功能,将上传至转转的服务器,非转转内网环境将上传失败不可使用!!!

Lottie Stand是一个帮助你压缩Lottie动画的替身

当你使用Lottie做动画时往往需要设计师进行动画设计,并通过 BodyMovin 插件导出为一个 Json 文件

呆毛,这个Json文件往往是比较大的。

我的替身能力就是对 Json 中的静态资源进行处理,以达到减小文件尺寸的目的

如何使用

  1. 安装插件
  2. 右键Json文件唤出菜单,执行 Lottie Stand
  3. 在出现的输入弹层,键入阀值,默认20kb
  4. 回车确认
  5. 运行完毕,当前目录生成一个新的Json文件lottie_anim.json使用它即可

原理

BodyMovin 导出的格式大概用两种:

  • 一个单独的Json文件,Json中 Assets 里的资源都是 Base64
  • 一个文件夹包含了images文件夹和Json文件,Json中 Assets 里都是相对路径,引的images中的资源

处理过程:根据用户输入的阀值(单位kb)遍历Json中 Assets 里的静态资源,大于改阀值的资源将会被上传到服务器并将该资源替换为链接,小与该阀值的资源将会被转为 Base64

Release Notes

0.0.1

add icon

0.0.1

everything is just beginning

Enjoy!

lottie-stand's People

Watchers

Lin Gogi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.