add support for playsegments and blend mode on lottie worker
diff --git a/player/js/module_worker.js b/player/js/module_worker.js
index 77dfdbf..fc4faa9 100644
--- a/player/js/module_worker.js
+++ b/player/js/module_worker.js
@@ -348,6 +348,10 @@
if (animations[payload.id]) {
animations[payload.id].resize();
}
+ } else if (type === 'playSegments') {
+ if (animations[payload.id]) {
+ animations[payload.id].playSegments(payload.arr, payload.forceFlag);
+ }
}
};
}
@@ -594,6 +598,16 @@
},
});
},
+ playSegments: function (arr, forceFlag) {
+ workerInstance.postMessage({
+ type: 'playSegments',
+ payload: {
+ id: animationId,
+ arr: arr,
+ forceFlag: forceFlag,
+ },
+ });
+ },
setSubframe: function (value) {
workerInstance.postMessage({
type: 'setSubframe',
diff --git a/player/js/worker_wrapper.js b/player/js/worker_wrapper.js
index 598289b..52559ee 100644
--- a/player/js/worker_wrapper.js
+++ b/player/js/worker_wrapper.js
@@ -2,7 +2,7 @@
var localIdCounter = 0;
var animations = {};
- var styleProperties = ['width', 'height', 'display', 'transform', 'opacity', 'contentVisibility'];
+ var styleProperties = ['width', 'height', 'display', 'transform', 'opacity', 'contentVisibility', 'mix-blend-mode'];
function createElement(namespace, type) {
var style = {
serialize: function () {
@@ -295,6 +295,10 @@
if (animations[payload.id]) {
animations[payload.id].resize();
}
+ } else if (type === 'playSegments') {
+ if (animations[payload.id]) {
+ animations[payload.id].playSegments(payload.arr, payload.forceFlag);
+ }
}
};
}
@@ -541,6 +545,16 @@
},
});
},
+ playSegments: function (arr, forceFlag) {
+ workerInstance.postMessage({
+ type: 'playSegments',
+ payload: {
+ id: animationId,
+ arr: arr,
+ forceFlag: forceFlag,
+ },
+ });
+ },
setSubframe: function (value) {
workerInstance.postMessage({
type: 'setSubframe',