Merge branch 'master' of github.com:airbnb/lottie-web
diff --git a/README.md b/README.md
index bbc8e86..1dd436d 100644
--- a/README.md
+++ b/README.md
@@ -81,6 +81,10 @@
- **Windows:** Go to Edit > Preferences > Scripting & Expressions... > and check on "Allow Scripts to Write Files and Access Network"
- **Mac:** Go to Adobe After Effects > Preferences > Scripting & Expressions... > and check on "Allow Scripts to Write Files and Access Network"
+**Old Versions**
+- **Windows:** Go to Edit > Preferences > General > and check on "Allow Scripts to Write Files and Access Network"
+- **Mac:** Go to Adobe After Effects > Preferences > General > and check on "Allow Scripts to Write Files and Access Network"
+
# HTML player installation
```bash
# with npm
diff --git a/player/index.html b/player/index.html
index dc7d02c..4310955 100644
--- a/player/index.html
+++ b/player/index.html
@@ -178,6 +178,7 @@
};
// lottie.setQuality('low');
anim = lottie.loadAnimation(animData);
+ anim.setSubframe(false)
</script>
</body>
diff --git a/player/js/utils/expressions/ShapeInterface.js b/player/js/utils/expressions/ShapeInterface.js
index ebd4150..d975f68 100644
--- a/player/js/utils/expressions/ShapeInterface.js
+++ b/player/js/utils/expressions/ShapeInterface.js
@@ -546,6 +546,7 @@
},
'_name': { value: shape.nm },
'ix': { value: shape.ix },
+ 'propertyIndex': { value: shape.ix },
'mn': { value: shape.mn }
});
return interfaceFunction;
diff --git a/player/js/utils/shapes/ShapeModifiers.js b/player/js/utils/shapes/ShapeModifiers.js
index 32f9f98..585f1a8 100644
--- a/player/js/utils/shapes/ShapeModifiers.js
+++ b/player/js/utils/shapes/ShapeModifiers.js
@@ -21,11 +21,13 @@
ShapeModifier.prototype.initModifierProperties = function(){};
ShapeModifier.prototype.addShapeToModifier = function(){};
ShapeModifier.prototype.addShape = function(data){
- if(!this.closed){
+ if (!this.closed) {
+ // Adding shape to dynamic properties. It covers the case where a shape has no effects applied, to reset it's _mdf state on every tick.
+ data.sh.container.addDynamicProperty(data.sh);
var shapeData = {shape:data.sh, data: data, localShapeCollection:shapeCollection_pool.newShapeCollection()};
this.shapes.push(shapeData);
this.addShapeToModifier(shapeData);
- if(this._isAnimated) {
+ if (this._isAnimated) {
data.setAsAnimated();
}
}
diff --git a/player/js/utils/shapes/ShapeProperty.js b/player/js/utils/shapes/ShapeProperty.js
index 34dd68d..cf8ee72 100644
--- a/player/js/utils/shapes/ShapeProperty.js
+++ b/player/js/utils/shapes/ShapeProperty.js
@@ -118,10 +118,13 @@
}
function processEffectsSequence() {
- if(this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) {
+ if (this.elem.globalData.frameId === this.frameId) {
+ return;
+ } else if (!this.effectsSequence.length) {
+ this._mdf = false;
return;
}
- if(this.lock) {
+ if (this.lock) {
this.setVValue(this.pv);
return;
}