valueAtTime fix
diff --git a/player/index.html b/player/index.html
index f29cb3c..4ffaf4f 100644
--- a/player/index.html
+++ b/player/index.html
@@ -129,7 +129,7 @@
rendererSettings: {
progressiveLoad:false
},
- path: 'exports/render/data.json'
+ path: 'exports/render/data_.json'
};
anim = bodymovin.loadAnimation(animData);
diff --git a/player/js/utils/PropertyFactory.js b/player/js/utils/PropertyFactory.js
index 36e3bcd..ca805a0 100644
--- a/player/js/utils/PropertyFactory.js
+++ b/player/js/utils/PropertyFactory.js
@@ -2,8 +2,8 @@
var initFrame = -999999;
- function interpolateValue(frameNum, iterationIndex, previousValue, caching, offsetTime){
- offsetTime = offsetTime === undefined ? this.offsetTime : offsetTime;
+ function interpolateValue(frameNum, iterationIndex, previousValue, caching){
+ var offsetTime = this.offsetTime;
var newValue;
if(previousValue.constructor === Array) {
newValue = Array.apply(null,{length:previousValue.length})
diff --git a/player/js/utils/expressions/ExpressionPropertyDecorator.js b/player/js/utils/expressions/ExpressionPropertyDecorator.js
index e3ddbab..6414f68 100644
--- a/player/js/utils/expressions/ExpressionPropertyDecorator.js
+++ b/player/js/utils/expressions/ExpressionPropertyDecorator.js
@@ -11,8 +11,9 @@
//console.log('this._cachingAtTime', JSON.parse(JSON.stringify(this._cachingAtTime)))
if(frameNum !== this._cachingAtTime.lastFrame) {
frameNum *= this.elem.globalData.frameRate;
+ frameNum -= this.offsetTime;
var i = this._caching.lastFrame < frameNum ? this._caching.lastIndex : 0;
- var interpolationResult = this.interpolateValue(frameNum, i, this.pv, this._cachingAtTime, 0);
+ var interpolationResult = this.interpolateValue(frameNum, i, this.pv, this._cachingAtTime);
this._cachingAtTime.lastIndex = interpolationResult.iterationIndex;
this._cachingAtTime.value = interpolationResult.value;
this._cachingAtTime.lastFrame = frameNum;