servo / pathfinder

A fast, practical GPU rasterizer for fonts and vector graphics
Apache License 2.0
3.59k stars 201 forks source link

Support Lottie animations #153

Open pcwalton opened 5 years ago

pcwalton commented 5 years ago

Seems that Lottie is a popular animation format, and it would be nice to have Pathfinder serve as a lightweight, secure, and fast player for these animations. Skia can do this: https://skia.org/user/modules/skottie

Unfortunately, Lottie depends on the Bodymovin plugin for After Effects, which is proprietary.

pcwalton commented 5 years ago

Basic parsing code is in: https://github.com/pcwalton/pathfinder/commit/8c4f05ce399b46d34770224427f5346c9ead6812

pcwalton commented 5 years ago

I think what we want now is a function that produces a Scene from a Lottie object given a frame number. This will do all the tweening and so forth. Eventually it would obviously be nice to cache objects that haven't changed between frames, etc. but let's start simple.