bodymovin-to-smil

1.1.0 • Public • Published

bodymovin-to-smil

Bodymovin to SMIL converter

First version of bodymovin to SMIL

It supports basic animations:

  • masks (additive and intersect)
  • shapes
  • solids
  • texts
  • precomps
  • transforms
  • opacity

Usage

var smil_converter = require('bodymovin-to-smil');
var fs = require('fs');

fs.readFile("./data.json",  "utf8",  function(error, data){
	if(data) {
		smil_converter(JSON.parse(data))
		.then(function(xml){
			fs.writeFile("./animation.svg", xml, function(err) {
			    if(err) {
			        return console.log(err);
			    }

			    console.log("The file was saved!");
			}); 
		}).catch(function(err){
		 		console.log(err);
	 	});
	}
})

Keep in mind that not all browsers support SMIL

current push supports latest version of lottie

Readme

Keywords

none

Package Sidebar

Install

npm i bodymovin-to-smil

Weekly Downloads

16

Version

1.1.0

License

ISC

Unpacked Size

94 kB

Total Files

28

Last publish

Collaborators

  • airnan