tsparticles 2.0.0 → 2.0.1
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/107.js +1 -1
- package/package.json +10 -10
- package/report.html +2 -2
- package/tsparticles.bundle.js +723 -554
- package/tsparticles.bundle.min.js +2 -2
- package/tsparticles.js +1 -1
- package/tsparticles.min.js +1 -1
package/tsparticles.bundle.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Demo / Generator : https://particles.js.org/
|
|
5
5
|
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
6
|
* How to use? : Check the GitHub README
|
|
7
|
-
* v2.0.
|
|
7
|
+
* v2.0.1
|
|
8
8
|
*/
|
|
9
9
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
10
10
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
@@ -326,7 +326,6 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
326
326
|
"Connect": () => (/* reexport */ Connect),
|
|
327
327
|
"ConnectLinks": () => (/* reexport */ ConnectLinks),
|
|
328
328
|
"Container": () => (/* reexport */ Container),
|
|
329
|
-
"DefaultOptions": () => (/* reexport */ DefaultOptions),
|
|
330
329
|
"Destroy": () => (/* reexport */ Destroy),
|
|
331
330
|
"DivEvent": () => (/* reexport */ DivEvent),
|
|
332
331
|
"EventDispatcher": () => (/* reexport */ EventDispatcher),
|
|
@@ -365,6 +364,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
365
364
|
"MoveAttract": () => (/* reexport */ MoveAttract),
|
|
366
365
|
"MoveGravity": () => (/* reexport */ MoveGravity),
|
|
367
366
|
"MovePath": () => (/* reexport */ MovePath),
|
|
367
|
+
"MovePathDelay": () => (/* reexport */ MovePathDelay),
|
|
368
368
|
"MoveTrail": () => (/* reexport */ MoveTrail),
|
|
369
369
|
"Opacity": () => (/* reexport */ Opacity),
|
|
370
370
|
"OpacityAnimation": () => (/* reexport */ OpacityAnimation),
|
|
@@ -460,6 +460,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
460
460
|
"getStyleFromHsl": () => (/* reexport */ getStyleFromHsl),
|
|
461
461
|
"getStyleFromHsv": () => (/* reexport */ getStyleFromHsv),
|
|
462
462
|
"getStyleFromRgb": () => (/* reexport */ getStyleFromRgb),
|
|
463
|
+
"getValue": () => (/* reexport */ getValue),
|
|
463
464
|
"gradient": () => (/* reexport */ gradient),
|
|
464
465
|
"hslToHsv": () => (/* reexport */ hslToHsv),
|
|
465
466
|
"hslToRgb": () => (/* reexport */ hslToRgb),
|
|
@@ -569,6 +570,17 @@ function setRangeValue(source, value) {
|
|
|
569
570
|
max: Math.max(max, value)
|
|
570
571
|
} : setRangeValue(min, max);
|
|
571
572
|
}
|
|
573
|
+
function getValue(options) {
|
|
574
|
+
const random = options.random;
|
|
575
|
+
const {
|
|
576
|
+
enable,
|
|
577
|
+
minimumValue
|
|
578
|
+
} = typeof random === "boolean" ? {
|
|
579
|
+
enable: random,
|
|
580
|
+
minimumValue: 0
|
|
581
|
+
} : random;
|
|
582
|
+
return enable ? getRangeValue(setRangeValue(options.value, minimumValue)) : getRangeValue(options.value);
|
|
583
|
+
}
|
|
572
584
|
function getDistances(pointA, pointB) {
|
|
573
585
|
const dx = pointA.x - pointB.x;
|
|
574
586
|
const dy = pointA.y - pointB.y;
|
|
@@ -1164,11 +1176,43 @@ class DivEvent {
|
|
|
1164
1176
|
this.type = "circle";
|
|
1165
1177
|
}
|
|
1166
1178
|
|
|
1179
|
+
get elementId() {
|
|
1180
|
+
return this.ids;
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1183
|
+
set elementId(value) {
|
|
1184
|
+
this.ids = value;
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
get el() {
|
|
1188
|
+
return this.elementId;
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1191
|
+
set el(value) {
|
|
1192
|
+
this.elementId = value;
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
get ids() {
|
|
1196
|
+
return this.selectors instanceof Array ? this.selectors.map(t => t.replace("#", "")) : this.selectors.replace("#", "");
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1199
|
+
set ids(value) {
|
|
1200
|
+
this.selectors = value instanceof Array ? value.map(t => `#${t}`) : `#${value}`;
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1167
1203
|
load(data) {
|
|
1204
|
+
var _a, _b;
|
|
1205
|
+
|
|
1168
1206
|
if (!data) {
|
|
1169
1207
|
return;
|
|
1170
1208
|
}
|
|
1171
1209
|
|
|
1210
|
+
const ids = (_b = (_a = data.ids) !== null && _a !== void 0 ? _a : data.elementId) !== null && _b !== void 0 ? _b : data.el;
|
|
1211
|
+
|
|
1212
|
+
if (ids !== undefined) {
|
|
1213
|
+
this.ids = ids;
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1172
1216
|
if (data.selectors !== undefined) {
|
|
1173
1217
|
this.selectors = data.selectors;
|
|
1174
1218
|
}
|
|
@@ -1252,26 +1296,54 @@ class Events {
|
|
|
1252
1296
|
this.resize = true;
|
|
1253
1297
|
}
|
|
1254
1298
|
|
|
1299
|
+
get onclick() {
|
|
1300
|
+
return this.onClick;
|
|
1301
|
+
}
|
|
1302
|
+
|
|
1303
|
+
set onclick(value) {
|
|
1304
|
+
this.onClick = value;
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1307
|
+
get ondiv() {
|
|
1308
|
+
return this.onDiv;
|
|
1309
|
+
}
|
|
1310
|
+
|
|
1311
|
+
set ondiv(value) {
|
|
1312
|
+
this.onDiv = value;
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
get onhover() {
|
|
1316
|
+
return this.onHover;
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1319
|
+
set onhover(value) {
|
|
1320
|
+
this.onHover = value;
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1255
1323
|
load(data) {
|
|
1324
|
+
var _a, _b, _c;
|
|
1325
|
+
|
|
1256
1326
|
if (!data) {
|
|
1257
1327
|
return;
|
|
1258
1328
|
}
|
|
1259
1329
|
|
|
1260
|
-
this.onClick.load(data.onClick);
|
|
1261
|
-
const onDiv = data.onDiv;
|
|
1330
|
+
this.onClick.load((_a = data.onClick) !== null && _a !== void 0 ? _a : data.onclick);
|
|
1331
|
+
const onDiv = (_b = data.onDiv) !== null && _b !== void 0 ? _b : data.ondiv;
|
|
1262
1332
|
|
|
1263
|
-
if (onDiv
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1333
|
+
if (onDiv !== undefined) {
|
|
1334
|
+
if (onDiv instanceof Array) {
|
|
1335
|
+
this.onDiv = onDiv.map(div => {
|
|
1336
|
+
const tmp = new DivEvent();
|
|
1337
|
+
tmp.load(div);
|
|
1338
|
+
return tmp;
|
|
1339
|
+
});
|
|
1340
|
+
} else {
|
|
1341
|
+
this.onDiv = new DivEvent();
|
|
1342
|
+
this.onDiv.load(onDiv);
|
|
1343
|
+
}
|
|
1272
1344
|
}
|
|
1273
1345
|
|
|
1274
|
-
this.onHover.load(data.onHover);
|
|
1346
|
+
this.onHover.load((_c = data.onHover) !== null && _c !== void 0 ? _c : data.onhover);
|
|
1275
1347
|
|
|
1276
1348
|
if (data.resize !== undefined) {
|
|
1277
1349
|
this.resize = data.resize;
|
|
@@ -1376,14 +1448,16 @@ class BubbleBase {
|
|
|
1376
1448
|
this.opacity = data.opacity;
|
|
1377
1449
|
}
|
|
1378
1450
|
|
|
1379
|
-
if (data.color
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
this.color
|
|
1384
|
-
|
|
1451
|
+
if (data.color !== undefined) {
|
|
1452
|
+
if (data.color instanceof Array) {
|
|
1453
|
+
this.color = data.color.map(s => OptionsColor.create(undefined, s));
|
|
1454
|
+
} else {
|
|
1455
|
+
if (this.color instanceof Array) {
|
|
1456
|
+
this.color = new OptionsColor();
|
|
1457
|
+
}
|
|
1385
1458
|
|
|
1386
|
-
|
|
1459
|
+
this.color = OptionsColor.create(this.color, data.color);
|
|
1460
|
+
}
|
|
1387
1461
|
}
|
|
1388
1462
|
|
|
1389
1463
|
if (data.size !== undefined) {
|
|
@@ -1400,6 +1474,14 @@ class BubbleDiv extends BubbleBase {
|
|
|
1400
1474
|
this.selectors = [];
|
|
1401
1475
|
}
|
|
1402
1476
|
|
|
1477
|
+
get ids() {
|
|
1478
|
+
return this.selectors instanceof Array ? this.selectors.map(t => t.replace("#", "")) : this.selectors.replace("#", "");
|
|
1479
|
+
}
|
|
1480
|
+
|
|
1481
|
+
set ids(value) {
|
|
1482
|
+
this.selectors = value instanceof Array ? value.map(t => `#${t}`) : `#${value}`;
|
|
1483
|
+
}
|
|
1484
|
+
|
|
1403
1485
|
load(data) {
|
|
1404
1486
|
super.load(data);
|
|
1405
1487
|
|
|
@@ -1407,6 +1489,10 @@ class BubbleDiv extends BubbleBase {
|
|
|
1407
1489
|
return;
|
|
1408
1490
|
}
|
|
1409
1491
|
|
|
1492
|
+
if (data.ids !== undefined) {
|
|
1493
|
+
this.ids = data.ids;
|
|
1494
|
+
}
|
|
1495
|
+
|
|
1410
1496
|
if (data.selectors !== undefined) {
|
|
1411
1497
|
this.selectors = data.selectors;
|
|
1412
1498
|
}
|
|
@@ -1447,7 +1533,7 @@ class ConnectLinks {
|
|
|
1447
1533
|
}
|
|
1448
1534
|
|
|
1449
1535
|
load(data) {
|
|
1450
|
-
if (!data) {
|
|
1536
|
+
if (!(data !== undefined && data.opacity !== undefined)) {
|
|
1451
1537
|
return;
|
|
1452
1538
|
}
|
|
1453
1539
|
|
|
@@ -1466,7 +1552,25 @@ class Connect {
|
|
|
1466
1552
|
this.radius = 60;
|
|
1467
1553
|
}
|
|
1468
1554
|
|
|
1555
|
+
get line_linked() {
|
|
1556
|
+
return this.links;
|
|
1557
|
+
}
|
|
1558
|
+
|
|
1559
|
+
set line_linked(value) {
|
|
1560
|
+
this.links = value;
|
|
1561
|
+
}
|
|
1562
|
+
|
|
1563
|
+
get lineLinked() {
|
|
1564
|
+
return this.links;
|
|
1565
|
+
}
|
|
1566
|
+
|
|
1567
|
+
set lineLinked(value) {
|
|
1568
|
+
this.links = value;
|
|
1569
|
+
}
|
|
1570
|
+
|
|
1469
1571
|
load(data) {
|
|
1572
|
+
var _a, _b;
|
|
1573
|
+
|
|
1470
1574
|
if (!data) {
|
|
1471
1575
|
return;
|
|
1472
1576
|
}
|
|
@@ -1475,7 +1579,7 @@ class Connect {
|
|
|
1475
1579
|
this.distance = data.distance;
|
|
1476
1580
|
}
|
|
1477
1581
|
|
|
1478
|
-
this.links.load(data.links);
|
|
1582
|
+
this.links.load((_b = (_a = data.links) !== null && _a !== void 0 ? _a : data.lineLinked) !== null && _b !== void 0 ? _b : data.line_linked);
|
|
1479
1583
|
|
|
1480
1584
|
if (data.radius !== undefined) {
|
|
1481
1585
|
this.radius = data.radius;
|
|
@@ -1501,7 +1605,9 @@ class GrabLinks {
|
|
|
1501
1605
|
this.blink = data.blink;
|
|
1502
1606
|
}
|
|
1503
1607
|
|
|
1504
|
-
|
|
1608
|
+
if (data.color !== undefined) {
|
|
1609
|
+
this.color = OptionsColor.create(this.color, data.color);
|
|
1610
|
+
}
|
|
1505
1611
|
|
|
1506
1612
|
if (data.consent !== undefined) {
|
|
1507
1613
|
this.consent = data.consent;
|
|
@@ -1521,7 +1627,25 @@ class Grab {
|
|
|
1521
1627
|
this.links = new GrabLinks();
|
|
1522
1628
|
}
|
|
1523
1629
|
|
|
1630
|
+
get line_linked() {
|
|
1631
|
+
return this.links;
|
|
1632
|
+
}
|
|
1633
|
+
|
|
1634
|
+
set line_linked(value) {
|
|
1635
|
+
this.links = value;
|
|
1636
|
+
}
|
|
1637
|
+
|
|
1638
|
+
get lineLinked() {
|
|
1639
|
+
return this.links;
|
|
1640
|
+
}
|
|
1641
|
+
|
|
1642
|
+
set lineLinked(value) {
|
|
1643
|
+
this.links = value;
|
|
1644
|
+
}
|
|
1645
|
+
|
|
1524
1646
|
load(data) {
|
|
1647
|
+
var _a, _b;
|
|
1648
|
+
|
|
1525
1649
|
if (!data) {
|
|
1526
1650
|
return;
|
|
1527
1651
|
}
|
|
@@ -1530,7 +1654,7 @@ class Grab {
|
|
|
1530
1654
|
this.distance = data.distance;
|
|
1531
1655
|
}
|
|
1532
1656
|
|
|
1533
|
-
this.links.load(data.links);
|
|
1657
|
+
this.links.load((_b = (_a = data.links) !== null && _a !== void 0 ? _a : data.lineLinked) !== null && _b !== void 0 ? _b : data.line_linked);
|
|
1534
1658
|
}
|
|
1535
1659
|
|
|
1536
1660
|
}
|
|
@@ -1624,7 +1748,17 @@ class Push {
|
|
|
1624
1748
|
this.quantity = 4;
|
|
1625
1749
|
}
|
|
1626
1750
|
|
|
1751
|
+
get particles_nb() {
|
|
1752
|
+
return this.quantity;
|
|
1753
|
+
}
|
|
1754
|
+
|
|
1755
|
+
set particles_nb(value) {
|
|
1756
|
+
this.quantity = value;
|
|
1757
|
+
}
|
|
1758
|
+
|
|
1627
1759
|
load(data) {
|
|
1760
|
+
var _a;
|
|
1761
|
+
|
|
1628
1762
|
if (!data) {
|
|
1629
1763
|
return;
|
|
1630
1764
|
}
|
|
@@ -1641,8 +1775,10 @@ class Push {
|
|
|
1641
1775
|
this.default = true;
|
|
1642
1776
|
}
|
|
1643
1777
|
|
|
1644
|
-
|
|
1645
|
-
|
|
1778
|
+
const quantity = (_a = data.quantity) !== null && _a !== void 0 ? _a : data.particles_nb;
|
|
1779
|
+
|
|
1780
|
+
if (quantity !== undefined) {
|
|
1781
|
+
this.quantity = quantity;
|
|
1646
1782
|
}
|
|
1647
1783
|
}
|
|
1648
1784
|
|
|
@@ -1653,13 +1789,25 @@ class Remove {
|
|
|
1653
1789
|
this.quantity = 2;
|
|
1654
1790
|
}
|
|
1655
1791
|
|
|
1792
|
+
get particles_nb() {
|
|
1793
|
+
return this.quantity;
|
|
1794
|
+
}
|
|
1795
|
+
|
|
1796
|
+
set particles_nb(value) {
|
|
1797
|
+
this.quantity = value;
|
|
1798
|
+
}
|
|
1799
|
+
|
|
1656
1800
|
load(data) {
|
|
1801
|
+
var _a;
|
|
1802
|
+
|
|
1657
1803
|
if (!data) {
|
|
1658
1804
|
return;
|
|
1659
1805
|
}
|
|
1660
1806
|
|
|
1661
|
-
|
|
1662
|
-
|
|
1807
|
+
const quantity = (_a = data.quantity) !== null && _a !== void 0 ? _a : data.particles_nb;
|
|
1808
|
+
|
|
1809
|
+
if (quantity !== undefined) {
|
|
1810
|
+
this.quantity = quantity;
|
|
1663
1811
|
}
|
|
1664
1812
|
}
|
|
1665
1813
|
|
|
@@ -1714,6 +1862,22 @@ class RepulseDiv extends RepulseBase {
|
|
|
1714
1862
|
this.selectors = [];
|
|
1715
1863
|
}
|
|
1716
1864
|
|
|
1865
|
+
get ids() {
|
|
1866
|
+
if (this.selectors instanceof Array) {
|
|
1867
|
+
return this.selectors.map(t => t.replace("#", ""));
|
|
1868
|
+
} else {
|
|
1869
|
+
return this.selectors.replace("#", "");
|
|
1870
|
+
}
|
|
1871
|
+
}
|
|
1872
|
+
|
|
1873
|
+
set ids(value) {
|
|
1874
|
+
if (value instanceof Array) {
|
|
1875
|
+
this.selectors = value.map(() => `#${value}`);
|
|
1876
|
+
} else {
|
|
1877
|
+
this.selectors = `#${value}`;
|
|
1878
|
+
}
|
|
1879
|
+
}
|
|
1880
|
+
|
|
1717
1881
|
load(data) {
|
|
1718
1882
|
super.load(data);
|
|
1719
1883
|
|
|
@@ -1721,6 +1885,10 @@ class RepulseDiv extends RepulseBase {
|
|
|
1721
1885
|
return;
|
|
1722
1886
|
}
|
|
1723
1887
|
|
|
1888
|
+
if (data.ids !== undefined) {
|
|
1889
|
+
this.ids = data.ids;
|
|
1890
|
+
}
|
|
1891
|
+
|
|
1724
1892
|
if (data.selectors !== undefined) {
|
|
1725
1893
|
this.selectors = data.selectors;
|
|
1726
1894
|
}
|
|
@@ -1761,6 +1929,12 @@ class Slow {
|
|
|
1761
1929
|
this.radius = 200;
|
|
1762
1930
|
}
|
|
1763
1931
|
|
|
1932
|
+
get active() {
|
|
1933
|
+
return false;
|
|
1934
|
+
}
|
|
1935
|
+
|
|
1936
|
+
set active(_value) {}
|
|
1937
|
+
|
|
1764
1938
|
load(data) {
|
|
1765
1939
|
if (!data) {
|
|
1766
1940
|
return;
|
|
@@ -1885,17 +2059,39 @@ class Interactivity {
|
|
|
1885
2059
|
this.modes = new Modes();
|
|
1886
2060
|
}
|
|
1887
2061
|
|
|
2062
|
+
get detect_on() {
|
|
2063
|
+
return this.detectsOn;
|
|
2064
|
+
}
|
|
2065
|
+
|
|
2066
|
+
set detect_on(value) {
|
|
2067
|
+
this.detectsOn = value;
|
|
2068
|
+
}
|
|
2069
|
+
|
|
1888
2070
|
load(data) {
|
|
2071
|
+
var _a, _b, _c;
|
|
2072
|
+
|
|
1889
2073
|
if (!data) {
|
|
1890
2074
|
return;
|
|
1891
2075
|
}
|
|
1892
2076
|
|
|
1893
|
-
|
|
1894
|
-
|
|
2077
|
+
const detectsOn = (_a = data.detectsOn) !== null && _a !== void 0 ? _a : data.detect_on;
|
|
2078
|
+
|
|
2079
|
+
if (detectsOn !== undefined) {
|
|
2080
|
+
this.detectsOn = detectsOn;
|
|
1895
2081
|
}
|
|
1896
2082
|
|
|
1897
2083
|
this.events.load(data.events);
|
|
1898
2084
|
this.modes.load(data.modes);
|
|
2085
|
+
|
|
2086
|
+
if (((_c = (_b = data.modes) === null || _b === void 0 ? void 0 : _b.slow) === null || _c === void 0 ? void 0 : _c.active) === true) {
|
|
2087
|
+
if (this.events.onHover.mode instanceof Array) {
|
|
2088
|
+
if (this.events.onHover.mode.indexOf("slow") < 0) {
|
|
2089
|
+
this.events.onHover.mode.push("slow");
|
|
2090
|
+
}
|
|
2091
|
+
} else if (this.events.onHover.mode !== "slow") {
|
|
2092
|
+
this.events.onHover.mode = [this.events.onHover.mode, "slow"];
|
|
2093
|
+
}
|
|
2094
|
+
}
|
|
1899
2095
|
}
|
|
1900
2096
|
|
|
1901
2097
|
}
|
|
@@ -2050,7 +2246,10 @@ class Theme {
|
|
|
2050
2246
|
}
|
|
2051
2247
|
|
|
2052
2248
|
this.default.load(data.default);
|
|
2053
|
-
|
|
2249
|
+
|
|
2250
|
+
if (data.options !== undefined) {
|
|
2251
|
+
this.options = deepExtend({}, data.options);
|
|
2252
|
+
}
|
|
2054
2253
|
}
|
|
2055
2254
|
|
|
2056
2255
|
}
|
|
@@ -2109,8 +2308,32 @@ class Options {
|
|
|
2109
2308
|
this.zLayers = 100;
|
|
2110
2309
|
}
|
|
2111
2310
|
|
|
2311
|
+
get fps_limit() {
|
|
2312
|
+
return this.fpsLimit;
|
|
2313
|
+
}
|
|
2314
|
+
|
|
2315
|
+
set fps_limit(value) {
|
|
2316
|
+
this.fpsLimit = value;
|
|
2317
|
+
}
|
|
2318
|
+
|
|
2319
|
+
get retina_detect() {
|
|
2320
|
+
return this.detectRetina;
|
|
2321
|
+
}
|
|
2322
|
+
|
|
2323
|
+
set retina_detect(value) {
|
|
2324
|
+
this.detectRetina = value;
|
|
2325
|
+
}
|
|
2326
|
+
|
|
2327
|
+
get backgroundMode() {
|
|
2328
|
+
return this.fullScreen;
|
|
2329
|
+
}
|
|
2330
|
+
|
|
2331
|
+
set backgroundMode(value) {
|
|
2332
|
+
this.fullScreen.load(value);
|
|
2333
|
+
}
|
|
2334
|
+
|
|
2112
2335
|
load(data) {
|
|
2113
|
-
var _a, _b;
|
|
2336
|
+
var _a, _b, _c, _d, _e;
|
|
2114
2337
|
|
|
2115
2338
|
if (!data) {
|
|
2116
2339
|
return;
|
|
@@ -2130,16 +2353,20 @@ class Options {
|
|
|
2130
2353
|
this.autoPlay = data.autoPlay;
|
|
2131
2354
|
}
|
|
2132
2355
|
|
|
2133
|
-
|
|
2134
|
-
|
|
2356
|
+
const detectRetina = (_a = data.detectRetina) !== null && _a !== void 0 ? _a : data.retina_detect;
|
|
2357
|
+
|
|
2358
|
+
if (detectRetina !== undefined) {
|
|
2359
|
+
this.detectRetina = detectRetina;
|
|
2135
2360
|
}
|
|
2136
2361
|
|
|
2137
2362
|
if (data.duration !== undefined) {
|
|
2138
2363
|
this.duration = data.duration;
|
|
2139
2364
|
}
|
|
2140
2365
|
|
|
2141
|
-
|
|
2142
|
-
|
|
2366
|
+
const fpsLimit = (_b = data.fpsLimit) !== null && _b !== void 0 ? _b : data.fps_limit;
|
|
2367
|
+
|
|
2368
|
+
if (fpsLimit !== undefined) {
|
|
2369
|
+
this.fpsLimit = fpsLimit;
|
|
2143
2370
|
}
|
|
2144
2371
|
|
|
2145
2372
|
if (data.pauseOnBlur !== undefined) {
|
|
@@ -2155,11 +2382,12 @@ class Options {
|
|
|
2155
2382
|
}
|
|
2156
2383
|
|
|
2157
2384
|
this.background.load(data.background);
|
|
2385
|
+
const fullScreen = (_c = data.fullScreen) !== null && _c !== void 0 ? _c : data.backgroundMode;
|
|
2158
2386
|
|
|
2159
|
-
if (typeof
|
|
2160
|
-
this.fullScreen.enable =
|
|
2387
|
+
if (typeof fullScreen === "boolean") {
|
|
2388
|
+
this.fullScreen.enable = fullScreen;
|
|
2161
2389
|
} else {
|
|
2162
|
-
this.fullScreen.load(
|
|
2390
|
+
this.fullScreen.load(fullScreen);
|
|
2163
2391
|
}
|
|
2164
2392
|
|
|
2165
2393
|
this.backgroundMask.load(data.backgroundMask);
|
|
@@ -2197,8 +2425,8 @@ class Options {
|
|
|
2197
2425
|
}
|
|
2198
2426
|
}
|
|
2199
2427
|
|
|
2200
|
-
this.defaultDarkTheme = (
|
|
2201
|
-
this.defaultLightTheme = (
|
|
2428
|
+
this.defaultDarkTheme = (_d = __classPrivateFieldGet(this, _Options_instances, "m", _Options_findDefaultTheme).call(this, "dark")) === null || _d === void 0 ? void 0 : _d.name;
|
|
2429
|
+
this.defaultLightTheme = (_e = __classPrivateFieldGet(this, _Options_instances, "m", _Options_findDefaultTheme).call(this, "light")) === null || _e === void 0 ? void 0 : _e.name;
|
|
2202
2430
|
}
|
|
2203
2431
|
|
|
2204
2432
|
setTheme(name) {
|
|
@@ -2236,12 +2464,35 @@ _Options_engine = new WeakMap(), _Options_instances = new WeakSet(), _Options_fi
|
|
|
2236
2464
|
|
|
2237
2465
|
return (_a = this.themes.find(theme => theme.default.value && theme.default.mode === mode)) !== null && _a !== void 0 ? _a : this.themes.find(theme => theme.default.value && theme.default.mode === "any");
|
|
2238
2466
|
};
|
|
2239
|
-
;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/
|
|
2467
|
+
;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Random.js
|
|
2468
|
+
class Random {
|
|
2469
|
+
constructor() {
|
|
2470
|
+
this.enable = false;
|
|
2471
|
+
this.minimumValue = 0;
|
|
2472
|
+
}
|
|
2240
2473
|
|
|
2241
|
-
|
|
2474
|
+
load(data) {
|
|
2475
|
+
if (!data) {
|
|
2476
|
+
return;
|
|
2477
|
+
}
|
|
2478
|
+
|
|
2479
|
+
if (data.enable !== undefined) {
|
|
2480
|
+
this.enable = data.enable;
|
|
2481
|
+
}
|
|
2482
|
+
|
|
2483
|
+
if (data.minimumValue !== undefined) {
|
|
2484
|
+
this.minimumValue = data.minimumValue;
|
|
2485
|
+
}
|
|
2486
|
+
}
|
|
2487
|
+
|
|
2488
|
+
}
|
|
2489
|
+
;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/ValueWithRandom.js
|
|
2490
|
+
|
|
2491
|
+
|
|
2492
|
+
class ValueWithRandom {
|
|
2242
2493
|
constructor() {
|
|
2243
|
-
this.
|
|
2244
|
-
this.
|
|
2494
|
+
this.random = new Random();
|
|
2495
|
+
this.value = 0;
|
|
2245
2496
|
}
|
|
2246
2497
|
|
|
2247
2498
|
load(data) {
|
|
@@ -2249,13 +2500,43 @@ class ParticlesBounce {
|
|
|
2249
2500
|
return;
|
|
2250
2501
|
}
|
|
2251
2502
|
|
|
2252
|
-
if (data.
|
|
2253
|
-
this.
|
|
2503
|
+
if (typeof data.random === "boolean") {
|
|
2504
|
+
this.random.enable = data.random;
|
|
2505
|
+
} else {
|
|
2506
|
+
this.random.load(data.random);
|
|
2507
|
+
}
|
|
2508
|
+
|
|
2509
|
+
if (data.value !== undefined) {
|
|
2510
|
+
this.value = setRangeValue(data.value, this.random.enable ? this.random.minimumValue : undefined);
|
|
2254
2511
|
}
|
|
2512
|
+
}
|
|
2513
|
+
|
|
2514
|
+
}
|
|
2515
|
+
;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Bounce/ParticlesBounceFactor.js
|
|
2516
|
+
|
|
2517
|
+
class ParticlesBounceFactor extends ValueWithRandom {
|
|
2518
|
+
constructor() {
|
|
2519
|
+
super();
|
|
2520
|
+
this.random.minimumValue = 0.1;
|
|
2521
|
+
this.value = 1;
|
|
2522
|
+
}
|
|
2255
2523
|
|
|
2256
|
-
|
|
2257
|
-
|
|
2524
|
+
}
|
|
2525
|
+
;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Bounce/ParticlesBounce.js
|
|
2526
|
+
|
|
2527
|
+
class ParticlesBounce {
|
|
2528
|
+
constructor() {
|
|
2529
|
+
this.horizontal = new ParticlesBounceFactor();
|
|
2530
|
+
this.vertical = new ParticlesBounceFactor();
|
|
2531
|
+
}
|
|
2532
|
+
|
|
2533
|
+
load(data) {
|
|
2534
|
+
if (!data) {
|
|
2535
|
+
return;
|
|
2258
2536
|
}
|
|
2537
|
+
|
|
2538
|
+
this.horizontal.load(data.horizontal);
|
|
2539
|
+
this.vertical.load(data.vertical);
|
|
2259
2540
|
}
|
|
2260
2541
|
|
|
2261
2542
|
}
|
|
@@ -2316,16 +2597,36 @@ class Collisions {
|
|
|
2316
2597
|
;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Collisions/index.js
|
|
2317
2598
|
|
|
2318
2599
|
|
|
2319
|
-
;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Destroy/
|
|
2600
|
+
;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Destroy/SplitFactor.js
|
|
2320
2601
|
|
|
2321
|
-
class
|
|
2602
|
+
class SplitFactor extends ValueWithRandom {
|
|
2322
2603
|
constructor() {
|
|
2323
|
-
|
|
2324
|
-
this.
|
|
2325
|
-
|
|
2604
|
+
super();
|
|
2605
|
+
this.value = 3;
|
|
2606
|
+
}
|
|
2607
|
+
|
|
2608
|
+
}
|
|
2609
|
+
;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Destroy/SplitRate.js
|
|
2610
|
+
|
|
2611
|
+
class SplitRate extends ValueWithRandom {
|
|
2612
|
+
constructor() {
|
|
2613
|
+
super();
|
|
2614
|
+
this.value = {
|
|
2326
2615
|
min: 4,
|
|
2327
2616
|
max: 9
|
|
2328
2617
|
};
|
|
2618
|
+
}
|
|
2619
|
+
|
|
2620
|
+
}
|
|
2621
|
+
;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Destroy/Split.js
|
|
2622
|
+
|
|
2623
|
+
|
|
2624
|
+
|
|
2625
|
+
class Split {
|
|
2626
|
+
constructor() {
|
|
2627
|
+
this.count = 1;
|
|
2628
|
+
this.factor = new SplitFactor();
|
|
2629
|
+
this.rate = new SplitRate();
|
|
2329
2630
|
this.sizeOffset = true;
|
|
2330
2631
|
}
|
|
2331
2632
|
|
|
@@ -2338,16 +2639,13 @@ class Split {
|
|
|
2338
2639
|
this.count = data.count;
|
|
2339
2640
|
}
|
|
2340
2641
|
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
}
|
|
2642
|
+
this.factor.load(data.factor);
|
|
2643
|
+
this.rate.load(data.rate);
|
|
2344
2644
|
|
|
2345
|
-
if (data.
|
|
2346
|
-
this.
|
|
2645
|
+
if (data.particles !== undefined) {
|
|
2646
|
+
this.particles = deepExtend({}, data.particles);
|
|
2347
2647
|
}
|
|
2348
2648
|
|
|
2349
|
-
this.particles = deepExtend({}, data.particles);
|
|
2350
|
-
|
|
2351
2649
|
if (data.sizeOffset !== undefined) {
|
|
2352
2650
|
this.sizeOffset = data.sizeOffset;
|
|
2353
2651
|
}
|
|
@@ -2378,24 +2676,6 @@ class Destroy {
|
|
|
2378
2676
|
;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Destroy/index.js
|
|
2379
2677
|
|
|
2380
2678
|
|
|
2381
|
-
;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/ValueWithRandom.js
|
|
2382
|
-
|
|
2383
|
-
class ValueWithRandom {
|
|
2384
|
-
constructor() {
|
|
2385
|
-
this.value = 0;
|
|
2386
|
-
}
|
|
2387
|
-
|
|
2388
|
-
load(data) {
|
|
2389
|
-
if (!data) {
|
|
2390
|
-
return;
|
|
2391
|
-
}
|
|
2392
|
-
|
|
2393
|
-
if (data.value !== undefined) {
|
|
2394
|
-
this.value = setRangeValue(data.value);
|
|
2395
|
-
}
|
|
2396
|
-
}
|
|
2397
|
-
|
|
2398
|
-
}
|
|
2399
2679
|
;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Life/LifeDelay.js
|
|
2400
2680
|
|
|
2401
2681
|
class LifeDelay extends ValueWithRandom {
|
|
@@ -2422,6 +2702,7 @@ class LifeDelay extends ValueWithRandom {
|
|
|
2422
2702
|
class LifeDuration extends ValueWithRandom {
|
|
2423
2703
|
constructor() {
|
|
2424
2704
|
super();
|
|
2705
|
+
this.random.minimumValue = 0.0001;
|
|
2425
2706
|
this.sync = false;
|
|
2426
2707
|
}
|
|
2427
2708
|
|
|
@@ -2593,7 +2874,6 @@ class Links {
|
|
|
2593
2874
|
|
|
2594
2875
|
}
|
|
2595
2876
|
;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Move/MoveAttract.js
|
|
2596
|
-
|
|
2597
2877
|
class MoveAttract {
|
|
2598
2878
|
constructor() {
|
|
2599
2879
|
this.distance = 200;
|
|
@@ -2604,7 +2884,25 @@ class MoveAttract {
|
|
|
2604
2884
|
};
|
|
2605
2885
|
}
|
|
2606
2886
|
|
|
2887
|
+
get rotateX() {
|
|
2888
|
+
return this.rotate.x;
|
|
2889
|
+
}
|
|
2890
|
+
|
|
2891
|
+
set rotateX(value) {
|
|
2892
|
+
this.rotate.x = value;
|
|
2893
|
+
}
|
|
2894
|
+
|
|
2895
|
+
get rotateY() {
|
|
2896
|
+
return this.rotate.y;
|
|
2897
|
+
}
|
|
2898
|
+
|
|
2899
|
+
set rotateY(value) {
|
|
2900
|
+
this.rotate.y = value;
|
|
2901
|
+
}
|
|
2902
|
+
|
|
2607
2903
|
load(data) {
|
|
2904
|
+
var _a, _b, _c, _d;
|
|
2905
|
+
|
|
2608
2906
|
if (!data) {
|
|
2609
2907
|
return;
|
|
2610
2908
|
}
|
|
@@ -2617,7 +2915,17 @@ class MoveAttract {
|
|
|
2617
2915
|
this.enable = data.enable;
|
|
2618
2916
|
}
|
|
2619
2917
|
|
|
2620
|
-
|
|
2918
|
+
const rotateX = (_b = (_a = data.rotate) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : data.rotateX;
|
|
2919
|
+
|
|
2920
|
+
if (rotateX !== undefined) {
|
|
2921
|
+
this.rotate.x = rotateX;
|
|
2922
|
+
}
|
|
2923
|
+
|
|
2924
|
+
const rotateY = (_d = (_c = data.rotate) === null || _c === void 0 ? void 0 : _c.y) !== null && _d !== void 0 ? _d : data.rotateY;
|
|
2925
|
+
|
|
2926
|
+
if (rotateY !== undefined) {
|
|
2927
|
+
this.rotate.y = rotateY;
|
|
2928
|
+
}
|
|
2621
2929
|
}
|
|
2622
2930
|
|
|
2623
2931
|
}
|
|
@@ -2675,17 +2983,26 @@ class MoveGravity {
|
|
|
2675
2983
|
}
|
|
2676
2984
|
|
|
2677
2985
|
}
|
|
2678
|
-
;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Move/
|
|
2986
|
+
;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Move/Path/MovePathDelay.js
|
|
2679
2987
|
|
|
2680
|
-
class
|
|
2988
|
+
class MovePathDelay extends ValueWithRandom {
|
|
2681
2989
|
constructor() {
|
|
2682
|
-
|
|
2683
|
-
this.delay = 0;
|
|
2684
|
-
this.enable = false;
|
|
2685
|
-
this.options = {};
|
|
2990
|
+
super();
|
|
2686
2991
|
}
|
|
2687
2992
|
|
|
2688
|
-
|
|
2993
|
+
}
|
|
2994
|
+
;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Move/Path/MovePath.js
|
|
2995
|
+
|
|
2996
|
+
|
|
2997
|
+
class MovePath {
|
|
2998
|
+
constructor() {
|
|
2999
|
+
this.clamp = true;
|
|
3000
|
+
this.delay = new MovePathDelay();
|
|
3001
|
+
this.enable = false;
|
|
3002
|
+
this.options = {};
|
|
3003
|
+
}
|
|
3004
|
+
|
|
3005
|
+
load(data) {
|
|
2689
3006
|
if (!data) {
|
|
2690
3007
|
return;
|
|
2691
3008
|
}
|
|
@@ -2694,19 +3011,23 @@ class MovePath {
|
|
|
2694
3011
|
this.clamp = data.clamp;
|
|
2695
3012
|
}
|
|
2696
3013
|
|
|
2697
|
-
|
|
2698
|
-
this.delay = setRangeValue(data.delay);
|
|
2699
|
-
}
|
|
3014
|
+
this.delay.load(data.delay);
|
|
2700
3015
|
|
|
2701
3016
|
if (data.enable !== undefined) {
|
|
2702
3017
|
this.enable = data.enable;
|
|
2703
3018
|
}
|
|
2704
3019
|
|
|
2705
3020
|
this.generator = data.generator;
|
|
2706
|
-
|
|
3021
|
+
|
|
3022
|
+
if (data.options) {
|
|
3023
|
+
this.options = deepExtend(this.options, data.options);
|
|
3024
|
+
}
|
|
2707
3025
|
}
|
|
2708
3026
|
|
|
2709
3027
|
}
|
|
3028
|
+
;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Move/Path/index.js
|
|
3029
|
+
|
|
3030
|
+
|
|
2710
3031
|
;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Move/MoveTrail.js
|
|
2711
3032
|
|
|
2712
3033
|
class MoveTrail {
|
|
@@ -2819,15 +3140,57 @@ class Move {
|
|
|
2819
3140
|
this.warp = false;
|
|
2820
3141
|
}
|
|
2821
3142
|
|
|
3143
|
+
get collisions() {
|
|
3144
|
+
return false;
|
|
3145
|
+
}
|
|
3146
|
+
|
|
3147
|
+
set collisions(value) {}
|
|
3148
|
+
|
|
3149
|
+
get bounce() {
|
|
3150
|
+
return this.collisions;
|
|
3151
|
+
}
|
|
3152
|
+
|
|
3153
|
+
set bounce(value) {
|
|
3154
|
+
this.collisions = value;
|
|
3155
|
+
}
|
|
3156
|
+
|
|
3157
|
+
get out_mode() {
|
|
3158
|
+
return this.outMode;
|
|
3159
|
+
}
|
|
3160
|
+
|
|
3161
|
+
set out_mode(value) {
|
|
3162
|
+
this.outMode = value;
|
|
3163
|
+
}
|
|
3164
|
+
|
|
3165
|
+
get outMode() {
|
|
3166
|
+
return this.outModes.default;
|
|
3167
|
+
}
|
|
3168
|
+
|
|
3169
|
+
set outMode(value) {
|
|
3170
|
+
this.outModes.default = value;
|
|
3171
|
+
}
|
|
3172
|
+
|
|
3173
|
+
get noise() {
|
|
3174
|
+
return this.path;
|
|
3175
|
+
}
|
|
3176
|
+
|
|
3177
|
+
set noise(value) {
|
|
3178
|
+
this.path = value;
|
|
3179
|
+
}
|
|
3180
|
+
|
|
2822
3181
|
load(data) {
|
|
3182
|
+
var _a, _b, _c;
|
|
3183
|
+
|
|
2823
3184
|
if (!data) {
|
|
2824
3185
|
return;
|
|
2825
3186
|
}
|
|
2826
3187
|
|
|
2827
|
-
if (
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
3188
|
+
if (data.angle !== undefined) {
|
|
3189
|
+
if (typeof data.angle === "number") {
|
|
3190
|
+
this.angle.value = data.angle;
|
|
3191
|
+
} else {
|
|
3192
|
+
this.angle.load(data.angle);
|
|
3193
|
+
}
|
|
2831
3194
|
}
|
|
2832
3195
|
|
|
2833
3196
|
this.attract.load(data.attract);
|
|
@@ -2857,18 +3220,19 @@ class Move {
|
|
|
2857
3220
|
}
|
|
2858
3221
|
|
|
2859
3222
|
this.gravity.load(data.gravity);
|
|
3223
|
+
const outMode = (_a = data.outMode) !== null && _a !== void 0 ? _a : data.out_mode;
|
|
2860
3224
|
|
|
2861
|
-
if (data.outModes) {
|
|
2862
|
-
if (typeof data.outModes === "string") {
|
|
3225
|
+
if (data.outModes !== undefined || outMode !== undefined) {
|
|
3226
|
+
if (typeof data.outModes === "string" || data.outModes === undefined && outMode !== undefined) {
|
|
2863
3227
|
this.outModes.load({
|
|
2864
|
-
default: data.outModes
|
|
3228
|
+
default: (_b = data.outModes) !== null && _b !== void 0 ? _b : outMode
|
|
2865
3229
|
});
|
|
2866
3230
|
} else {
|
|
2867
3231
|
this.outModes.load(data.outModes);
|
|
2868
3232
|
}
|
|
2869
3233
|
}
|
|
2870
3234
|
|
|
2871
|
-
this.path.load(data.path);
|
|
3235
|
+
this.path.load((_c = data.path) !== null && _c !== void 0 ? _c : data.noise);
|
|
2872
3236
|
|
|
2873
3237
|
if (data.random !== undefined) {
|
|
2874
3238
|
this.random = data.random;
|
|
@@ -2921,7 +3285,17 @@ class OpacityAnimation extends AnimationOptions {
|
|
|
2921
3285
|
this.sync = false;
|
|
2922
3286
|
}
|
|
2923
3287
|
|
|
3288
|
+
get opacity_min() {
|
|
3289
|
+
return this.minimumValue;
|
|
3290
|
+
}
|
|
3291
|
+
|
|
3292
|
+
set opacity_min(value) {
|
|
3293
|
+
this.minimumValue = value;
|
|
3294
|
+
}
|
|
3295
|
+
|
|
2924
3296
|
load(data) {
|
|
3297
|
+
var _a;
|
|
3298
|
+
|
|
2925
3299
|
if (!data) {
|
|
2926
3300
|
return;
|
|
2927
3301
|
}
|
|
@@ -2936,6 +3310,8 @@ class OpacityAnimation extends AnimationOptions {
|
|
|
2936
3310
|
this.enable = data.enable;
|
|
2937
3311
|
}
|
|
2938
3312
|
|
|
3313
|
+
this.minimumValue = (_a = data.minimumValue) !== null && _a !== void 0 ? _a : data.opacity_min;
|
|
3314
|
+
|
|
2939
3315
|
if (data.speed !== undefined) {
|
|
2940
3316
|
this.speed = data.speed;
|
|
2941
3317
|
}
|
|
@@ -2953,26 +3329,62 @@ class OpacityAnimation extends AnimationOptions {
|
|
|
2953
3329
|
;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Opacity/Opacity.js
|
|
2954
3330
|
|
|
2955
3331
|
|
|
3332
|
+
|
|
2956
3333
|
class Opacity extends ValueWithRandom {
|
|
2957
3334
|
constructor() {
|
|
2958
3335
|
super();
|
|
2959
3336
|
this.animation = new OpacityAnimation();
|
|
3337
|
+
this.random.minimumValue = 0.1;
|
|
2960
3338
|
this.value = 1;
|
|
2961
3339
|
}
|
|
2962
3340
|
|
|
3341
|
+
get anim() {
|
|
3342
|
+
return this.animation;
|
|
3343
|
+
}
|
|
3344
|
+
|
|
3345
|
+
set anim(value) {
|
|
3346
|
+
this.animation = value;
|
|
3347
|
+
}
|
|
3348
|
+
|
|
2963
3349
|
load(data) {
|
|
3350
|
+
var _a;
|
|
3351
|
+
|
|
2964
3352
|
if (!data) {
|
|
2965
3353
|
return;
|
|
2966
3354
|
}
|
|
2967
3355
|
|
|
2968
3356
|
super.load(data);
|
|
2969
|
-
|
|
3357
|
+
const animation = (_a = data.animation) !== null && _a !== void 0 ? _a : data.anim;
|
|
3358
|
+
|
|
3359
|
+
if (animation !== undefined) {
|
|
3360
|
+
this.animation.load(animation);
|
|
3361
|
+
this.value = setRangeValue(this.value, this.animation.enable ? this.animation.minimumValue : undefined);
|
|
3362
|
+
}
|
|
2970
3363
|
}
|
|
2971
3364
|
|
|
2972
3365
|
}
|
|
2973
3366
|
;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Opacity/index.js
|
|
2974
3367
|
|
|
2975
3368
|
|
|
3369
|
+
;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Orbit/OrbitRotation.js
|
|
3370
|
+
|
|
3371
|
+
class OrbitRotation extends ValueWithRandom {
|
|
3372
|
+
constructor() {
|
|
3373
|
+
super();
|
|
3374
|
+
this.value = 45;
|
|
3375
|
+
this.random.enable = false;
|
|
3376
|
+
this.random.minimumValue = 0;
|
|
3377
|
+
}
|
|
3378
|
+
|
|
3379
|
+
load(data) {
|
|
3380
|
+
if (data === undefined) {
|
|
3381
|
+
return;
|
|
3382
|
+
}
|
|
3383
|
+
|
|
3384
|
+
super.load(data);
|
|
3385
|
+
}
|
|
3386
|
+
|
|
3387
|
+
}
|
|
2976
3388
|
;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Orbit/Orbit.js
|
|
2977
3389
|
|
|
2978
3390
|
|
|
@@ -2982,7 +3394,7 @@ class Orbit {
|
|
|
2982
3394
|
this.animation = new AnimationOptions();
|
|
2983
3395
|
this.enable = false;
|
|
2984
3396
|
this.opacity = 1;
|
|
2985
|
-
this.rotation =
|
|
3397
|
+
this.rotation = new OrbitRotation();
|
|
2986
3398
|
this.width = 1;
|
|
2987
3399
|
}
|
|
2988
3400
|
|
|
@@ -2992,10 +3404,7 @@ class Orbit {
|
|
|
2992
3404
|
}
|
|
2993
3405
|
|
|
2994
3406
|
this.animation.load(data.animation);
|
|
2995
|
-
|
|
2996
|
-
if (data.rotation !== undefined) {
|
|
2997
|
-
this.rotation = setRangeValue(data.rotation);
|
|
2998
|
-
}
|
|
3407
|
+
this.rotation.load(data.rotation);
|
|
2999
3408
|
|
|
3000
3409
|
if (data.enable !== undefined) {
|
|
3001
3410
|
this.enable = data.enable;
|
|
@@ -3029,7 +3438,17 @@ class ParticlesDensity {
|
|
|
3029
3438
|
this.factor = 1000;
|
|
3030
3439
|
}
|
|
3031
3440
|
|
|
3441
|
+
get value_area() {
|
|
3442
|
+
return this.area;
|
|
3443
|
+
}
|
|
3444
|
+
|
|
3445
|
+
set value_area(value) {
|
|
3446
|
+
this.area = value;
|
|
3447
|
+
}
|
|
3448
|
+
|
|
3032
3449
|
load(data) {
|
|
3450
|
+
var _a;
|
|
3451
|
+
|
|
3033
3452
|
if (!data) {
|
|
3034
3453
|
return;
|
|
3035
3454
|
}
|
|
@@ -3038,8 +3457,10 @@ class ParticlesDensity {
|
|
|
3038
3457
|
this.enable = data.enable;
|
|
3039
3458
|
}
|
|
3040
3459
|
|
|
3041
|
-
|
|
3042
|
-
|
|
3460
|
+
const area = (_a = data.area) !== null && _a !== void 0 ? _a : data.value_area;
|
|
3461
|
+
|
|
3462
|
+
if (area !== undefined) {
|
|
3463
|
+
this.area = area;
|
|
3043
3464
|
}
|
|
3044
3465
|
|
|
3045
3466
|
if (data.factor !== undefined) {
|
|
@@ -3057,15 +3478,26 @@ class ParticlesNumber {
|
|
|
3057
3478
|
this.value = 100;
|
|
3058
3479
|
}
|
|
3059
3480
|
|
|
3481
|
+
get max() {
|
|
3482
|
+
return this.limit;
|
|
3483
|
+
}
|
|
3484
|
+
|
|
3485
|
+
set max(value) {
|
|
3486
|
+
this.limit = value;
|
|
3487
|
+
}
|
|
3488
|
+
|
|
3060
3489
|
load(data) {
|
|
3490
|
+
var _a;
|
|
3491
|
+
|
|
3061
3492
|
if (!data) {
|
|
3062
3493
|
return;
|
|
3063
3494
|
}
|
|
3064
3495
|
|
|
3065
3496
|
this.density.load(data.density);
|
|
3497
|
+
const limit = (_a = data.limit) !== null && _a !== void 0 ? _a : data.max;
|
|
3066
3498
|
|
|
3067
|
-
if (
|
|
3068
|
-
this.limit =
|
|
3499
|
+
if (limit !== undefined) {
|
|
3500
|
+
this.limit = limit;
|
|
3069
3501
|
}
|
|
3070
3502
|
|
|
3071
3503
|
if (data.value !== undefined) {
|
|
@@ -3157,7 +3589,10 @@ class Roll {
|
|
|
3157
3589
|
return;
|
|
3158
3590
|
}
|
|
3159
3591
|
|
|
3160
|
-
|
|
3592
|
+
if (data.backColor !== undefined) {
|
|
3593
|
+
this.backColor = OptionsColor.create(this.backColor, data.backColor);
|
|
3594
|
+
}
|
|
3595
|
+
|
|
3161
3596
|
this.darken.load(data.darken);
|
|
3162
3597
|
|
|
3163
3598
|
if (data.enable !== undefined) {
|
|
@@ -3291,30 +3726,127 @@ class Shape {
|
|
|
3291
3726
|
this.type = "circle";
|
|
3292
3727
|
}
|
|
3293
3728
|
|
|
3294
|
-
|
|
3729
|
+
get image() {
|
|
3730
|
+
var _a;
|
|
3731
|
+
|
|
3732
|
+
return (_a = this.options["image"]) !== null && _a !== void 0 ? _a : this.options["images"];
|
|
3733
|
+
}
|
|
3734
|
+
|
|
3735
|
+
set image(value) {
|
|
3736
|
+
this.options["image"] = value;
|
|
3737
|
+
this.options["images"] = value;
|
|
3738
|
+
}
|
|
3739
|
+
|
|
3740
|
+
get custom() {
|
|
3741
|
+
return this.options;
|
|
3742
|
+
}
|
|
3743
|
+
|
|
3744
|
+
set custom(value) {
|
|
3745
|
+
this.options = value;
|
|
3746
|
+
}
|
|
3747
|
+
|
|
3748
|
+
get images() {
|
|
3749
|
+
return this.image;
|
|
3750
|
+
}
|
|
3751
|
+
|
|
3752
|
+
set images(value) {
|
|
3753
|
+
this.image = value;
|
|
3754
|
+
}
|
|
3755
|
+
|
|
3756
|
+
get stroke() {
|
|
3757
|
+
return [];
|
|
3758
|
+
}
|
|
3759
|
+
|
|
3760
|
+
set stroke(_value) {}
|
|
3761
|
+
|
|
3762
|
+
get character() {
|
|
3295
3763
|
var _a;
|
|
3296
3764
|
|
|
3765
|
+
return (_a = this.options["character"]) !== null && _a !== void 0 ? _a : this.options["char"];
|
|
3766
|
+
}
|
|
3767
|
+
|
|
3768
|
+
set character(value) {
|
|
3769
|
+
this.options["character"] = value;
|
|
3770
|
+
this.options["char"] = value;
|
|
3771
|
+
}
|
|
3772
|
+
|
|
3773
|
+
get polygon() {
|
|
3774
|
+
var _a;
|
|
3775
|
+
|
|
3776
|
+
return (_a = this.options["polygon"]) !== null && _a !== void 0 ? _a : this.options["star"];
|
|
3777
|
+
}
|
|
3778
|
+
|
|
3779
|
+
set polygon(value) {
|
|
3780
|
+
this.options["polygon"] = value;
|
|
3781
|
+
this.options["star"] = value;
|
|
3782
|
+
}
|
|
3783
|
+
|
|
3784
|
+
load(data) {
|
|
3785
|
+
var _a, _b, _c;
|
|
3786
|
+
|
|
3297
3787
|
if (!data) {
|
|
3298
3788
|
return;
|
|
3299
3789
|
}
|
|
3300
3790
|
|
|
3301
|
-
const options = data.options;
|
|
3791
|
+
const options = (_a = data.options) !== null && _a !== void 0 ? _a : data.custom;
|
|
3302
3792
|
|
|
3303
|
-
if (options) {
|
|
3304
|
-
for (const shape
|
|
3793
|
+
if (options !== undefined) {
|
|
3794
|
+
for (const shape in options) {
|
|
3305
3795
|
const item = options[shape];
|
|
3306
3796
|
|
|
3307
3797
|
if (item) {
|
|
3308
|
-
this.options[shape] = deepExtend((
|
|
3798
|
+
this.options[shape] = deepExtend((_b = this.options[shape]) !== null && _b !== void 0 ? _b : {}, item);
|
|
3309
3799
|
}
|
|
3310
3800
|
}
|
|
3311
3801
|
}
|
|
3312
3802
|
|
|
3803
|
+
this.loadShape(data.character, "character", "char", true);
|
|
3804
|
+
this.loadShape(data.polygon, "polygon", "star", false);
|
|
3805
|
+
this.loadShape((_c = data.image) !== null && _c !== void 0 ? _c : data.images, "image", "images", true);
|
|
3806
|
+
|
|
3313
3807
|
if (data.type !== undefined) {
|
|
3314
3808
|
this.type = data.type;
|
|
3315
3809
|
}
|
|
3316
3810
|
}
|
|
3317
3811
|
|
|
3812
|
+
loadShape(item, mainKey, altKey, altOverride) {
|
|
3813
|
+
var _a, _b, _c, _d;
|
|
3814
|
+
|
|
3815
|
+
if (item === undefined) {
|
|
3816
|
+
return;
|
|
3817
|
+
}
|
|
3818
|
+
|
|
3819
|
+
if (item instanceof Array) {
|
|
3820
|
+
if (!(this.options[mainKey] instanceof Array)) {
|
|
3821
|
+
this.options[mainKey] = [];
|
|
3822
|
+
|
|
3823
|
+
if (!this.options[altKey] || altOverride) {
|
|
3824
|
+
this.options[altKey] = [];
|
|
3825
|
+
}
|
|
3826
|
+
}
|
|
3827
|
+
|
|
3828
|
+
this.options[mainKey] = deepExtend((_a = this.options[mainKey]) !== null && _a !== void 0 ? _a : [], item);
|
|
3829
|
+
|
|
3830
|
+
if (!this.options[altKey] || altOverride) {
|
|
3831
|
+
this.options[altKey] = deepExtend((_b = this.options[altKey]) !== null && _b !== void 0 ? _b : [], item);
|
|
3832
|
+
}
|
|
3833
|
+
} else {
|
|
3834
|
+
if (this.options[mainKey] instanceof Array) {
|
|
3835
|
+
this.options[mainKey] = {};
|
|
3836
|
+
|
|
3837
|
+
if (!this.options[altKey] || altOverride) {
|
|
3838
|
+
this.options[altKey] = {};
|
|
3839
|
+
}
|
|
3840
|
+
}
|
|
3841
|
+
|
|
3842
|
+
this.options[mainKey] = deepExtend((_c = this.options[mainKey]) !== null && _c !== void 0 ? _c : {}, item);
|
|
3843
|
+
|
|
3844
|
+
if (!this.options[altKey] || altOverride) {
|
|
3845
|
+
this.options[altKey] = deepExtend((_d = this.options[altKey]) !== null && _d !== void 0 ? _d : {}, item);
|
|
3846
|
+
}
|
|
3847
|
+
}
|
|
3848
|
+
}
|
|
3849
|
+
|
|
3318
3850
|
}
|
|
3319
3851
|
;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Shape/index.js
|
|
3320
3852
|
|
|
@@ -3330,7 +3862,17 @@ class SizeAnimation extends AnimationOptions {
|
|
|
3330
3862
|
this.sync = false;
|
|
3331
3863
|
}
|
|
3332
3864
|
|
|
3865
|
+
get size_min() {
|
|
3866
|
+
return this.minimumValue;
|
|
3867
|
+
}
|
|
3868
|
+
|
|
3869
|
+
set size_min(value) {
|
|
3870
|
+
this.minimumValue = value;
|
|
3871
|
+
}
|
|
3872
|
+
|
|
3333
3873
|
load(data) {
|
|
3874
|
+
var _a;
|
|
3875
|
+
|
|
3334
3876
|
super.load(data);
|
|
3335
3877
|
|
|
3336
3878
|
if (!data) {
|
|
@@ -3345,6 +3887,8 @@ class SizeAnimation extends AnimationOptions {
|
|
|
3345
3887
|
this.enable = data.enable;
|
|
3346
3888
|
}
|
|
3347
3889
|
|
|
3890
|
+
this.minimumValue = (_a = data.minimumValue) !== null && _a !== void 0 ? _a : data.size_min;
|
|
3891
|
+
|
|
3348
3892
|
if (data.speed !== undefined) {
|
|
3349
3893
|
this.speed = data.speed;
|
|
3350
3894
|
}
|
|
@@ -3362,21 +3906,38 @@ class SizeAnimation extends AnimationOptions {
|
|
|
3362
3906
|
;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Size/Size.js
|
|
3363
3907
|
|
|
3364
3908
|
|
|
3909
|
+
|
|
3365
3910
|
class Size extends ValueWithRandom {
|
|
3366
3911
|
constructor() {
|
|
3367
3912
|
super();
|
|
3368
3913
|
this.animation = new SizeAnimation();
|
|
3914
|
+
this.random.minimumValue = 1;
|
|
3369
3915
|
this.value = 3;
|
|
3370
3916
|
}
|
|
3371
3917
|
|
|
3918
|
+
get anim() {
|
|
3919
|
+
return this.animation;
|
|
3920
|
+
}
|
|
3921
|
+
|
|
3922
|
+
set anim(value) {
|
|
3923
|
+
this.animation = value;
|
|
3924
|
+
}
|
|
3925
|
+
|
|
3372
3926
|
load(data) {
|
|
3927
|
+
var _a;
|
|
3928
|
+
|
|
3373
3929
|
super.load(data);
|
|
3374
3930
|
|
|
3375
3931
|
if (!data) {
|
|
3376
3932
|
return;
|
|
3377
3933
|
}
|
|
3378
3934
|
|
|
3379
|
-
|
|
3935
|
+
const animation = (_a = data.animation) !== null && _a !== void 0 ? _a : data.anim;
|
|
3936
|
+
|
|
3937
|
+
if (animation !== undefined) {
|
|
3938
|
+
this.animation.load(animation);
|
|
3939
|
+
this.value = setRangeValue(this.value, this.animation.enable ? this.animation.minimumValue : undefined);
|
|
3940
|
+
}
|
|
3380
3941
|
}
|
|
3381
3942
|
|
|
3382
3943
|
}
|
|
@@ -3395,7 +3956,9 @@ class Stroke {
|
|
|
3395
3956
|
return;
|
|
3396
3957
|
}
|
|
3397
3958
|
|
|
3398
|
-
|
|
3959
|
+
if (data.color !== undefined) {
|
|
3960
|
+
this.color = AnimatableColor.create(this.color, data.color);
|
|
3961
|
+
}
|
|
3399
3962
|
|
|
3400
3963
|
if (data.width !== undefined) {
|
|
3401
3964
|
this.width = data.width;
|
|
@@ -3482,7 +4045,9 @@ class TwinkleValues {
|
|
|
3482
4045
|
return;
|
|
3483
4046
|
}
|
|
3484
4047
|
|
|
3485
|
-
|
|
4048
|
+
if (data.color !== undefined) {
|
|
4049
|
+
this.color = OptionsColor.create(this.color, data.color);
|
|
4050
|
+
}
|
|
3486
4051
|
|
|
3487
4052
|
if (data.enable !== undefined) {
|
|
3488
4053
|
this.enable = data.enable;
|
|
@@ -3632,8 +4197,24 @@ class ParticlesOptions {
|
|
|
3632
4197
|
this.zIndex = new ZIndex();
|
|
3633
4198
|
}
|
|
3634
4199
|
|
|
4200
|
+
get line_linked() {
|
|
4201
|
+
return this.links;
|
|
4202
|
+
}
|
|
4203
|
+
|
|
4204
|
+
set line_linked(value) {
|
|
4205
|
+
this.links = value;
|
|
4206
|
+
}
|
|
4207
|
+
|
|
4208
|
+
get lineLinked() {
|
|
4209
|
+
return this.links;
|
|
4210
|
+
}
|
|
4211
|
+
|
|
4212
|
+
set lineLinked(value) {
|
|
4213
|
+
this.links = value;
|
|
4214
|
+
}
|
|
4215
|
+
|
|
3635
4216
|
load(data) {
|
|
3636
|
-
var _a;
|
|
4217
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
3637
4218
|
|
|
3638
4219
|
if (!data) {
|
|
3639
4220
|
return;
|
|
@@ -3643,14 +4224,18 @@ class ParticlesOptions {
|
|
|
3643
4224
|
this.color.load(AnimatableColor.create(this.color, data.color));
|
|
3644
4225
|
this.destroy.load(data.destroy);
|
|
3645
4226
|
this.life.load(data.life);
|
|
3646
|
-
|
|
4227
|
+
const links = (_b = (_a = data.links) !== null && _a !== void 0 ? _a : data.lineLinked) !== null && _b !== void 0 ? _b : data.line_linked;
|
|
4228
|
+
|
|
4229
|
+
if (links !== undefined) {
|
|
4230
|
+
this.links.load(links);
|
|
4231
|
+
}
|
|
3647
4232
|
|
|
3648
4233
|
if (data.groups !== undefined) {
|
|
3649
4234
|
for (const group in data.groups) {
|
|
3650
4235
|
const item = data.groups[group];
|
|
3651
4236
|
|
|
3652
4237
|
if (item !== undefined) {
|
|
3653
|
-
this.groups[group] = deepExtend((
|
|
4238
|
+
this.groups[group] = deepExtend((_c = this.groups[group]) !== null && _c !== void 0 ? _c : {}, item);
|
|
3654
4239
|
}
|
|
3655
4240
|
}
|
|
3656
4241
|
}
|
|
@@ -3674,8 +4259,14 @@ class ParticlesOptions {
|
|
|
3674
4259
|
this.twinkle.load(data.twinkle);
|
|
3675
4260
|
this.wobble.load(data.wobble);
|
|
3676
4261
|
this.zIndex.load(data.zIndex);
|
|
4262
|
+
const collisions = (_e = (_d = data.move) === null || _d === void 0 ? void 0 : _d.collisions) !== null && _e !== void 0 ? _e : (_f = data.move) === null || _f === void 0 ? void 0 : _f.bounce;
|
|
4263
|
+
|
|
4264
|
+
if (collisions !== undefined) {
|
|
4265
|
+
this.collisions.enable = collisions;
|
|
4266
|
+
}
|
|
4267
|
+
|
|
3677
4268
|
this.collisions.load(data.collisions);
|
|
3678
|
-
const strokeToLoad = data.stroke;
|
|
4269
|
+
const strokeToLoad = (_g = data.stroke) !== null && _g !== void 0 ? _g : (_h = data.shape) === null || _h === void 0 ? void 0 : _h.stroke;
|
|
3679
4270
|
|
|
3680
4271
|
if (strokeToLoad) {
|
|
3681
4272
|
if (strokeToLoad instanceof Array) {
|
|
@@ -3939,7 +4530,7 @@ function circleBounceDataFromParticle(p) {
|
|
|
3939
4530
|
radius: p.getRadius(),
|
|
3940
4531
|
mass: p.getMass(),
|
|
3941
4532
|
velocity: p.velocity,
|
|
3942
|
-
factor: Vector.create(
|
|
4533
|
+
factor: Vector.create(getValue(p.options.bounce.horizontal), getValue(p.options.bounce.vertical))
|
|
3943
4534
|
};
|
|
3944
4535
|
}
|
|
3945
4536
|
function circleBounce(p1, p2) {
|
|
@@ -3985,7 +4576,7 @@ function rectBounce(particle, divBounds) {
|
|
|
3985
4576
|
}, {
|
|
3986
4577
|
min: divBounds.top,
|
|
3987
4578
|
max: divBounds.bottom
|
|
3988
|
-
}, particle.velocity.x,
|
|
4579
|
+
}, particle.velocity.x, getValue(particle.options.bounce.horizontal));
|
|
3989
4580
|
|
|
3990
4581
|
if (resH.bounced) {
|
|
3991
4582
|
if (resH.velocity !== undefined) {
|
|
@@ -4009,7 +4600,7 @@ function rectBounce(particle, divBounds) {
|
|
|
4009
4600
|
}, {
|
|
4010
4601
|
min: divBounds.left,
|
|
4011
4602
|
max: divBounds.right
|
|
4012
|
-
}, particle.velocity.y,
|
|
4603
|
+
}, particle.velocity.y, getValue(particle.options.bounce.vertical));
|
|
4013
4604
|
|
|
4014
4605
|
if (resV.bounced) {
|
|
4015
4606
|
if (resV.velocity !== undefined) {
|
|
@@ -4739,427 +5330,6 @@ function alterHsl(color, type, value) {
|
|
|
4739
5330
|
l: color.l + (type === "darken" ? -1 : 1) * value
|
|
4740
5331
|
};
|
|
4741
5332
|
}
|
|
4742
|
-
;// CONCATENATED MODULE: ../../engine/dist/esm/Utils/DefaultOptions.js
|
|
4743
|
-
const DefaultOptions = {
|
|
4744
|
-
autoPlay: true,
|
|
4745
|
-
background: {
|
|
4746
|
-
color: {
|
|
4747
|
-
value: ""
|
|
4748
|
-
},
|
|
4749
|
-
image: "",
|
|
4750
|
-
position: "",
|
|
4751
|
-
repeat: "",
|
|
4752
|
-
size: "",
|
|
4753
|
-
opacity: 1
|
|
4754
|
-
},
|
|
4755
|
-
backgroundMask: {
|
|
4756
|
-
composite: "destination-out",
|
|
4757
|
-
cover: {
|
|
4758
|
-
color: {
|
|
4759
|
-
value: "#fff"
|
|
4760
|
-
},
|
|
4761
|
-
opacity: 1
|
|
4762
|
-
},
|
|
4763
|
-
enable: false
|
|
4764
|
-
},
|
|
4765
|
-
fullScreen: {
|
|
4766
|
-
enable: true,
|
|
4767
|
-
zIndex: 0
|
|
4768
|
-
},
|
|
4769
|
-
detectRetina: true,
|
|
4770
|
-
duration: 0,
|
|
4771
|
-
fpsLimit: 60,
|
|
4772
|
-
interactivity: {
|
|
4773
|
-
detectsOn: "window",
|
|
4774
|
-
events: {
|
|
4775
|
-
onClick: {
|
|
4776
|
-
enable: false,
|
|
4777
|
-
mode: []
|
|
4778
|
-
},
|
|
4779
|
-
onDiv: {
|
|
4780
|
-
selectors: [],
|
|
4781
|
-
enable: false,
|
|
4782
|
-
mode: [],
|
|
4783
|
-
type: "circle"
|
|
4784
|
-
},
|
|
4785
|
-
onHover: {
|
|
4786
|
-
enable: false,
|
|
4787
|
-
mode: [],
|
|
4788
|
-
parallax: {
|
|
4789
|
-
enable: false,
|
|
4790
|
-
force: 2,
|
|
4791
|
-
smooth: 10
|
|
4792
|
-
}
|
|
4793
|
-
},
|
|
4794
|
-
resize: true
|
|
4795
|
-
},
|
|
4796
|
-
modes: {
|
|
4797
|
-
attract: {
|
|
4798
|
-
distance: 200,
|
|
4799
|
-
duration: 0.4,
|
|
4800
|
-
easing: "ease-out-quad",
|
|
4801
|
-
factor: 1,
|
|
4802
|
-
maxSpeed: 50,
|
|
4803
|
-
speed: 1
|
|
4804
|
-
},
|
|
4805
|
-
bounce: {
|
|
4806
|
-
distance: 200
|
|
4807
|
-
},
|
|
4808
|
-
bubble: {
|
|
4809
|
-
distance: 200,
|
|
4810
|
-
duration: 0.4,
|
|
4811
|
-
mix: false
|
|
4812
|
-
},
|
|
4813
|
-
connect: {
|
|
4814
|
-
distance: 80,
|
|
4815
|
-
links: {
|
|
4816
|
-
opacity: 0.5
|
|
4817
|
-
},
|
|
4818
|
-
radius: 60
|
|
4819
|
-
},
|
|
4820
|
-
grab: {
|
|
4821
|
-
distance: 100,
|
|
4822
|
-
links: {
|
|
4823
|
-
blink: false,
|
|
4824
|
-
consent: false,
|
|
4825
|
-
opacity: 1
|
|
4826
|
-
}
|
|
4827
|
-
},
|
|
4828
|
-
light: {
|
|
4829
|
-
area: {
|
|
4830
|
-
gradient: {
|
|
4831
|
-
start: {
|
|
4832
|
-
value: "#ffffff"
|
|
4833
|
-
},
|
|
4834
|
-
stop: {
|
|
4835
|
-
value: "#000000"
|
|
4836
|
-
}
|
|
4837
|
-
},
|
|
4838
|
-
radius: 1000
|
|
4839
|
-
},
|
|
4840
|
-
shadow: {
|
|
4841
|
-
color: {
|
|
4842
|
-
value: "#000000"
|
|
4843
|
-
},
|
|
4844
|
-
length: 2000
|
|
4845
|
-
}
|
|
4846
|
-
},
|
|
4847
|
-
push: {
|
|
4848
|
-
default: true,
|
|
4849
|
-
groups: [],
|
|
4850
|
-
quantity: 4
|
|
4851
|
-
},
|
|
4852
|
-
remove: {
|
|
4853
|
-
quantity: 2
|
|
4854
|
-
},
|
|
4855
|
-
repulse: {
|
|
4856
|
-
distance: 200,
|
|
4857
|
-
duration: 0.4,
|
|
4858
|
-
factor: 100,
|
|
4859
|
-
speed: 1,
|
|
4860
|
-
maxSpeed: 50,
|
|
4861
|
-
easing: "ease-out-quad"
|
|
4862
|
-
},
|
|
4863
|
-
slow: {
|
|
4864
|
-
factor: 3,
|
|
4865
|
-
radius: 200
|
|
4866
|
-
},
|
|
4867
|
-
trail: {
|
|
4868
|
-
delay: 1,
|
|
4869
|
-
pauseOnStop: false,
|
|
4870
|
-
quantity: 1
|
|
4871
|
-
}
|
|
4872
|
-
}
|
|
4873
|
-
},
|
|
4874
|
-
manualParticles: [],
|
|
4875
|
-
motion: {
|
|
4876
|
-
disable: false,
|
|
4877
|
-
reduce: {
|
|
4878
|
-
factor: 4,
|
|
4879
|
-
value: true
|
|
4880
|
-
}
|
|
4881
|
-
},
|
|
4882
|
-
particles: {
|
|
4883
|
-
bounce: {
|
|
4884
|
-
horizontal: 1,
|
|
4885
|
-
vertical: 1
|
|
4886
|
-
},
|
|
4887
|
-
collisions: {
|
|
4888
|
-
bounce: {
|
|
4889
|
-
horizontal: 1,
|
|
4890
|
-
vertical: 1
|
|
4891
|
-
},
|
|
4892
|
-
enable: false,
|
|
4893
|
-
mode: "bounce",
|
|
4894
|
-
overlap: {
|
|
4895
|
-
enable: true,
|
|
4896
|
-
retries: 0
|
|
4897
|
-
}
|
|
4898
|
-
},
|
|
4899
|
-
color: {
|
|
4900
|
-
value: "#fff",
|
|
4901
|
-
animation: {
|
|
4902
|
-
h: {
|
|
4903
|
-
count: 0,
|
|
4904
|
-
enable: false,
|
|
4905
|
-
offset: 0,
|
|
4906
|
-
speed: 1,
|
|
4907
|
-
sync: true
|
|
4908
|
-
},
|
|
4909
|
-
s: {
|
|
4910
|
-
count: 0,
|
|
4911
|
-
enable: false,
|
|
4912
|
-
offset: 0,
|
|
4913
|
-
speed: 1,
|
|
4914
|
-
sync: true
|
|
4915
|
-
},
|
|
4916
|
-
l: {
|
|
4917
|
-
count: 0,
|
|
4918
|
-
enable: false,
|
|
4919
|
-
offset: 0,
|
|
4920
|
-
speed: 1,
|
|
4921
|
-
sync: true
|
|
4922
|
-
}
|
|
4923
|
-
}
|
|
4924
|
-
},
|
|
4925
|
-
destroy: {
|
|
4926
|
-
mode: "none",
|
|
4927
|
-
split: {
|
|
4928
|
-
count: 1,
|
|
4929
|
-
factor: 3,
|
|
4930
|
-
rate: {
|
|
4931
|
-
min: 4,
|
|
4932
|
-
max: 9
|
|
4933
|
-
},
|
|
4934
|
-
sizeOffset: true
|
|
4935
|
-
}
|
|
4936
|
-
},
|
|
4937
|
-
gradient: [],
|
|
4938
|
-
groups: {},
|
|
4939
|
-
life: {
|
|
4940
|
-
count: 0,
|
|
4941
|
-
delay: {
|
|
4942
|
-
value: 0,
|
|
4943
|
-
sync: false
|
|
4944
|
-
},
|
|
4945
|
-
duration: {
|
|
4946
|
-
value: 0,
|
|
4947
|
-
sync: false
|
|
4948
|
-
}
|
|
4949
|
-
},
|
|
4950
|
-
links: {
|
|
4951
|
-
blink: false,
|
|
4952
|
-
color: {
|
|
4953
|
-
value: "#fff"
|
|
4954
|
-
},
|
|
4955
|
-
consent: false,
|
|
4956
|
-
distance: 100,
|
|
4957
|
-
enable: false,
|
|
4958
|
-
frequency: 1,
|
|
4959
|
-
opacity: 1,
|
|
4960
|
-
shadow: {
|
|
4961
|
-
blur: 5,
|
|
4962
|
-
color: {
|
|
4963
|
-
value: "#fff"
|
|
4964
|
-
},
|
|
4965
|
-
enable: false
|
|
4966
|
-
},
|
|
4967
|
-
triangles: {
|
|
4968
|
-
enable: false,
|
|
4969
|
-
frequency: 1
|
|
4970
|
-
},
|
|
4971
|
-
width: 1,
|
|
4972
|
-
warp: false
|
|
4973
|
-
},
|
|
4974
|
-
move: {
|
|
4975
|
-
angle: {
|
|
4976
|
-
offset: 0,
|
|
4977
|
-
value: 90
|
|
4978
|
-
},
|
|
4979
|
-
attract: {
|
|
4980
|
-
distance: 200,
|
|
4981
|
-
enable: false,
|
|
4982
|
-
rotate: {
|
|
4983
|
-
x: 3000,
|
|
4984
|
-
y: 3000
|
|
4985
|
-
}
|
|
4986
|
-
},
|
|
4987
|
-
center: {
|
|
4988
|
-
x: 50,
|
|
4989
|
-
y: 50,
|
|
4990
|
-
radius: 0
|
|
4991
|
-
},
|
|
4992
|
-
decay: 0,
|
|
4993
|
-
distance: {},
|
|
4994
|
-
direction: "none",
|
|
4995
|
-
drift: 0,
|
|
4996
|
-
enable: false,
|
|
4997
|
-
gravity: {
|
|
4998
|
-
acceleration: 9.81,
|
|
4999
|
-
enable: false,
|
|
5000
|
-
inverse: false,
|
|
5001
|
-
maxSpeed: 50
|
|
5002
|
-
},
|
|
5003
|
-
path: {
|
|
5004
|
-
clamp: true,
|
|
5005
|
-
delay: 0,
|
|
5006
|
-
enable: false,
|
|
5007
|
-
options: {}
|
|
5008
|
-
},
|
|
5009
|
-
outModes: {
|
|
5010
|
-
default: "out"
|
|
5011
|
-
},
|
|
5012
|
-
random: false,
|
|
5013
|
-
size: false,
|
|
5014
|
-
speed: 2,
|
|
5015
|
-
spin: {
|
|
5016
|
-
acceleration: 0,
|
|
5017
|
-
enable: false
|
|
5018
|
-
},
|
|
5019
|
-
straight: false,
|
|
5020
|
-
trail: {
|
|
5021
|
-
enable: false,
|
|
5022
|
-
length: 10,
|
|
5023
|
-
fillColor: {
|
|
5024
|
-
value: "#000000"
|
|
5025
|
-
}
|
|
5026
|
-
},
|
|
5027
|
-
vibrate: false,
|
|
5028
|
-
warp: false
|
|
5029
|
-
},
|
|
5030
|
-
number: {
|
|
5031
|
-
density: {
|
|
5032
|
-
enable: false,
|
|
5033
|
-
area: 800,
|
|
5034
|
-
factor: 1000
|
|
5035
|
-
},
|
|
5036
|
-
limit: 0,
|
|
5037
|
-
value: 100
|
|
5038
|
-
},
|
|
5039
|
-
opacity: {
|
|
5040
|
-
value: 1,
|
|
5041
|
-
animation: {
|
|
5042
|
-
count: 0,
|
|
5043
|
-
enable: false,
|
|
5044
|
-
speed: 2,
|
|
5045
|
-
sync: false,
|
|
5046
|
-
destroy: "none",
|
|
5047
|
-
startValue: "random"
|
|
5048
|
-
}
|
|
5049
|
-
},
|
|
5050
|
-
orbit: {
|
|
5051
|
-
animation: {
|
|
5052
|
-
count: 0,
|
|
5053
|
-
enable: false,
|
|
5054
|
-
speed: 1,
|
|
5055
|
-
sync: false
|
|
5056
|
-
},
|
|
5057
|
-
enable: false,
|
|
5058
|
-
opacity: 1,
|
|
5059
|
-
rotation: 0,
|
|
5060
|
-
width: 1
|
|
5061
|
-
},
|
|
5062
|
-
reduceDuplicates: false,
|
|
5063
|
-
repulse: {
|
|
5064
|
-
value: 0,
|
|
5065
|
-
enabled: false,
|
|
5066
|
-
distance: 1,
|
|
5067
|
-
duration: 1,
|
|
5068
|
-
factor: 1,
|
|
5069
|
-
speed: 1
|
|
5070
|
-
},
|
|
5071
|
-
roll: {
|
|
5072
|
-
darken: {
|
|
5073
|
-
enable: false,
|
|
5074
|
-
value: 0
|
|
5075
|
-
},
|
|
5076
|
-
enable: false,
|
|
5077
|
-
enlighten: {
|
|
5078
|
-
enable: false,
|
|
5079
|
-
value: 0
|
|
5080
|
-
},
|
|
5081
|
-
mode: "vertical",
|
|
5082
|
-
speed: 25
|
|
5083
|
-
},
|
|
5084
|
-
rotate: {
|
|
5085
|
-
value: 0,
|
|
5086
|
-
animation: {
|
|
5087
|
-
enable: false,
|
|
5088
|
-
speed: 0,
|
|
5089
|
-
sync: false
|
|
5090
|
-
},
|
|
5091
|
-
direction: "clockwise",
|
|
5092
|
-
path: false
|
|
5093
|
-
},
|
|
5094
|
-
shadow: {
|
|
5095
|
-
blur: 0,
|
|
5096
|
-
color: {
|
|
5097
|
-
value: "#000000"
|
|
5098
|
-
},
|
|
5099
|
-
enable: false,
|
|
5100
|
-
offset: {
|
|
5101
|
-
x: 0,
|
|
5102
|
-
y: 0
|
|
5103
|
-
}
|
|
5104
|
-
},
|
|
5105
|
-
shape: {
|
|
5106
|
-
options: {},
|
|
5107
|
-
type: "circle"
|
|
5108
|
-
},
|
|
5109
|
-
size: {
|
|
5110
|
-
value: 3,
|
|
5111
|
-
animation: {
|
|
5112
|
-
count: 0,
|
|
5113
|
-
enable: false,
|
|
5114
|
-
speed: 5,
|
|
5115
|
-
sync: false,
|
|
5116
|
-
destroy: "none",
|
|
5117
|
-
startValue: "random"
|
|
5118
|
-
}
|
|
5119
|
-
},
|
|
5120
|
-
stroke: {
|
|
5121
|
-
width: 0
|
|
5122
|
-
},
|
|
5123
|
-
tilt: {
|
|
5124
|
-
value: 0,
|
|
5125
|
-
animation: {
|
|
5126
|
-
enable: false,
|
|
5127
|
-
speed: 0,
|
|
5128
|
-
sync: false
|
|
5129
|
-
},
|
|
5130
|
-
direction: "clockwise",
|
|
5131
|
-
enable: false
|
|
5132
|
-
},
|
|
5133
|
-
twinkle: {
|
|
5134
|
-
lines: {
|
|
5135
|
-
enable: false,
|
|
5136
|
-
frequency: 0.05,
|
|
5137
|
-
opacity: 1
|
|
5138
|
-
},
|
|
5139
|
-
particles: {
|
|
5140
|
-
enable: false,
|
|
5141
|
-
frequency: 0.05,
|
|
5142
|
-
opacity: 1
|
|
5143
|
-
}
|
|
5144
|
-
},
|
|
5145
|
-
wobble: {
|
|
5146
|
-
distance: 5,
|
|
5147
|
-
enable: false,
|
|
5148
|
-
speed: 50
|
|
5149
|
-
},
|
|
5150
|
-
zIndex: {
|
|
5151
|
-
value: 0,
|
|
5152
|
-
opacityRate: 1,
|
|
5153
|
-
sizeRate: 1,
|
|
5154
|
-
velocityRate: 1
|
|
5155
|
-
}
|
|
5156
|
-
},
|
|
5157
|
-
pauseOnBlur: true,
|
|
5158
|
-
pauseOnOutsideViewport: true,
|
|
5159
|
-
responsive: [],
|
|
5160
|
-
themes: [],
|
|
5161
|
-
zLayers: 100
|
|
5162
|
-
};
|
|
5163
5333
|
;// CONCATENATED MODULE: ../../engine/dist/esm/Utils/EventDispatcher.js
|
|
5164
5334
|
var EventDispatcher_classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function (receiver, state, value, kind, f) {
|
|
5165
5335
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
@@ -5242,7 +5412,6 @@ _EventDispatcher_listeners = new WeakMap();
|
|
|
5242
5412
|
|
|
5243
5413
|
|
|
5244
5414
|
|
|
5245
|
-
|
|
5246
5415
|
;// CONCATENATED MODULE: ../../engine/dist/esm/Core/Utils/Range.js
|
|
5247
5416
|
class Range {
|
|
5248
5417
|
constructor(x, y) {
|
|
@@ -6834,7 +7003,7 @@ class Particle {
|
|
|
6834
7003
|
this.fill = (_d = (_c = this.shapeData) === null || _c === void 0 ? void 0 : _c.fill) !== null && _d !== void 0 ? _d : this.fill;
|
|
6835
7004
|
this.close = (_f = (_e = this.shapeData) === null || _e === void 0 ? void 0 : _e.close) !== null && _f !== void 0 ? _f : this.close;
|
|
6836
7005
|
this.options = particlesOptions;
|
|
6837
|
-
this.pathDelay =
|
|
7006
|
+
this.pathDelay = getValue(this.options.move.path.delay) * 1000;
|
|
6838
7007
|
const zIndexValue = getRangeValue(this.options.zIndex.value);
|
|
6839
7008
|
container.retina.initParticle(this);
|
|
6840
7009
|
const sizeOptions = this.options.size,
|
|
@@ -7066,7 +7235,7 @@ class Particle {
|
|
|
7066
7235
|
return;
|
|
7067
7236
|
}
|
|
7068
7237
|
|
|
7069
|
-
const rate =
|
|
7238
|
+
const rate = getValue(splitOptions.rate);
|
|
7070
7239
|
|
|
7071
7240
|
for (let i = 0; i < rate; i++) {
|
|
7072
7241
|
this.container.particles.addSplitParticle(this);
|
|
@@ -7467,7 +7636,7 @@ class Particles {
|
|
|
7467
7636
|
addSplitParticle(parent) {
|
|
7468
7637
|
const splitOptions = parent.options.destroy.split;
|
|
7469
7638
|
const options = loadParticlesOptions(parent.options);
|
|
7470
|
-
const factor =
|
|
7639
|
+
const factor = getValue(splitOptions.factor);
|
|
7471
7640
|
options.color.load({
|
|
7472
7641
|
value: {
|
|
7473
7642
|
hsl: parent.getFillColor()
|
|
@@ -14233,7 +14402,7 @@ function bounceHorizontal(data) {
|
|
|
14233
14402
|
let bounced = false;
|
|
14234
14403
|
|
|
14235
14404
|
if (data.direction === "right" && data.bounds.right >= data.canvasSize.width && velocity > 0 || data.direction === "left" && data.bounds.left <= 0 && velocity < 0) {
|
|
14236
|
-
const newVelocity =
|
|
14405
|
+
const newVelocity = getValue(data.particle.options.bounce.horizontal);
|
|
14237
14406
|
data.particle.velocity.x *= -newVelocity;
|
|
14238
14407
|
bounced = true;
|
|
14239
14408
|
}
|
|
@@ -14260,7 +14429,7 @@ function bounceVertical(data) {
|
|
|
14260
14429
|
let bounced = false;
|
|
14261
14430
|
|
|
14262
14431
|
if (data.direction === "bottom" && data.bounds.bottom >= data.canvasSize.height && velocity > 0 || data.direction === "top" && data.bounds.top <= 0 && velocity < 0) {
|
|
14263
|
-
const newVelocity =
|
|
14432
|
+
const newVelocity = getValue(data.particle.options.bounce.vertical);
|
|
14264
14433
|
data.particle.velocity.y *= -newVelocity;
|
|
14265
14434
|
bounced = true;
|
|
14266
14435
|
}
|