UNPKG

lottie-web

Version:

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

30 lines (28 loc) 815 B
function DynamicPropertyContainer() {} DynamicPropertyContainer.prototype = { addDynamicProperty: function (prop) { if (this.dynamicProperties.indexOf(prop) === -1) { this.dynamicProperties.push(prop); this.container.addDynamicProperty(this); this._isAnimated = true; } }, iterateDynamicProperties: function () { this._mdf = false; var i; var len = this.dynamicProperties.length; for (i = 0; i < len; i += 1) { this.dynamicProperties[i].getValue(); if (this.dynamicProperties[i]._mdf) { this._mdf = true; } } }, initDynamicPropertyContainer: function (container) { this.container = container; this.dynamicProperties = []; this._mdf = false; this._isAnimated = false; }, }; export default DynamicPropertyContainer;