@ptcwebops/ptcw-design 0.0.14 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/custom-elements/index.d.ts +12 -0
- package/dist/ptcw-design/app-globals-0f993ce5.js +3 -0
- package/dist/ptcw-design/assets/ptc-sprite.svg +67 -0
- package/dist/ptcw-design/css-shim-003e9264.js +4 -0
- package/dist/ptcw-design/dom-1b195079.js +73 -0
- package/dist/{esm → ptcw-design}/icon-asset.entry.js +2 -2
- package/dist/{cjs/index-ac192914.js → ptcw-design/index-f7043a90.js} +1311 -195
- package/dist/ptcw-design/index.esm.js +1 -0
- package/dist/{esm → ptcw-design}/list-item.entry.js +1 -1
- package/dist/{esm → ptcw-design}/lottie-player.entry.js +782 -31
- package/dist/{esm → ptcw-design}/my-component.entry.js +1 -1
- package/dist/ptcw-design/ptc-announcement.entry.js +31 -0
- package/dist/ptcw-design/ptc-button.entry.js +57 -0
- package/dist/{esm → ptcw-design}/ptc-card.entry.js +1 -1
- package/dist/{esm → ptcw-design}/ptc-date.entry.js +1 -1
- package/dist/{esm → ptcw-design}/ptc-footer.entry.js +1 -1
- package/dist/{esm → ptcw-design}/ptc-image.entry.js +1 -1
- package/dist/{esm → ptcw-design}/ptc-img.entry.js +14 -3
- package/dist/{esm → ptcw-design}/ptc-link.entry.js +1 -1
- package/dist/{esm → ptcw-design}/ptc-list.entry.js +1 -1
- package/dist/{esm → ptcw-design}/ptc-lottie.entry.js +1 -1
- package/dist/{esm → ptcw-design}/ptc-nav-item.entry.js +1 -1
- package/dist/{esm → ptcw-design}/ptc-nav.entry.js +1 -1
- package/dist/{esm → ptcw-design}/ptc-overlay.entry.js +1 -1
- package/dist/{esm → ptcw-design}/ptc-para.entry.js +2 -2
- package/dist/{esm → ptcw-design}/ptc-picture.entry.js +1 -1
- package/dist/{esm → ptcw-design}/ptc-spacer.entry.js +1 -1
- package/dist/{esm → ptcw-design}/ptc-span.entry.js +1 -1
- package/dist/ptcw-design/ptc-svg-btn.entry.js +27 -0
- package/dist/{esm → ptcw-design}/ptc-title.entry.js +1 -1
- package/dist/ptcw-design/ptcw-design.css +1030 -2
- package/dist/ptcw-design/ptcw-design.esm.js +122 -1
- package/dist/ptcw-design/shadow-css-c1ad5fdc.js +383 -0
- package/dist/types/components/icon-asset/icon-asset.d.ts +1 -1
- package/dist/types/components/ptc-announcement/ptc-announcement.d.ts +27 -0
- package/dist/types/components/ptc-button/ptc-button.d.ts +13 -1
- package/dist/types/components/ptc-para/ptc-para.d.ts +1 -1
- package/dist/types/components/ptc-svg-btn/ptc-svg-btn.d.ts +4 -0
- package/dist/types/components.d.ts +94 -6
- package/package.json +1 -1
- package/dist/cjs/icon-asset.cjs.entry.js +0 -64
- package/dist/cjs/index.cjs.js +0 -2
- package/dist/cjs/list-item.cjs.entry.js +0 -27
- package/dist/cjs/loader.cjs.js +0 -21
- package/dist/cjs/lottie-player.cjs.entry.js +0 -13476
- package/dist/cjs/my-component.cjs.entry.js +0 -26
- package/dist/cjs/ptc-button.cjs.entry.js +0 -48
- package/dist/cjs/ptc-card.cjs.entry.js +0 -75
- package/dist/cjs/ptc-date.cjs.entry.js +0 -48
- package/dist/cjs/ptc-footer.cjs.entry.js +0 -19
- package/dist/cjs/ptc-image.cjs.entry.js +0 -58
- package/dist/cjs/ptc-img.cjs.entry.js +0 -163
- package/dist/cjs/ptc-link.cjs.entry.js +0 -53
- package/dist/cjs/ptc-list.cjs.entry.js +0 -32
- package/dist/cjs/ptc-lottie.cjs.entry.js +0 -23
- package/dist/cjs/ptc-nav-item.cjs.entry.js +0 -94
- package/dist/cjs/ptc-nav.cjs.entry.js +0 -19
- package/dist/cjs/ptc-overlay.cjs.entry.js +0 -19
- package/dist/cjs/ptc-para.cjs.entry.js +0 -40
- package/dist/cjs/ptc-picture.cjs.entry.js +0 -26
- package/dist/cjs/ptc-spacer.cjs.entry.js +0 -46
- package/dist/cjs/ptc-span.cjs.entry.js +0 -31
- package/dist/cjs/ptc-title.cjs.entry.js +0 -49
- package/dist/cjs/ptcw-design.cjs.js +0 -19
- package/dist/collection/assets/responsive-background-image.min.js +0 -1
- package/dist/collection/collection-manifest.json +0 -38
- package/dist/collection/components/icon-asset/assets/brands.svg +0 -1381
- package/dist/collection/components/icon-asset/assets/footer-social.svg +0 -0
- package/dist/collection/components/icon-asset/assets/ptc-sprite.svg +0 -77
- package/dist/collection/components/icon-asset/assets/regular.svg +0 -463
- package/dist/collection/components/icon-asset/assets/solid.svg +0 -3013
- package/dist/collection/components/icon-asset/assets/svg-with-js.min.css +0 -5
- package/dist/collection/components/icon-asset/icon-asset.css +0 -26
- package/dist/collection/components/icon-asset/icon-asset.js +0 -177
- package/dist/collection/components/list-item/list-item.css +0 -3
- package/dist/collection/components/list-item/list-item.js +0 -63
- package/dist/collection/components/my-component/my-component.css +0 -3
- package/dist/collection/components/my-component/my-component.js +0 -74
- package/dist/collection/components/ptc-button/ptc-button.css +0 -76
- package/dist/collection/components/ptc-button/ptc-button.js +0 -153
- package/dist/collection/components/ptc-card/ptc-card.css +0 -239
- package/dist/collection/components/ptc-card/ptc-card.js +0 -260
- package/dist/collection/components/ptc-date/ptc-date.css +0 -3
- package/dist/collection/components/ptc-date/ptc-date.js +0 -155
- package/dist/collection/components/ptc-footer/ptc-footer.css +0 -40
- package/dist/collection/components/ptc-footer/ptc-footer.js +0 -25
- package/dist/collection/components/ptc-image/ptc-image.css +0 -4
- package/dist/collection/components/ptc-image/ptc-image.js +0 -92
- package/dist/collection/components/ptc-img/ptc-img.css +0 -65
- package/dist/collection/components/ptc-img/ptc-img.js +0 -318
- package/dist/collection/components/ptc-link/ptc-link.css +0 -168
- package/dist/collection/components/ptc-link/ptc-link.js +0 -197
- package/dist/collection/components/ptc-list/ptc-list.css +0 -24
- package/dist/collection/components/ptc-list/ptc-list.js +0 -66
- package/dist/collection/components/ptc-lottie/ptc-lottie.css +0 -5
- package/dist/collection/components/ptc-lottie/ptc-lottie.js +0 -58
- package/dist/collection/components/ptc-nav/ptc-nav.css +0 -29
- package/dist/collection/components/ptc-nav/ptc-nav.js +0 -21
- package/dist/collection/components/ptc-nav-item/ptc-nav-item.css +0 -81
- package/dist/collection/components/ptc-nav-item/ptc-nav-item.js +0 -252
- package/dist/collection/components/ptc-overlay/ptc-overlay.css +0 -3
- package/dist/collection/components/ptc-overlay/ptc-overlay.js +0 -14
- package/dist/collection/components/ptc-para/ptc-para.css +0 -57
- package/dist/collection/components/ptc-para/ptc-para.js +0 -111
- package/dist/collection/components/ptc-picture/ptc-picture.css +0 -3
- package/dist/collection/components/ptc-picture/ptc-picture.js +0 -44
- package/dist/collection/components/ptc-spacer/ptc-spacer.css +0 -307
- package/dist/collection/components/ptc-spacer/ptc-spacer.js +0 -99
- package/dist/collection/components/ptc-span/ptc-span.css +0 -36
- package/dist/collection/components/ptc-span/ptc-span.js +0 -86
- package/dist/collection/components/ptc-title/ptc-title.css +0 -64
- package/dist/collection/components/ptc-title/ptc-title.js +0 -105
- package/dist/collection/index.js +0 -1
- package/dist/collection/utils/interfaces.js +0 -6
- package/dist/collection/utils/utils.js +0 -3
- package/dist/custom-elements/index.js +0 -14381
- package/dist/esm/index-5b1c792c.js +0 -1687
- package/dist/esm/index.js +0 -1
- package/dist/esm/loader.js +0 -17
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/esm/ptc-button.entry.js +0 -44
- package/dist/esm/ptcw-design.js +0 -17
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- package/dist/node_modules/@teamhive/lottie-player/dist/collection/components/lottie-player/lottie-player.css +0 -187
- package/dist/ptcw-design/p-00b6c442.entry.js +0 -1
- package/dist/ptcw-design/p-01dc360c.entry.js +0 -1
- package/dist/ptcw-design/p-07624831.entry.js +0 -1
- package/dist/ptcw-design/p-0a44a2f7.entry.js +0 -1
- package/dist/ptcw-design/p-1a26bade.entry.js +0 -1
- package/dist/ptcw-design/p-2d357f92.entry.js +0 -1
- package/dist/ptcw-design/p-31f4bd0c.entry.js +0 -1
- package/dist/ptcw-design/p-3af43980.entry.js +0 -1
- package/dist/ptcw-design/p-4f366fc3.js +0 -1
- package/dist/ptcw-design/p-662ae9b6.entry.js +0 -1
- package/dist/ptcw-design/p-70adca2e.entry.js +0 -1
- package/dist/ptcw-design/p-76dfa56f.entry.js +0 -1
- package/dist/ptcw-design/p-77f87fa3.entry.js +0 -1
- package/dist/ptcw-design/p-7a63ca63.entry.js +0 -1
- package/dist/ptcw-design/p-83d98048.entry.js +0 -1
- package/dist/ptcw-design/p-85131a2a.entry.js +0 -1
- package/dist/ptcw-design/p-ac0ad25e.entry.js +0 -1
- package/dist/ptcw-design/p-bce4ef8d.entry.js +0 -1
- package/dist/ptcw-design/p-c169281f.entry.js +0 -1
- package/dist/ptcw-design/p-ce8b8a72.entry.js +0 -1
- package/dist/ptcw-design/p-d4f117d2.entry.js +0 -1
- package/dist/ptcw-design/p-fe6a3ba5.entry.js +0 -1
|
@@ -1,28 +1,66 @@
|
|
|
1
|
-
import { r as registerInstance,
|
|
1
|
+
import { r as registerInstance, f as createEvent, h } from './index-f7043a90.js';
|
|
2
|
+
|
|
3
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
4
|
+
|
|
5
|
+
function getDefaultExportFromCjs (x) {
|
|
6
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
7
|
+
}
|
|
2
8
|
|
|
3
9
|
function createCommonjsModule(fn, basedir, module) {
|
|
4
10
|
return module = {
|
|
5
11
|
path: basedir,
|
|
6
12
|
exports: {},
|
|
7
13
|
require: function (path, base) {
|
|
8
|
-
return commonjsRequire();
|
|
14
|
+
return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);
|
|
9
15
|
}
|
|
10
16
|
}, fn(module, module.exports), module.exports;
|
|
11
17
|
}
|
|
12
18
|
|
|
19
|
+
function getDefaultExportFromNamespaceIfPresent (n) {
|
|
20
|
+
return n && Object.prototype.hasOwnProperty.call(n, 'default') ? n['default'] : n;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function getDefaultExportFromNamespaceIfNotNamed (n) {
|
|
24
|
+
return n && Object.prototype.hasOwnProperty.call(n, 'default') && Object.keys(n).length === 1 ? n['default'] : n;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function getAugmentedNamespace(n) {
|
|
28
|
+
if (n.__esModule) return n;
|
|
29
|
+
var a = Object.defineProperty({}, '__esModule', {value: true});
|
|
30
|
+
Object.keys(n).forEach(function (k) {
|
|
31
|
+
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
32
|
+
Object.defineProperty(a, k, d.get ? d : {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () {
|
|
35
|
+
return n[k];
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
return a;
|
|
40
|
+
}
|
|
41
|
+
|
|
13
42
|
function commonjsRequire () {
|
|
14
43
|
throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
|
|
15
44
|
}
|
|
16
45
|
|
|
17
46
|
var lottie_svg = createCommonjsModule(function (module) {
|
|
18
47
|
(typeof navigator !== "undefined") && (function(root, factory) {
|
|
19
|
-
if (
|
|
48
|
+
if (typeof undefined === "function" && undefined.amd) {
|
|
49
|
+
undefined(function() {
|
|
50
|
+
return factory(root);
|
|
51
|
+
});
|
|
52
|
+
} else if ('object' === "object" && module.exports) {
|
|
20
53
|
module.exports = factory(root);
|
|
21
54
|
} else {
|
|
22
55
|
root.lottie = factory(root);
|
|
23
56
|
root.bodymovin = root.lottie;
|
|
24
57
|
}
|
|
25
58
|
}((window || {}), function(window) {
|
|
59
|
+
/* global locationHref:writable, animationManager, subframeEnabled:writable, defaultCurveSegments:writable, roundValues,
|
|
60
|
+
expressionsPlugin:writable, PropertyFactory, ShapePropertyFactory, Matrix, idPrefix:writable */
|
|
61
|
+
/* exported locationHref, subframeEnabled, expressionsPlugin, idPrefix */
|
|
62
|
+
|
|
63
|
+
'use strict';
|
|
26
64
|
|
|
27
65
|
/* exported svgNS, locationHref, initialDefaultFrame */
|
|
28
66
|
|
|
@@ -42,9 +80,12 @@ var subframeEnabled = true;
|
|
|
42
80
|
var idPrefix = '';
|
|
43
81
|
var expressionsPlugin;
|
|
44
82
|
var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
|
83
|
+
var cachedColors = {};
|
|
84
|
+
var bmRnd;
|
|
45
85
|
var bmPow = Math.pow;
|
|
46
86
|
var bmSqrt = Math.sqrt;
|
|
47
87
|
var bmFloor = Math.floor;
|
|
88
|
+
var bmMax = Math.max;
|
|
48
89
|
var bmMin = Math.min;
|
|
49
90
|
|
|
50
91
|
var BMMath = {};
|
|
@@ -77,6 +118,31 @@ var defaultCurveSegments = 150;
|
|
|
77
118
|
var degToRads = Math.PI / 180;
|
|
78
119
|
var roundCorner = 0.5519;
|
|
79
120
|
|
|
121
|
+
function roundValues(flag) {
|
|
122
|
+
if (flag) {
|
|
123
|
+
bmRnd = Math.round;
|
|
124
|
+
} else {
|
|
125
|
+
bmRnd = function (val) {
|
|
126
|
+
return val;
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
roundValues(false);
|
|
131
|
+
|
|
132
|
+
function styleDiv(element) {
|
|
133
|
+
element.style.position = 'absolute';
|
|
134
|
+
element.style.top = 0;
|
|
135
|
+
element.style.left = 0;
|
|
136
|
+
element.style.display = 'block';
|
|
137
|
+
element.style.transformOrigin = '0 0';
|
|
138
|
+
element.style.webkitTransformOrigin = '0 0';
|
|
139
|
+
element.style.backfaceVisibility = 'visible';
|
|
140
|
+
element.style.webkitBackfaceVisibility = 'visible';
|
|
141
|
+
element.style.transformStyle = 'preserve-3d';
|
|
142
|
+
element.style.webkitTransformStyle = 'preserve-3d';
|
|
143
|
+
element.style.mozTransformStyle = 'preserve-3d';
|
|
144
|
+
}
|
|
145
|
+
|
|
80
146
|
function BMEnterFrameEvent(type, currentTime, totalTime, frameMultiplier) {
|
|
81
147
|
this.type = type;
|
|
82
148
|
this.currentTime = currentTime;
|
|
@@ -118,6 +184,11 @@ function BMConfigErrorEvent(nativeError) {
|
|
|
118
184
|
this.nativeError = nativeError;
|
|
119
185
|
}
|
|
120
186
|
|
|
187
|
+
function BMAnimationConfigErrorEvent(type, nativeError) {
|
|
188
|
+
this.type = type;
|
|
189
|
+
this.nativeError = nativeError;
|
|
190
|
+
}
|
|
191
|
+
|
|
121
192
|
var createElementID = (function () {
|
|
122
193
|
var _count = 0;
|
|
123
194
|
return function createID() {
|
|
@@ -147,6 +218,7 @@ function HSVtoRGB(h, s, v) {
|
|
|
147
218
|
case 3: r = p; g = q; b = v; break;
|
|
148
219
|
case 4: r = t; g = p; b = v; break;
|
|
149
220
|
case 5: r = v; g = p; b = q; break;
|
|
221
|
+
default: break;
|
|
150
222
|
}
|
|
151
223
|
return [r,
|
|
152
224
|
g,
|
|
@@ -166,6 +238,7 @@ function RGBtoHSV(r, g, b) {
|
|
|
166
238
|
case r: h = (g - b) + d * (g < b ? 6 : 0); h /= 6 * d; break;
|
|
167
239
|
case g: h = (b - r) + d * 2; h /= 6 * d; break;
|
|
168
240
|
case b: h = (r - g) + d * 4; h /= 6 * d; break;
|
|
241
|
+
default: break;
|
|
169
242
|
}
|
|
170
243
|
|
|
171
244
|
return [
|
|
@@ -857,8 +930,8 @@ var Matrix = (function () {
|
|
|
857
930
|
startdenom = math.pow(width, chunks),
|
|
858
931
|
significance = math.pow(2, digits),
|
|
859
932
|
overflow = significance * 2,
|
|
860
|
-
mask = width - 1
|
|
861
|
-
// node.js crypto module, initialized at the bottom.
|
|
933
|
+
mask = width - 1,
|
|
934
|
+
nodecrypto; // node.js crypto module, initialized at the bottom.
|
|
862
935
|
|
|
863
936
|
//
|
|
864
937
|
// seedrandom()
|
|
@@ -1016,6 +1089,7 @@ var Matrix = (function () {
|
|
|
1016
1089
|
//
|
|
1017
1090
|
function autoseed() {
|
|
1018
1091
|
try {
|
|
1092
|
+
if (nodecrypto) { return tostring(nodecrypto.randomBytes(width)); }
|
|
1019
1093
|
var out = new Uint8Array(width);
|
|
1020
1094
|
(global.crypto || global.msCrypto).getRandomValues(out);
|
|
1021
1095
|
return tostring(out);
|
|
@@ -1541,11 +1615,11 @@ function dataFunctionManager() {
|
|
|
1541
1615
|
}
|
|
1542
1616
|
if (layerData.ty === 0) {
|
|
1543
1617
|
layerData.layers = findCompLayers(layerData.refId, comps);
|
|
1544
|
-
completeLayers(layerData.layers, comps);
|
|
1618
|
+
completeLayers(layerData.layers, comps, fontManager);
|
|
1545
1619
|
} else if (layerData.ty === 4) {
|
|
1546
1620
|
completeShapes(layerData.shapes);
|
|
1547
1621
|
} else if (layerData.ty === 5) {
|
|
1548
|
-
completeText(layerData);
|
|
1622
|
+
completeText(layerData, fontManager);
|
|
1549
1623
|
}
|
|
1550
1624
|
}
|
|
1551
1625
|
}
|
|
@@ -1845,7 +1919,7 @@ function dataFunctionManager() {
|
|
|
1845
1919
|
checkText(animationData);
|
|
1846
1920
|
checkChars(animationData);
|
|
1847
1921
|
checkShapes(animationData);
|
|
1848
|
-
completeLayers(animationData.layers, animationData.assets);
|
|
1922
|
+
completeLayers(animationData.layers, animationData.assets, fontManager);
|
|
1849
1923
|
animationData.__complete = true;
|
|
1850
1924
|
}
|
|
1851
1925
|
|
|
@@ -1899,6 +1973,8 @@ function getFontProperties(fontData) {
|
|
|
1899
1973
|
case 'thin':
|
|
1900
1974
|
fWeight = '200';
|
|
1901
1975
|
break;
|
|
1976
|
+
default:
|
|
1977
|
+
break;
|
|
1902
1978
|
}
|
|
1903
1979
|
}
|
|
1904
1980
|
|
|
@@ -2717,6 +2793,8 @@ var PropertyFactory = (function () {
|
|
|
2717
2793
|
case 1:
|
|
2718
2794
|
p = new KeyframedMultidimensionalProperty(elem, data, mult, container);
|
|
2719
2795
|
break;
|
|
2796
|
+
default:
|
|
2797
|
+
break;
|
|
2720
2798
|
}
|
|
2721
2799
|
}
|
|
2722
2800
|
if (p.effectsSequence.length) {
|
|
@@ -5251,6 +5329,8 @@ TextAnimatorProperty.prototype.getMeasures = function (documentData, lettersChan
|
|
|
5251
5329
|
case 2:
|
|
5252
5330
|
currentLength += (totalLength - documentData.lineWidths[letters[i].line]) / 2;
|
|
5253
5331
|
break;
|
|
5332
|
+
default:
|
|
5333
|
+
break;
|
|
5254
5334
|
}
|
|
5255
5335
|
currentLine = letters[i].line;
|
|
5256
5336
|
}
|
|
@@ -5537,6 +5617,8 @@ TextAnimatorProperty.prototype.getMeasures = function (documentData, lettersChan
|
|
|
5537
5617
|
case 2:
|
|
5538
5618
|
matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]) / 2, 0, 0);
|
|
5539
5619
|
break;
|
|
5620
|
+
default:
|
|
5621
|
+
break;
|
|
5540
5622
|
}
|
|
5541
5623
|
matrixHelper.translate(0, -documentData.ls);
|
|
5542
5624
|
matrixHelper.translate(offf, 0, 0);
|
|
@@ -7257,6 +7339,11 @@ TransformElement.prototype = {
|
|
|
7257
7339
|
if (this.data.ao) {
|
|
7258
7340
|
this.finalTransform.mProp.autoOriented = true;
|
|
7259
7341
|
}
|
|
7342
|
+
|
|
7343
|
+
// TODO: check TYPE 11: Guided elements
|
|
7344
|
+
if (this.data.ty !== 11) {
|
|
7345
|
+
// this.createElements();
|
|
7346
|
+
}
|
|
7260
7347
|
},
|
|
7261
7348
|
renderTransform: function () {
|
|
7262
7349
|
this.finalTransform._opMdf = this.finalTransform.mProp.o._mdf || this._isFirstFrame;
|
|
@@ -7897,6 +7984,68 @@ var SVGElementsRenderer = (function () {
|
|
|
7897
7984
|
return ob;
|
|
7898
7985
|
}());
|
|
7899
7986
|
|
|
7987
|
+
/* global Matrix */
|
|
7988
|
+
|
|
7989
|
+
function ShapeTransformManager() {
|
|
7990
|
+
this.sequences = {};
|
|
7991
|
+
this.sequenceList = [];
|
|
7992
|
+
this.transform_key_count = 0;
|
|
7993
|
+
}
|
|
7994
|
+
|
|
7995
|
+
ShapeTransformManager.prototype = {
|
|
7996
|
+
addTransformSequence: function (transforms) {
|
|
7997
|
+
var i;
|
|
7998
|
+
var len = transforms.length;
|
|
7999
|
+
var key = '_';
|
|
8000
|
+
for (i = 0; i < len; i += 1) {
|
|
8001
|
+
key += transforms[i].transform.key + '_';
|
|
8002
|
+
}
|
|
8003
|
+
var sequence = this.sequences[key];
|
|
8004
|
+
if (!sequence) {
|
|
8005
|
+
sequence = {
|
|
8006
|
+
transforms: [].concat(transforms),
|
|
8007
|
+
finalTransform: new Matrix(),
|
|
8008
|
+
_mdf: false,
|
|
8009
|
+
};
|
|
8010
|
+
this.sequences[key] = sequence;
|
|
8011
|
+
this.sequenceList.push(sequence);
|
|
8012
|
+
}
|
|
8013
|
+
return sequence;
|
|
8014
|
+
},
|
|
8015
|
+
processSequence: function (sequence, isFirstFrame) {
|
|
8016
|
+
var i = 0;
|
|
8017
|
+
var len = sequence.transforms.length;
|
|
8018
|
+
var _mdf = isFirstFrame;
|
|
8019
|
+
while (i < len && !isFirstFrame) {
|
|
8020
|
+
if (sequence.transforms[i].transform.mProps._mdf) {
|
|
8021
|
+
_mdf = true;
|
|
8022
|
+
break;
|
|
8023
|
+
}
|
|
8024
|
+
i += 1;
|
|
8025
|
+
}
|
|
8026
|
+
if (_mdf) {
|
|
8027
|
+
var props;
|
|
8028
|
+
sequence.finalTransform.reset();
|
|
8029
|
+
for (i = len - 1; i >= 0; i -= 1) {
|
|
8030
|
+
props = sequence.transforms[i].transform.mProps.v.props;
|
|
8031
|
+
sequence.finalTransform.transform(props[0], props[1], props[2], props[3], props[4], props[5], props[6], props[7], props[8], props[9], props[10], props[11], props[12], props[13], props[14], props[15]);
|
|
8032
|
+
}
|
|
8033
|
+
}
|
|
8034
|
+
sequence._mdf = _mdf;
|
|
8035
|
+
},
|
|
8036
|
+
processSequences: function (isFirstFrame) {
|
|
8037
|
+
var i;
|
|
8038
|
+
var len = this.sequenceList.length;
|
|
8039
|
+
for (i = 0; i < len; i += 1) {
|
|
8040
|
+
this.processSequence(this.sequenceList[i], isFirstFrame);
|
|
8041
|
+
}
|
|
8042
|
+
},
|
|
8043
|
+
getNewKey: function () {
|
|
8044
|
+
this.transform_key_count += 1;
|
|
8045
|
+
return '_' + this.transform_key_count;
|
|
8046
|
+
},
|
|
8047
|
+
};
|
|
8048
|
+
|
|
7900
8049
|
/* global LayerExpressionInterface, EffectsExpressionInterface, CompExpressionInterface, ShapeExpressionInterface,
|
|
7901
8050
|
TextExpressionInterface, getBlendMode,createElementID, EffectsManager */
|
|
7902
8051
|
|
|
@@ -8297,6 +8446,8 @@ ITextElement.prototype.applyTextPropertiesToMatrix = function (documentData, mat
|
|
|
8297
8446
|
case 2:
|
|
8298
8447
|
matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]) / 2, 0, 0);
|
|
8299
8448
|
break;
|
|
8449
|
+
default:
|
|
8450
|
+
break;
|
|
8300
8451
|
}
|
|
8301
8452
|
matrixHelper.translate(xPos, yPos, 0);
|
|
8302
8453
|
};
|
|
@@ -10785,13 +10936,371 @@ expressionsPlugin = Expressions;
|
|
|
10785
10936
|
/* global BMMath, BezierFactory, createTypedArray, degToRads, shapePool */
|
|
10786
10937
|
|
|
10787
10938
|
var ExpressionManager = (function () {
|
|
10939
|
+
'use strict';
|
|
10788
10940
|
|
|
10789
10941
|
var ob = {};
|
|
10790
10942
|
var Math = BMMath;
|
|
10943
|
+
var window = null;
|
|
10944
|
+
var document = null;
|
|
10945
|
+
var XMLHttpRequest = null;
|
|
10946
|
+
var fetch = null;
|
|
10947
|
+
|
|
10948
|
+
function $bm_isInstanceOfArray(arr) {
|
|
10949
|
+
return arr.constructor === Array || arr.constructor === Float32Array;
|
|
10950
|
+
}
|
|
10951
|
+
|
|
10952
|
+
function isNumerable(tOfV, v) {
|
|
10953
|
+
return tOfV === 'number' || tOfV === 'boolean' || tOfV === 'string' || v instanceof Number;
|
|
10954
|
+
}
|
|
10955
|
+
|
|
10956
|
+
function $bm_neg(a) {
|
|
10957
|
+
var tOfA = typeof a;
|
|
10958
|
+
if (tOfA === 'number' || tOfA === 'boolean' || a instanceof Number) {
|
|
10959
|
+
return -a;
|
|
10960
|
+
}
|
|
10961
|
+
if ($bm_isInstanceOfArray(a)) {
|
|
10962
|
+
var i;
|
|
10963
|
+
var lenA = a.length;
|
|
10964
|
+
var retArr = [];
|
|
10965
|
+
for (i = 0; i < lenA; i += 1) {
|
|
10966
|
+
retArr[i] = -a[i];
|
|
10967
|
+
}
|
|
10968
|
+
return retArr;
|
|
10969
|
+
}
|
|
10970
|
+
if (a.propType) {
|
|
10971
|
+
return a.v;
|
|
10972
|
+
}
|
|
10973
|
+
return -a;
|
|
10974
|
+
}
|
|
10975
|
+
|
|
10976
|
+
var easeInBez = BezierFactory.getBezierEasing(0.333, 0, 0.833, 0.833, 'easeIn').get;
|
|
10977
|
+
var easeOutBez = BezierFactory.getBezierEasing(0.167, 0.167, 0.667, 1, 'easeOut').get;
|
|
10978
|
+
var easeInOutBez = BezierFactory.getBezierEasing(0.33, 0, 0.667, 1, 'easeInOut').get;
|
|
10979
|
+
|
|
10980
|
+
function sum(a, b) {
|
|
10981
|
+
var tOfA = typeof a;
|
|
10982
|
+
var tOfB = typeof b;
|
|
10983
|
+
if (tOfA === 'string' || tOfB === 'string') {
|
|
10984
|
+
return a + b;
|
|
10985
|
+
}
|
|
10986
|
+
if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
|
|
10987
|
+
return a + b;
|
|
10988
|
+
}
|
|
10989
|
+
if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
|
|
10990
|
+
a = a.slice(0);
|
|
10991
|
+
a[0] += b;
|
|
10992
|
+
return a;
|
|
10993
|
+
}
|
|
10994
|
+
if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
|
|
10995
|
+
b = b.slice(0);
|
|
10996
|
+
b[0] = a + b[0];
|
|
10997
|
+
return b;
|
|
10998
|
+
}
|
|
10999
|
+
if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) {
|
|
11000
|
+
var i = 0;
|
|
11001
|
+
var lenA = a.length;
|
|
11002
|
+
var lenB = b.length;
|
|
11003
|
+
var retArr = [];
|
|
11004
|
+
while (i < lenA || i < lenB) {
|
|
11005
|
+
if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) {
|
|
11006
|
+
retArr[i] = a[i] + b[i];
|
|
11007
|
+
} else {
|
|
11008
|
+
retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];
|
|
11009
|
+
}
|
|
11010
|
+
i += 1;
|
|
11011
|
+
}
|
|
11012
|
+
return retArr;
|
|
11013
|
+
}
|
|
11014
|
+
return 0;
|
|
11015
|
+
}
|
|
11016
|
+
var add = sum;
|
|
11017
|
+
|
|
11018
|
+
function sub(a, b) {
|
|
11019
|
+
var tOfA = typeof a;
|
|
11020
|
+
var tOfB = typeof b;
|
|
11021
|
+
if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
|
|
11022
|
+
if (tOfA === 'string') {
|
|
11023
|
+
a = parseInt(a, 10);
|
|
11024
|
+
}
|
|
11025
|
+
if (tOfB === 'string') {
|
|
11026
|
+
b = parseInt(b, 10);
|
|
11027
|
+
}
|
|
11028
|
+
return a - b;
|
|
11029
|
+
}
|
|
11030
|
+
if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
|
|
11031
|
+
a = a.slice(0);
|
|
11032
|
+
a[0] -= b;
|
|
11033
|
+
return a;
|
|
11034
|
+
}
|
|
11035
|
+
if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
|
|
11036
|
+
b = b.slice(0);
|
|
11037
|
+
b[0] = a - b[0];
|
|
11038
|
+
return b;
|
|
11039
|
+
}
|
|
11040
|
+
if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) {
|
|
11041
|
+
var i = 0;
|
|
11042
|
+
var lenA = a.length;
|
|
11043
|
+
var lenB = b.length;
|
|
11044
|
+
var retArr = [];
|
|
11045
|
+
while (i < lenA || i < lenB) {
|
|
11046
|
+
if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) {
|
|
11047
|
+
retArr[i] = a[i] - b[i];
|
|
11048
|
+
} else {
|
|
11049
|
+
retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];
|
|
11050
|
+
}
|
|
11051
|
+
i += 1;
|
|
11052
|
+
}
|
|
11053
|
+
return retArr;
|
|
11054
|
+
}
|
|
11055
|
+
return 0;
|
|
11056
|
+
}
|
|
11057
|
+
|
|
11058
|
+
function mul(a, b) {
|
|
11059
|
+
var tOfA = typeof a;
|
|
11060
|
+
var tOfB = typeof b;
|
|
11061
|
+
var arr;
|
|
11062
|
+
if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
|
|
11063
|
+
return a * b;
|
|
11064
|
+
}
|
|
11065
|
+
|
|
11066
|
+
var i;
|
|
11067
|
+
var len;
|
|
11068
|
+
if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
|
|
11069
|
+
len = a.length;
|
|
11070
|
+
arr = createTypedArray('float32', len);
|
|
11071
|
+
for (i = 0; i < len; i += 1) {
|
|
11072
|
+
arr[i] = a[i] * b;
|
|
11073
|
+
}
|
|
11074
|
+
return arr;
|
|
11075
|
+
}
|
|
11076
|
+
if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
|
|
11077
|
+
len = b.length;
|
|
11078
|
+
arr = createTypedArray('float32', len);
|
|
11079
|
+
for (i = 0; i < len; i += 1) {
|
|
11080
|
+
arr[i] = a * b[i];
|
|
11081
|
+
}
|
|
11082
|
+
return arr;
|
|
11083
|
+
}
|
|
11084
|
+
return 0;
|
|
11085
|
+
}
|
|
10791
11086
|
|
|
10792
|
-
|
|
10793
|
-
|
|
10794
|
-
|
|
11087
|
+
function div(a, b) {
|
|
11088
|
+
var tOfA = typeof a;
|
|
11089
|
+
var tOfB = typeof b;
|
|
11090
|
+
var arr;
|
|
11091
|
+
if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
|
|
11092
|
+
return a / b;
|
|
11093
|
+
}
|
|
11094
|
+
var i;
|
|
11095
|
+
var len;
|
|
11096
|
+
if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
|
|
11097
|
+
len = a.length;
|
|
11098
|
+
arr = createTypedArray('float32', len);
|
|
11099
|
+
for (i = 0; i < len; i += 1) {
|
|
11100
|
+
arr[i] = a[i] / b;
|
|
11101
|
+
}
|
|
11102
|
+
return arr;
|
|
11103
|
+
}
|
|
11104
|
+
if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
|
|
11105
|
+
len = b.length;
|
|
11106
|
+
arr = createTypedArray('float32', len);
|
|
11107
|
+
for (i = 0; i < len; i += 1) {
|
|
11108
|
+
arr[i] = a / b[i];
|
|
11109
|
+
}
|
|
11110
|
+
return arr;
|
|
11111
|
+
}
|
|
11112
|
+
return 0;
|
|
11113
|
+
}
|
|
11114
|
+
function mod(a, b) {
|
|
11115
|
+
if (typeof a === 'string') {
|
|
11116
|
+
a = parseInt(a, 10);
|
|
11117
|
+
}
|
|
11118
|
+
if (typeof b === 'string') {
|
|
11119
|
+
b = parseInt(b, 10);
|
|
11120
|
+
}
|
|
11121
|
+
return a % b;
|
|
11122
|
+
}
|
|
11123
|
+
var $bm_sum = sum;
|
|
11124
|
+
var $bm_sub = sub;
|
|
11125
|
+
var $bm_mul = mul;
|
|
11126
|
+
var $bm_div = div;
|
|
11127
|
+
var $bm_mod = mod;
|
|
11128
|
+
|
|
11129
|
+
function clamp(num, min, max) {
|
|
11130
|
+
if (min > max) {
|
|
11131
|
+
var mm = max;
|
|
11132
|
+
max = min;
|
|
11133
|
+
min = mm;
|
|
11134
|
+
}
|
|
11135
|
+
return Math.min(Math.max(num, min), max);
|
|
11136
|
+
}
|
|
11137
|
+
|
|
11138
|
+
function radiansToDegrees(val) {
|
|
11139
|
+
return val / degToRads;
|
|
11140
|
+
}
|
|
11141
|
+
var radians_to_degrees = radiansToDegrees;
|
|
11142
|
+
|
|
11143
|
+
function degreesToRadians(val) {
|
|
11144
|
+
return val * degToRads;
|
|
11145
|
+
}
|
|
11146
|
+
var degrees_to_radians = radiansToDegrees;
|
|
11147
|
+
|
|
11148
|
+
var helperLengthArray = [0, 0, 0, 0, 0, 0];
|
|
11149
|
+
|
|
11150
|
+
function length(arr1, arr2) {
|
|
11151
|
+
if (typeof arr1 === 'number' || arr1 instanceof Number) {
|
|
11152
|
+
arr2 = arr2 || 0;
|
|
11153
|
+
return Math.abs(arr1 - arr2);
|
|
11154
|
+
}
|
|
11155
|
+
if (!arr2) {
|
|
11156
|
+
arr2 = helperLengthArray;
|
|
11157
|
+
}
|
|
11158
|
+
var i;
|
|
11159
|
+
var len = Math.min(arr1.length, arr2.length);
|
|
11160
|
+
var addedLength = 0;
|
|
11161
|
+
for (i = 0; i < len; i += 1) {
|
|
11162
|
+
addedLength += Math.pow(arr2[i] - arr1[i], 2);
|
|
11163
|
+
}
|
|
11164
|
+
return Math.sqrt(addedLength);
|
|
11165
|
+
}
|
|
11166
|
+
|
|
11167
|
+
function normalize(vec) {
|
|
11168
|
+
return div(vec, length(vec));
|
|
11169
|
+
}
|
|
11170
|
+
|
|
11171
|
+
function rgbToHsl(val) {
|
|
11172
|
+
var r = val[0]; var g = val[1]; var b = val[2];
|
|
11173
|
+
var max = Math.max(r, g, b);
|
|
11174
|
+
var min = Math.min(r, g, b);
|
|
11175
|
+
var h;
|
|
11176
|
+
var s;
|
|
11177
|
+
var l = (max + min) / 2;
|
|
11178
|
+
|
|
11179
|
+
if (max === min) {
|
|
11180
|
+
h = 0; // achromatic
|
|
11181
|
+
s = 0; // achromatic
|
|
11182
|
+
} else {
|
|
11183
|
+
var d = max - min;
|
|
11184
|
+
s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
|
|
11185
|
+
switch (max) {
|
|
11186
|
+
case r: h = (g - b) / d + (g < b ? 6 : 0); break;
|
|
11187
|
+
case g: h = (b - r) / d + 2; break;
|
|
11188
|
+
case b: h = (r - g) / d + 4; break;
|
|
11189
|
+
default: break;
|
|
11190
|
+
}
|
|
11191
|
+
h /= 6;
|
|
11192
|
+
}
|
|
11193
|
+
|
|
11194
|
+
return [h, s, l, val[3]];
|
|
11195
|
+
}
|
|
11196
|
+
|
|
11197
|
+
function hue2rgb(p, q, t) {
|
|
11198
|
+
if (t < 0) t += 1;
|
|
11199
|
+
if (t > 1) t -= 1;
|
|
11200
|
+
if (t < 1 / 6) return p + (q - p) * 6 * t;
|
|
11201
|
+
if (t < 1 / 2) return q;
|
|
11202
|
+
if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
|
|
11203
|
+
return p;
|
|
11204
|
+
}
|
|
11205
|
+
|
|
11206
|
+
function hslToRgb(val) {
|
|
11207
|
+
var h = val[0];
|
|
11208
|
+
var s = val[1];
|
|
11209
|
+
var l = val[2];
|
|
11210
|
+
|
|
11211
|
+
var r;
|
|
11212
|
+
var g;
|
|
11213
|
+
var b;
|
|
11214
|
+
|
|
11215
|
+
if (s === 0) {
|
|
11216
|
+
r = l; // achromatic
|
|
11217
|
+
b = l; // achromatic
|
|
11218
|
+
g = l; // achromatic
|
|
11219
|
+
} else {
|
|
11220
|
+
var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
|
11221
|
+
var p = 2 * l - q;
|
|
11222
|
+
r = hue2rgb(p, q, h + 1 / 3);
|
|
11223
|
+
g = hue2rgb(p, q, h);
|
|
11224
|
+
b = hue2rgb(p, q, h - 1 / 3);
|
|
11225
|
+
}
|
|
11226
|
+
|
|
11227
|
+
return [r, g, b, val[3]];
|
|
11228
|
+
}
|
|
11229
|
+
|
|
11230
|
+
function linear(t, tMin, tMax, value1, value2) {
|
|
11231
|
+
if (value1 === undefined || value2 === undefined) {
|
|
11232
|
+
value1 = tMin;
|
|
11233
|
+
value2 = tMax;
|
|
11234
|
+
tMin = 0;
|
|
11235
|
+
tMax = 1;
|
|
11236
|
+
}
|
|
11237
|
+
if (tMax < tMin) {
|
|
11238
|
+
var _tMin = tMax;
|
|
11239
|
+
tMax = tMin;
|
|
11240
|
+
tMin = _tMin;
|
|
11241
|
+
}
|
|
11242
|
+
if (t <= tMin) {
|
|
11243
|
+
return value1;
|
|
11244
|
+
} if (t >= tMax) {
|
|
11245
|
+
return value2;
|
|
11246
|
+
}
|
|
11247
|
+
var perc = tMax === tMin ? 0 : (t - tMin) / (tMax - tMin);
|
|
11248
|
+
if (!value1.length) {
|
|
11249
|
+
return value1 + (value2 - value1) * perc;
|
|
11250
|
+
}
|
|
11251
|
+
var i;
|
|
11252
|
+
var len = value1.length;
|
|
11253
|
+
var arr = createTypedArray('float32', len);
|
|
11254
|
+
for (i = 0; i < len; i += 1) {
|
|
11255
|
+
arr[i] = value1[i] + (value2[i] - value1[i]) * perc;
|
|
11256
|
+
}
|
|
11257
|
+
return arr;
|
|
11258
|
+
}
|
|
11259
|
+
function random(min, max) {
|
|
11260
|
+
if (max === undefined) {
|
|
11261
|
+
if (min === undefined) {
|
|
11262
|
+
min = 0;
|
|
11263
|
+
max = 1;
|
|
11264
|
+
} else {
|
|
11265
|
+
max = min;
|
|
11266
|
+
min = undefined;
|
|
11267
|
+
}
|
|
11268
|
+
}
|
|
11269
|
+
if (max.length) {
|
|
11270
|
+
var i;
|
|
11271
|
+
var len = max.length;
|
|
11272
|
+
if (!min) {
|
|
11273
|
+
min = createTypedArray('float32', len);
|
|
11274
|
+
}
|
|
11275
|
+
var arr = createTypedArray('float32', len);
|
|
11276
|
+
var rnd = BMMath.random();
|
|
11277
|
+
for (i = 0; i < len; i += 1) {
|
|
11278
|
+
arr[i] = min[i] + rnd * (max[i] - min[i]);
|
|
11279
|
+
}
|
|
11280
|
+
return arr;
|
|
11281
|
+
}
|
|
11282
|
+
if (min === undefined) {
|
|
11283
|
+
min = 0;
|
|
11284
|
+
}
|
|
11285
|
+
var rndm = BMMath.random();
|
|
11286
|
+
return min + rndm * (max - min);
|
|
11287
|
+
}
|
|
11288
|
+
|
|
11289
|
+
function createPath(points, inTangents, outTangents, closed) {
|
|
11290
|
+
var i;
|
|
11291
|
+
var len = points.length;
|
|
11292
|
+
var path = shapePool.newElement();
|
|
11293
|
+
path.setPathData(!!closed, len);
|
|
11294
|
+
var arrPlaceholder = [0, 0];
|
|
11295
|
+
var inVertexPoint;
|
|
11296
|
+
var outVertexPoint;
|
|
11297
|
+
for (i = 0; i < len; i += 1) {
|
|
11298
|
+
inVertexPoint = (inTangents && inTangents[i]) ? inTangents[i] : arrPlaceholder;
|
|
11299
|
+
outVertexPoint = (outTangents && outTangents[i]) ? outTangents[i] : arrPlaceholder;
|
|
11300
|
+
path.setTripleAt(points[i][0], points[i][1], outVertexPoint[0] + points[i][0], outVertexPoint[1] + points[i][1], inVertexPoint[0] + points[i][0], inVertexPoint[1] + points[i][1], i, true);
|
|
11301
|
+
}
|
|
11302
|
+
return path;
|
|
11303
|
+
}
|
|
10795
11304
|
|
|
10796
11305
|
function initiateExpression(elem, data, property) {
|
|
10797
11306
|
var val = data.x;
|
|
@@ -10799,6 +11308,7 @@ var ExpressionManager = (function () {
|
|
|
10799
11308
|
var _needsRandom = val.indexOf('random') !== -1;
|
|
10800
11309
|
var elemType = elem.data.ty;
|
|
10801
11310
|
var transform;
|
|
11311
|
+
var $bm_transform;
|
|
10802
11312
|
var content;
|
|
10803
11313
|
var effect;
|
|
10804
11314
|
var thisProperty = property;
|
|
@@ -10810,14 +11320,39 @@ var ExpressionManager = (function () {
|
|
|
10810
11320
|
});
|
|
10811
11321
|
elem.comp.frameDuration = 1 / elem.comp.globalData.frameRate;
|
|
10812
11322
|
elem.comp.displayStartTime = 0;
|
|
11323
|
+
var inPoint = elem.data.ip / elem.comp.globalData.frameRate;
|
|
11324
|
+
var outPoint = elem.data.op / elem.comp.globalData.frameRate;
|
|
11325
|
+
var width = elem.data.sw ? elem.data.sw : 0;
|
|
11326
|
+
var height = elem.data.sh ? elem.data.sh : 0;
|
|
11327
|
+
var name = elem.data.nm;
|
|
11328
|
+
var loopIn;
|
|
11329
|
+
var loop_in;
|
|
11330
|
+
var loopOut;
|
|
11331
|
+
var loop_out;
|
|
11332
|
+
var smooth;
|
|
11333
|
+
var toWorld;
|
|
11334
|
+
var fromWorld;
|
|
11335
|
+
var fromComp;
|
|
11336
|
+
var toComp;
|
|
11337
|
+
var fromCompToSurface;
|
|
11338
|
+
var position;
|
|
11339
|
+
var rotation;
|
|
11340
|
+
var anchorPoint;
|
|
11341
|
+
var scale;
|
|
10813
11342
|
var thisLayer;
|
|
11343
|
+
var thisComp;
|
|
11344
|
+
var mask;
|
|
11345
|
+
var valueAtTime;
|
|
10814
11346
|
var velocityAtTime;
|
|
10815
11347
|
|
|
10816
11348
|
var scoped_bm_rt;
|
|
10817
11349
|
// val = val.replace(/(\\?"|')((http)(s)?(:\/))?\/.*?(\\?"|')/g, "\"\""); // deter potential network calls
|
|
10818
11350
|
var expression_function = eval('[function _expression_function(){' + val + ';scoped_bm_rt=$bm_rt}]')[0]; // eslint-disable-line no-eval
|
|
11351
|
+
var numKeys = property.kf ? data.k.length : 0;
|
|
11352
|
+
|
|
11353
|
+
var active = !this.data || this.data.hd !== true;
|
|
10819
11354
|
|
|
10820
|
-
|
|
11355
|
+
var wiggle = function wiggle(freq, amp) {
|
|
10821
11356
|
var iWiggle;
|
|
10822
11357
|
var j;
|
|
10823
11358
|
var lenWiggle = this.pv.length ? this.pv.length : 1;
|
|
@@ -10847,37 +11382,211 @@ var ExpressionManager = (function () {
|
|
|
10847
11382
|
return arr;
|
|
10848
11383
|
}
|
|
10849
11384
|
return this.pv + addedAmps[0] + (-amp + amp * 2 * BMMath.random()) * perc;
|
|
10850
|
-
}
|
|
11385
|
+
}.bind(this);
|
|
10851
11386
|
|
|
10852
11387
|
if (thisProperty.loopIn) {
|
|
10853
|
-
thisProperty.loopIn.bind(thisProperty);
|
|
11388
|
+
loopIn = thisProperty.loopIn.bind(thisProperty);
|
|
11389
|
+
loop_in = loopIn;
|
|
10854
11390
|
}
|
|
10855
11391
|
|
|
10856
11392
|
if (thisProperty.loopOut) {
|
|
10857
|
-
thisProperty.loopOut.bind(thisProperty);
|
|
11393
|
+
loopOut = thisProperty.loopOut.bind(thisProperty);
|
|
11394
|
+
loop_out = loopOut;
|
|
10858
11395
|
}
|
|
10859
11396
|
|
|
10860
11397
|
if (thisProperty.smooth) {
|
|
10861
|
-
thisProperty.smooth.bind(thisProperty);
|
|
11398
|
+
smooth = thisProperty.smooth.bind(thisProperty);
|
|
11399
|
+
}
|
|
11400
|
+
|
|
11401
|
+
function loopInDuration(type, duration) {
|
|
11402
|
+
return loopIn(type, duration, true);
|
|
11403
|
+
}
|
|
11404
|
+
|
|
11405
|
+
function loopOutDuration(type, duration) {
|
|
11406
|
+
return loopOut(type, duration, true);
|
|
10862
11407
|
}
|
|
10863
11408
|
|
|
10864
11409
|
if (this.getValueAtTime) {
|
|
10865
|
-
this.getValueAtTime.bind(this);
|
|
11410
|
+
valueAtTime = this.getValueAtTime.bind(this);
|
|
10866
11411
|
}
|
|
10867
11412
|
|
|
10868
11413
|
if (this.getVelocityAtTime) {
|
|
10869
11414
|
velocityAtTime = this.getVelocityAtTime.bind(this);
|
|
10870
11415
|
}
|
|
10871
11416
|
|
|
10872
|
-
elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface);
|
|
11417
|
+
var comp = elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface);
|
|
11418
|
+
|
|
11419
|
+
function lookAt(elem1, elem2) {
|
|
11420
|
+
var fVec = [elem2[0] - elem1[0], elem2[1] - elem1[1], elem2[2] - elem1[2]];
|
|
11421
|
+
var pitch = Math.atan2(fVec[0], Math.sqrt(fVec[1] * fVec[1] + fVec[2] * fVec[2])) / degToRads;
|
|
11422
|
+
var yaw = -Math.atan2(fVec[1], fVec[2]) / degToRads;
|
|
11423
|
+
return [yaw, pitch, 0];
|
|
11424
|
+
}
|
|
11425
|
+
|
|
11426
|
+
function easeOut(t, tMin, tMax, val1, val2) {
|
|
11427
|
+
return applyEase(easeOutBez, t, tMin, tMax, val1, val2);
|
|
11428
|
+
}
|
|
11429
|
+
|
|
11430
|
+
function easeIn(t, tMin, tMax, val1, val2) {
|
|
11431
|
+
return applyEase(easeInBez, t, tMin, tMax, val1, val2);
|
|
11432
|
+
}
|
|
11433
|
+
|
|
11434
|
+
function ease(t, tMin, tMax, val1, val2) {
|
|
11435
|
+
return applyEase(easeInOutBez, t, tMin, tMax, val1, val2);
|
|
11436
|
+
}
|
|
11437
|
+
|
|
11438
|
+
function applyEase(fn, t, tMin, tMax, val1, val2) {
|
|
11439
|
+
if (val1 === undefined) {
|
|
11440
|
+
val1 = tMin;
|
|
11441
|
+
val2 = tMax;
|
|
11442
|
+
} else {
|
|
11443
|
+
t = (t - tMin) / (tMax - tMin);
|
|
11444
|
+
}
|
|
11445
|
+
if (t > 1) {
|
|
11446
|
+
t = 1;
|
|
11447
|
+
} else if (t < 0) {
|
|
11448
|
+
t = 0;
|
|
11449
|
+
}
|
|
11450
|
+
var mult = fn(t);
|
|
11451
|
+
if ($bm_isInstanceOfArray(val1)) {
|
|
11452
|
+
var iKey;
|
|
11453
|
+
var lenKey = val1.length;
|
|
11454
|
+
var arr = createTypedArray('float32', lenKey);
|
|
11455
|
+
for (iKey = 0; iKey < lenKey; iKey += 1) {
|
|
11456
|
+
arr[iKey] = (val2[iKey] - val1[iKey]) * mult + val1[iKey];
|
|
11457
|
+
}
|
|
11458
|
+
return arr;
|
|
11459
|
+
}
|
|
11460
|
+
return (val2 - val1) * mult + val1;
|
|
11461
|
+
}
|
|
11462
|
+
|
|
11463
|
+
function nearestKey(time) {
|
|
11464
|
+
var iKey;
|
|
11465
|
+
var lenKey = data.k.length;
|
|
11466
|
+
var index;
|
|
11467
|
+
var keyTime;
|
|
11468
|
+
if (!data.k.length || typeof (data.k[0]) === 'number') {
|
|
11469
|
+
index = 0;
|
|
11470
|
+
keyTime = 0;
|
|
11471
|
+
} else {
|
|
11472
|
+
index = -1;
|
|
11473
|
+
time *= elem.comp.globalData.frameRate;
|
|
11474
|
+
if (time < data.k[0].t) {
|
|
11475
|
+
index = 1;
|
|
11476
|
+
keyTime = data.k[0].t;
|
|
11477
|
+
} else {
|
|
11478
|
+
for (iKey = 0; iKey < lenKey - 1; iKey += 1) {
|
|
11479
|
+
if (time === data.k[iKey].t) {
|
|
11480
|
+
index = iKey + 1;
|
|
11481
|
+
keyTime = data.k[iKey].t;
|
|
11482
|
+
break;
|
|
11483
|
+
} else if (time > data.k[iKey].t && time < data.k[iKey + 1].t) {
|
|
11484
|
+
if (time - data.k[iKey].t > data.k[iKey + 1].t - time) {
|
|
11485
|
+
index = iKey + 2;
|
|
11486
|
+
keyTime = data.k[iKey + 1].t;
|
|
11487
|
+
} else {
|
|
11488
|
+
index = iKey + 1;
|
|
11489
|
+
keyTime = data.k[iKey].t;
|
|
11490
|
+
}
|
|
11491
|
+
break;
|
|
11492
|
+
}
|
|
11493
|
+
}
|
|
11494
|
+
if (index === -1) {
|
|
11495
|
+
index = iKey + 1;
|
|
11496
|
+
keyTime = data.k[iKey].t;
|
|
11497
|
+
}
|
|
11498
|
+
}
|
|
11499
|
+
}
|
|
11500
|
+
var obKey = {};
|
|
11501
|
+
obKey.index = index;
|
|
11502
|
+
obKey.time = keyTime / elem.comp.globalData.frameRate;
|
|
11503
|
+
return obKey;
|
|
11504
|
+
}
|
|
11505
|
+
|
|
11506
|
+
function key(ind) {
|
|
11507
|
+
var obKey;
|
|
11508
|
+
var iKey;
|
|
11509
|
+
var lenKey;
|
|
11510
|
+
if (!data.k.length || typeof (data.k[0]) === 'number') {
|
|
11511
|
+
throw new Error('The property has no keyframe at index ' + ind);
|
|
11512
|
+
}
|
|
11513
|
+
ind -= 1;
|
|
11514
|
+
obKey = {
|
|
11515
|
+
time: data.k[ind].t / elem.comp.globalData.frameRate,
|
|
11516
|
+
value: [],
|
|
11517
|
+
};
|
|
11518
|
+
var arr = Object.prototype.hasOwnProperty.call(data.k[ind], 's') ? data.k[ind].s : data.k[ind - 1].e;
|
|
11519
|
+
|
|
11520
|
+
lenKey = arr.length;
|
|
11521
|
+
for (iKey = 0; iKey < lenKey; iKey += 1) {
|
|
11522
|
+
obKey[iKey] = arr[iKey];
|
|
11523
|
+
obKey.value[iKey] = arr[iKey];
|
|
11524
|
+
}
|
|
11525
|
+
return obKey;
|
|
11526
|
+
}
|
|
11527
|
+
|
|
11528
|
+
function framesToTime(frames, fps) {
|
|
11529
|
+
if (!fps) {
|
|
11530
|
+
fps = elem.comp.globalData.frameRate;
|
|
11531
|
+
}
|
|
11532
|
+
return frames / fps;
|
|
11533
|
+
}
|
|
11534
|
+
|
|
11535
|
+
function timeToFrames(t, fps) {
|
|
11536
|
+
if (!t && t !== 0) {
|
|
11537
|
+
t = time;
|
|
11538
|
+
}
|
|
11539
|
+
if (!fps) {
|
|
11540
|
+
fps = elem.comp.globalData.frameRate;
|
|
11541
|
+
}
|
|
11542
|
+
return t * fps;
|
|
11543
|
+
}
|
|
10873
11544
|
|
|
10874
11545
|
function seedRandom(seed) {
|
|
10875
11546
|
BMMath.seedrandom(randSeed + seed);
|
|
10876
11547
|
}
|
|
10877
11548
|
|
|
11549
|
+
function sourceRectAtTime() {
|
|
11550
|
+
return elem.sourceRectAtTime();
|
|
11551
|
+
}
|
|
11552
|
+
|
|
11553
|
+
function substring(init, end) {
|
|
11554
|
+
if (typeof value === 'string') {
|
|
11555
|
+
if (end === undefined) {
|
|
11556
|
+
return value.substring(init);
|
|
11557
|
+
}
|
|
11558
|
+
return value.substring(init, end);
|
|
11559
|
+
}
|
|
11560
|
+
return '';
|
|
11561
|
+
}
|
|
11562
|
+
|
|
11563
|
+
function substr(init, end) {
|
|
11564
|
+
if (typeof value === 'string') {
|
|
11565
|
+
if (end === undefined) {
|
|
11566
|
+
return value.substr(init);
|
|
11567
|
+
}
|
|
11568
|
+
return value.substr(init, end);
|
|
11569
|
+
}
|
|
11570
|
+
return '';
|
|
11571
|
+
}
|
|
11572
|
+
|
|
11573
|
+
function posterizeTime(framesPerSecond) {
|
|
11574
|
+
time = framesPerSecond === 0 ? 0 : Math.floor(time * framesPerSecond) / framesPerSecond;
|
|
11575
|
+
value = valueAtTime(time);
|
|
11576
|
+
}
|
|
11577
|
+
|
|
10878
11578
|
var time;
|
|
11579
|
+
var velocity;
|
|
10879
11580
|
var value;
|
|
11581
|
+
var text;
|
|
11582
|
+
var textIndex;
|
|
11583
|
+
var textTotal;
|
|
11584
|
+
var selectorValue;
|
|
11585
|
+
var index = elem.data.ind;
|
|
11586
|
+
var hasParent = !!(elem.hierarchy && elem.hierarchy.length);
|
|
11587
|
+
var parent;
|
|
10880
11588
|
var randSeed = Math.floor(Math.random() * 1000000);
|
|
11589
|
+
var globalData = elem.globalData;
|
|
10881
11590
|
function executeExpression(_value) {
|
|
10882
11591
|
// globalData.pushExpression();
|
|
10883
11592
|
value = _value;
|
|
@@ -10887,16 +11596,31 @@ var ExpressionManager = (function () {
|
|
|
10887
11596
|
if (this.frameExpressionId === elem.globalData.frameId && this.propType !== 'textSelector') {
|
|
10888
11597
|
return value;
|
|
10889
11598
|
}
|
|
11599
|
+
if (this.propType === 'textSelector') {
|
|
11600
|
+
textIndex = this.textIndex;
|
|
11601
|
+
textTotal = this.textTotal;
|
|
11602
|
+
selectorValue = this.selectorValue;
|
|
11603
|
+
}
|
|
10890
11604
|
if (!thisLayer) {
|
|
11605
|
+
text = elem.layerInterface.text;
|
|
10891
11606
|
thisLayer = elem.layerInterface;
|
|
10892
|
-
|
|
10893
|
-
thisLayer.
|
|
10894
|
-
thisLayer.
|
|
10895
|
-
thisLayer.
|
|
10896
|
-
|
|
11607
|
+
thisComp = elem.comp.compInterface;
|
|
11608
|
+
toWorld = thisLayer.toWorld.bind(thisLayer);
|
|
11609
|
+
fromWorld = thisLayer.fromWorld.bind(thisLayer);
|
|
11610
|
+
fromComp = thisLayer.fromComp.bind(thisLayer);
|
|
11611
|
+
toComp = thisLayer.toComp.bind(thisLayer);
|
|
11612
|
+
mask = thisLayer.mask ? thisLayer.mask.bind(thisLayer) : null;
|
|
11613
|
+
fromCompToSurface = fromComp;
|
|
10897
11614
|
}
|
|
10898
11615
|
if (!transform) {
|
|
10899
11616
|
transform = elem.layerInterface('ADBE Transform Group');
|
|
11617
|
+
$bm_transform = transform;
|
|
11618
|
+
if (transform) {
|
|
11619
|
+
anchorPoint = transform.anchorPoint;
|
|
11620
|
+
/* position = transform.position;
|
|
11621
|
+
rotation = transform.rotation;
|
|
11622
|
+
scale = transform.scale; */
|
|
11623
|
+
}
|
|
10900
11624
|
}
|
|
10901
11625
|
|
|
10902
11626
|
if (elemType === 4 && !content) {
|
|
@@ -10905,12 +11629,21 @@ var ExpressionManager = (function () {
|
|
|
10905
11629
|
if (!effect) {
|
|
10906
11630
|
effect = thisLayer(4);
|
|
10907
11631
|
}
|
|
11632
|
+
hasParent = !!(elem.hierarchy && elem.hierarchy.length);
|
|
11633
|
+
if (hasParent && !parent) {
|
|
11634
|
+
parent = elem.hierarchy[0].layerInterface;
|
|
11635
|
+
}
|
|
10908
11636
|
time = this.comp.renderedFrame / this.comp.globalData.frameRate;
|
|
10909
11637
|
if (needsVelocity) {
|
|
10910
|
-
velocityAtTime(time);
|
|
11638
|
+
velocity = velocityAtTime(time);
|
|
10911
11639
|
}
|
|
10912
11640
|
expression_function();
|
|
10913
11641
|
this.frameExpressionId = elem.globalData.frameId;
|
|
11642
|
+
|
|
11643
|
+
// TODO: Check if it's possible to return on ShapeInterface the .v value
|
|
11644
|
+
if (scoped_bm_rt.propType === 'shape') {
|
|
11645
|
+
scoped_bm_rt = scoped_bm_rt.v;
|
|
11646
|
+
}
|
|
10914
11647
|
// globalData.popExpression();
|
|
10915
11648
|
return scoped_bm_rt;
|
|
10916
11649
|
}
|
|
@@ -11577,7 +12310,9 @@ var ShapeExpressionInterface = (function () {
|
|
|
11577
12310
|
arr.push(strokeInterfaceFactory(shapes[i], view[i], propertyGroup));
|
|
11578
12311
|
} else if (shapes[i].ty === 'tm') {
|
|
11579
12312
|
arr.push(trimInterfaceFactory(shapes[i], view[i], propertyGroup));
|
|
11580
|
-
} else if (shapes[i].ty === 'tr')
|
|
12313
|
+
} else if (shapes[i].ty === 'tr') {
|
|
12314
|
+
// arr.push(transformInterfaceFactory(shapes[i],view[i],propertyGroup));
|
|
12315
|
+
} else if (shapes[i].ty === 'el') {
|
|
11581
12316
|
arr.push(ellipseInterfaceFactory(shapes[i], view[i], propertyGroup));
|
|
11582
12317
|
} else if (shapes[i].ty === 'sr') {
|
|
11583
12318
|
arr.push(starInterfaceFactory(shapes[i], view[i], propertyGroup));
|
|
@@ -11592,7 +12327,7 @@ var ShapeExpressionInterface = (function () {
|
|
|
11592
12327
|
} else if (shapes[i].ty === 'gf') {
|
|
11593
12328
|
arr.push(gradientFillInterfaceFactory(shapes[i], view[i], propertyGroup));
|
|
11594
12329
|
} else {
|
|
11595
|
-
arr.push(defaultInterfaceFactory());
|
|
12330
|
+
arr.push(defaultInterfaceFactory(shapes[i], view[i], propertyGroup));
|
|
11596
12331
|
}
|
|
11597
12332
|
}
|
|
11598
12333
|
return arr;
|
|
@@ -12956,7 +13691,9 @@ function setLocationHref(href) {
|
|
|
12956
13691
|
}
|
|
12957
13692
|
|
|
12958
13693
|
function searchAnimations() {
|
|
12959
|
-
{
|
|
13694
|
+
if (standalone === true) {
|
|
13695
|
+
animationManager.searchAnimations(animationData, standalone, renderer);
|
|
13696
|
+
} else {
|
|
12960
13697
|
animationManager.searchAnimations();
|
|
12961
13698
|
}
|
|
12962
13699
|
}
|
|
@@ -12970,6 +13707,9 @@ function setIDPrefix(prefix) {
|
|
|
12970
13707
|
}
|
|
12971
13708
|
|
|
12972
13709
|
function loadAnimation(params) {
|
|
13710
|
+
if (standalone === true) {
|
|
13711
|
+
params.animationData = JSON.parse(animationData);
|
|
13712
|
+
}
|
|
12973
13713
|
return animationManager.loadAnimation(params);
|
|
12974
13714
|
}
|
|
12975
13715
|
|
|
@@ -12990,6 +13730,11 @@ function setQuality(value) {
|
|
|
12990
13730
|
} else if (!isNaN(value) && value > 1) {
|
|
12991
13731
|
defaultCurveSegments = value;
|
|
12992
13732
|
}
|
|
13733
|
+
if (defaultCurveSegments >= 50) {
|
|
13734
|
+
roundValues(false);
|
|
13735
|
+
} else {
|
|
13736
|
+
roundValues(true);
|
|
13737
|
+
}
|
|
12993
13738
|
}
|
|
12994
13739
|
|
|
12995
13740
|
function inBrowser() {
|
|
@@ -13060,15 +13805,18 @@ function getQueryVariable(variable) {
|
|
|
13060
13805
|
}
|
|
13061
13806
|
return null;
|
|
13062
13807
|
}
|
|
13808
|
+
var standalone = '__[STANDALONE]__';
|
|
13809
|
+
var animationData = '__[ANIMATIONDATA]__';
|
|
13810
|
+
var renderer = '';
|
|
13063
13811
|
var queryString;
|
|
13064
|
-
{
|
|
13812
|
+
if (standalone) {
|
|
13065
13813
|
var scripts = document.getElementsByTagName('script');
|
|
13066
13814
|
var index = scripts.length - 1;
|
|
13067
13815
|
var myScript = scripts[index] || {
|
|
13068
13816
|
src: '',
|
|
13069
13817
|
};
|
|
13070
13818
|
queryString = myScript.src.replace(/^[^\?]+\??/, ''); // eslint-disable-line no-useless-escape
|
|
13071
|
-
getQueryVariable('renderer');
|
|
13819
|
+
renderer = getQueryVariable('renderer');
|
|
13072
13820
|
}
|
|
13073
13821
|
var readyStateCheckInterval = setInterval(checkReady, 100);
|
|
13074
13822
|
|
|
@@ -13102,14 +13850,16 @@ var PlayerState;
|
|
|
13102
13850
|
PlayerState["Stopped"] = "stopped";
|
|
13103
13851
|
PlayerState["Frozen"] = "frozen";
|
|
13104
13852
|
PlayerState["Error"] = "error";
|
|
13105
|
-
})(PlayerState || (PlayerState = {}));
|
|
13853
|
+
})(PlayerState || (PlayerState = {}));
|
|
13854
|
+
;
|
|
13106
13855
|
|
|
13107
13856
|
// Define play modes
|
|
13108
13857
|
var PlayMode;
|
|
13109
13858
|
(function (PlayMode) {
|
|
13110
13859
|
PlayMode["Normal"] = "normal";
|
|
13111
13860
|
PlayMode["Bounce"] = "bounce";
|
|
13112
|
-
})(PlayMode || (PlayMode = {}));
|
|
13861
|
+
})(PlayMode || (PlayMode = {}));
|
|
13862
|
+
;
|
|
13113
13863
|
|
|
13114
13864
|
const lottiePlayerCss = ":host{--lottie-player-toolbar-height:35px;--lottie-player-toolbar-background-color:transparent;--lottie-player-toolbar-icon-color:#999;--lottie-player-toolbar-icon-hover-color:#222;--lottie-player-toolbar-icon-active-color:#555;--lottie-player-seeker-track-color:#CCC;--lottie-player-seeker-thumb-color:rgba(0, 107, 120, 0.8);display:block;width:100%;height:100%}.main{box-sizing:border-box;display:inline-grid;grid-auto-columns:auto;grid-template-rows:auto;position:relative;height:inherit;width:inherit}.main.controls{grid-template-rows:1fr var(--lottie-player-toolbar-height)}.animation{overflow:hidden;height:calc(1fr - var(--lottie-player-toolbar-height))}.toolbar{display:grid;grid-template-columns:32px 32px 1fr 32px 32px;align-items:center;justify-items:center;background-color:var(--lottie-player-toolbar-background-color)}.toolbar button{cursor:pointer;fill:var(--lottie-player-toolbar-icon-color);display:flex;background:none;border:0;padding:0;outline:none;height:100%}.toolbar button:hover{fill:var(--lottie-player-toolbar-icon-hover-color)}.toolbar button.active{fill:var(--lottie-player-toolbar-icon-active-color)}.toolbar button.disabled svg{display:none}.toolbar a{filter:grayscale(100%);display:flex;transition:filter .5s, opacity 0.5s;opacity:0.4;height:100%;align-items:center}.toolbar a:hover{filter:none;display:flex;opacity:1}.seeker{-webkit-appearance:none;width:95%;outline:none}.seeker::-webkit-slider-runnable-track{width:100%;height:5px;cursor:pointer;background:var(--lottie-player-seeker-track-color);border-radius:3px}.seeker::-webkit-slider-thumb{height:15px;width:15px;border-radius:50%;background:var(--lottie-player-seeker-thumb-color);cursor:pointer;-webkit-appearance:none;margin-top:-5px}.seeker:focus::-webkit-slider-runnable-track{background:#999}.seeker::-moz-range-track{width:100%;height:5px;cursor:pointer;background:var(--lottie-player-seeker-track-color);border-radius:3px}.seeker::-moz-range-thumb{height:15px;width:15px;border-radius:50%;background:var(--lottie-player-seeker-thumb-color);cursor:pointer}.seeker::-ms-track{width:100%;height:5px;cursor:pointer;background:transparent;border-color:transparent;color:transparent}.seeker::-ms-fill-lower{background:var(--lottie-player-seeker-track-color);border-radius:3px}.seeker::-ms-fill-upper{background:var(--lottie-player-seeker-track-color);border-radius:3px}.seeker::-ms-thumb{border:0;height:15px;width:15px;border-radius:50%;background:var(--lottie-player-seeker-thumb-color);cursor:pointer}.seeker:focus::-ms-fill-lower{background:var(--lottie-player-seeker-track-color)}.seeker:focus::-ms-fill-upper{background:var(--lottie-player-seeker-track-color)}.error{display:flex;justify-content:center;height:100%;align-items:center}";
|
|
13115
13865
|
|
|
@@ -13368,6 +14118,7 @@ const LottiePlayer = class {
|
|
|
13368
14118
|
if (!this._lottie) {
|
|
13369
14119
|
return;
|
|
13370
14120
|
}
|
|
14121
|
+
this._lottie.pause;
|
|
13371
14122
|
this.currentState = PlayerState.Frozen;
|
|
13372
14123
|
this.freezed.emit();
|
|
13373
14124
|
}
|