first commit
This commit is contained in:
28
node_modules/lottie-web/player/js/elements/helpers/shapes/SVGShapeData.js
generated
vendored
Normal file
28
node_modules/lottie-web/player/js/elements/helpers/shapes/SVGShapeData.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
function SVGShapeData(transformers, level, shape) {
|
||||
this.caches = [];
|
||||
this.styles = [];
|
||||
this.transformers = transformers;
|
||||
this.lStr = '';
|
||||
this.sh = shape;
|
||||
this.lvl = level;
|
||||
// TODO find if there are some cases where _isAnimated can be false.
|
||||
// For now, since shapes add up with other shapes. They have to be calculated every time.
|
||||
// One way of finding out is checking if all styles associated to this shape depend only of this shape
|
||||
this._isAnimated = !!shape.k;
|
||||
// TODO: commenting this for now since all shapes are animated
|
||||
var i = 0;
|
||||
var len = transformers.length;
|
||||
while (i < len) {
|
||||
if (transformers[i].mProps.dynamicProperties.length) {
|
||||
this._isAnimated = true;
|
||||
break;
|
||||
}
|
||||
i += 1;
|
||||
}
|
||||
}
|
||||
|
||||
SVGShapeData.prototype.setAsAnimated = function () {
|
||||
this._isAnimated = true;
|
||||
};
|
||||
|
||||
export default SVGShapeData;
|
Reference in New Issue
Block a user