Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial rudimentary Lottie parsing code
- Loading branch information
Showing
6 changed files
with
378 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[package] | ||
name = "lottie_basic" | ||
version = "0.1.0" | ||
authors = ["Patrick Walton <pcwalton@mimiga.net>"] | ||
edition = "2018" | ||
|
||
[dependencies] | ||
|
||
[dependencies.pathfinder_lottie] | ||
path = "../../lottie" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// pathfinder/examples/lottie_basic/src/main.rs | ||
// | ||
// Copyright © 2019 The Pathfinder Project Developers. | ||
// | ||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | ||
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
||
//! Experimental example for reading Lottie animations. This is very incomplete. | ||
|
||
use pathfinder_lottie::Lottie; | ||
use std::env; | ||
use std::fs::File; | ||
use std::io::BufReader; | ||
|
||
fn main() { | ||
let path = env::args().skip(1).next().unwrap(); | ||
let file = BufReader::new(File::open(path).unwrap()); | ||
let lottie = Lottie::from_reader(file).unwrap(); | ||
println!("{:#?}", lottie); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[package] | ||
name = "pathfinder_lottie" | ||
version = "0.1.0" | ||
authors = ["Patrick Walton <pcwalton@mimiga.net>"] | ||
edition = "2018" | ||
|
||
[dependencies] | ||
serde_json = "1.0" | ||
|
||
[dependencies.serde] | ||
version = "1.0" | ||
features = ["derive"] |
Oops, something went wrong.