UNPKG

lottie-web

Version:

After Effects plugin for exporting animations to SVG + JavaScript or canvas + JavaScript

32 lines (26 loc) 857 B
const ProjectInterface = (function () { function registerComposition(comp) { this.compositions.push(comp); } return function () { function _thisProjectFunction(name) { var i = 0; var len = this.compositions.length; while (i < len) { if (this.compositions[i].data && this.compositions[i].data.nm === name) { if (this.compositions[i].prepareFrame && this.compositions[i].data.xt) { this.compositions[i].prepareFrame(this.currentFrame); } return this.compositions[i].compInterface; } i += 1; } return null; } _thisProjectFunction.compositions = []; _thisProjectFunction.currentFrame = 0; _thisProjectFunction.registerComposition = registerComposition; return _thisProjectFunction; }; }()); export default ProjectInterface;