lottie/example: Added image_test.json(resource with image resource )

Change-Id: If79f5892347be0dcc850380f1520dfd0f2c70724
This commit is contained in:
subhransu mohanty 2019-01-15 17:12:40 +09:00
parent 704547bf32
commit b39738d852
3 changed files with 5 additions and 10 deletions

View File

@ -45,21 +45,15 @@ main(void)
app->setup();
std::string filePath = DEMO_DIR;
filePath +="mask.json";
std::ifstream f;
f.open(filePath);
std::stringstream buf;
buf << f.rdbuf();
f.close();
filePath +="image_test.json";
LottieView *view = new LottieView(app->evas());
view->loadFromData(buf.str().data(), "test_key");
view->setFilePath(filePath.c_str());
view->setPos(0, 0);
view->setSize(800, 800);
view->show();
view->setMinProgress(0.5);
view->setMaxProgress(0.0);
// view->setMinProgress(0.5);
// view->setMaxProgress(0.0);
view->play();
view->loop(true);
view->setRepeatMode(LottieView::RepeatMode::Reverse);

View File

@ -0,0 +1 @@
{"v":"5.4.3","fr":60,"ip":0,"op":60,"w":800,"h":800,"nm":"test","ddd":0,"assets":[{"id":"image_0","w":200,"h":300,"u":"images/","p":"img_0.png","e":0}],"layers":[{"ddd":0,"ind":1,"ty":2,"nm":"img_0.png","cl":"png","refId":"image_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":0,"s":[0],"e":[56]},{"t":50}],"ix":10},"p":{"a":0,"k":[400,400,0],"ix":2},"a":{"a":0,"k":[100,150,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"n":["0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167"],"t":0,"s":[99,99,100],"e":[152,152,100]},{"t":50}],"ix":6}},"ao":0,"ip":0,"op":60,"st":0,"bm":0}],"markers":[]}

BIN
example/resource/images/img_0.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB