subtracting offsetTime for valueAtTime calculation on shapes
diff --git a/player/index.html b/player/index.html
index 3e5534a..5ecf115 100644
--- a/player/index.html
+++ b/player/index.html
@@ -159,7 +159,7 @@
var animData = {
container: elem,
renderer: 'svg',
- loop: false,
+ loop: true,
autoplay: true,
rendererSettings: {
progressiveLoad:true,
diff --git a/player/js/utils/expressions/ExpressionPropertyDecorator.js b/player/js/utils/expressions/ExpressionPropertyDecorator.js
index d4bf918..5bf057d 100644
--- a/player/js/utils/expressions/ExpressionPropertyDecorator.js
+++ b/player/js/utils/expressions/ExpressionPropertyDecorator.js
@@ -290,10 +290,12 @@
lastTime: initialDefaultFrame
};
}
+
+ frameNum *= this.elem.globalData.frameRate;
+ frameNum -= this.offsetTime;
if(frameNum !== this._cachingAtTime.lastTime) {
this._cachingAtTime.lastIndex = this._cachingAtTime.lastTime < frameNum ? this._caching.lastIndex : 0;
this._cachingAtTime.lastTime = frameNum;
- frameNum *= this.elem.globalData.frameRate;
this.interpolateShape(frameNum, this._cachingAtTime.shapeValue, this._cachingAtTime);
}
return this._cachingAtTime.shapeValue;