tsparticles 2.0.5 → 2.0.6
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 → 939.js} +3 -3
- package/{bundle.js → browser/bundle.js} +0 -0
- package/browser/index.js +20 -0
- package/cjs/bundle.js +23 -0
- package/cjs/index.js +24 -0
- package/esm/bundle.js +6 -0
- package/esm/index.js +20 -0
- package/package.json +26 -15
- package/report.html +2 -2
- package/tsparticles.bundle.js +626 -2506
- package/tsparticles.bundle.min.js +2 -2
- package/tsparticles.js +18 -86
- package/tsparticles.min.js +2 -2
- package/{bundle.d.ts → types/bundle.d.ts} +0 -0
- package/{index.d.ts → types/index.d.ts} +0 -0
- package/umd/bundle.js +33 -0
- package/umd/index.js +34 -0
- package/index.js +0 -31
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.6
|
|
8
8
|
*/
|
|
9
9
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
10
10
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
var a = factory();
|
|
16
16
|
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
|
|
17
17
|
}
|
|
18
|
-
})(this,
|
|
18
|
+
})(this, () => {
|
|
19
19
|
return /******/ (() => { // webpackBootstrap
|
|
20
20
|
/******/ "use strict";
|
|
21
21
|
/******/ var __webpack_modules__ = ({});
|
|
@@ -8987,7 +8987,7 @@ tsParticles.init();
|
|
|
8987
8987
|
|
|
8988
8988
|
|
|
8989
8989
|
|
|
8990
|
-
;// CONCATENATED MODULE: ../../plugins/absorbers/dist/Options/Classes/AbsorberSizeLimit.js
|
|
8990
|
+
;// CONCATENATED MODULE: ../../plugins/absorbers/dist/esm/Options/Classes/AbsorberSizeLimit.js
|
|
8991
8991
|
class AbsorberSizeLimit {
|
|
8992
8992
|
constructor() {
|
|
8993
8993
|
this.radius = 0;
|
|
@@ -9009,7 +9009,7 @@ class AbsorberSizeLimit {
|
|
|
9009
9009
|
}
|
|
9010
9010
|
|
|
9011
9011
|
}
|
|
9012
|
-
;// CONCATENATED MODULE: ../../plugins/absorbers/dist/Options/Classes/AbsorberSize.js
|
|
9012
|
+
;// CONCATENATED MODULE: ../../plugins/absorbers/dist/esm/Options/Classes/AbsorberSize.js
|
|
9013
9013
|
|
|
9014
9014
|
|
|
9015
9015
|
class AbsorberSize extends ValueWithRandom {
|
|
@@ -9039,7 +9039,7 @@ class AbsorberSize extends ValueWithRandom {
|
|
|
9039
9039
|
}
|
|
9040
9040
|
|
|
9041
9041
|
}
|
|
9042
|
-
;// CONCATENATED MODULE: ../../plugins/absorbers/dist/Options/Classes/Absorber.js
|
|
9042
|
+
;// CONCATENATED MODULE: ../../plugins/absorbers/dist/esm/Options/Classes/Absorber.js
|
|
9043
9043
|
|
|
9044
9044
|
|
|
9045
9045
|
class Absorber {
|
|
@@ -9098,7 +9098,7 @@ class Absorber {
|
|
|
9098
9098
|
}
|
|
9099
9099
|
|
|
9100
9100
|
}
|
|
9101
|
-
;// CONCATENATED MODULE: ../../plugins/absorbers/dist/AbsorberInstance.js
|
|
9101
|
+
;// CONCATENATED MODULE: ../../plugins/absorbers/dist/esm/AbsorberInstance.js
|
|
9102
9102
|
|
|
9103
9103
|
|
|
9104
9104
|
class AbsorberInstance {
|
|
@@ -9275,7 +9275,7 @@ class AbsorberInstance {
|
|
|
9275
9275
|
}
|
|
9276
9276
|
|
|
9277
9277
|
}
|
|
9278
|
-
;// CONCATENATED MODULE: ../../plugins/absorbers/dist/Absorbers.js
|
|
9278
|
+
;// CONCATENATED MODULE: ../../plugins/absorbers/dist/esm/Absorbers.js
|
|
9279
9279
|
|
|
9280
9280
|
|
|
9281
9281
|
|
|
@@ -9405,39 +9405,7 @@ class Absorbers {
|
|
|
9405
9405
|
}
|
|
9406
9406
|
|
|
9407
9407
|
}
|
|
9408
|
-
;// CONCATENATED MODULE: ../../plugins/absorbers/dist/index.js
|
|
9409
|
-
var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
9410
|
-
function adopt(value) {
|
|
9411
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
9412
|
-
resolve(value);
|
|
9413
|
-
});
|
|
9414
|
-
}
|
|
9415
|
-
|
|
9416
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
9417
|
-
function fulfilled(value) {
|
|
9418
|
-
try {
|
|
9419
|
-
step(generator.next(value));
|
|
9420
|
-
} catch (e) {
|
|
9421
|
-
reject(e);
|
|
9422
|
-
}
|
|
9423
|
-
}
|
|
9424
|
-
|
|
9425
|
-
function rejected(value) {
|
|
9426
|
-
try {
|
|
9427
|
-
step(generator["throw"](value));
|
|
9428
|
-
} catch (e) {
|
|
9429
|
-
reject(e);
|
|
9430
|
-
}
|
|
9431
|
-
}
|
|
9432
|
-
|
|
9433
|
-
function step(result) {
|
|
9434
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
9435
|
-
}
|
|
9436
|
-
|
|
9437
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9438
|
-
});
|
|
9439
|
-
};
|
|
9440
|
-
|
|
9408
|
+
;// CONCATENATED MODULE: ../../plugins/absorbers/dist/esm/index.js
|
|
9441
9409
|
|
|
9442
9410
|
|
|
9443
9411
|
|
|
@@ -9521,16 +9489,14 @@ class AbsorbersPlugin {
|
|
|
9521
9489
|
|
|
9522
9490
|
}
|
|
9523
9491
|
|
|
9524
|
-
function loadAbsorbersPlugin(engine) {
|
|
9525
|
-
|
|
9526
|
-
|
|
9527
|
-
yield engine.addPlugin(plugin);
|
|
9528
|
-
});
|
|
9492
|
+
async function loadAbsorbersPlugin(engine) {
|
|
9493
|
+
const plugin = new AbsorbersPlugin();
|
|
9494
|
+
await engine.addPlugin(plugin);
|
|
9529
9495
|
}
|
|
9530
9496
|
|
|
9531
9497
|
|
|
9532
9498
|
|
|
9533
|
-
;// CONCATENATED MODULE: ../../plugins/emitters/dist/Shapes/Circle/CircleShape.js
|
|
9499
|
+
;// CONCATENATED MODULE: ../../plugins/emitters/dist/esm/Shapes/Circle/CircleShape.js
|
|
9534
9500
|
class CircleShape {
|
|
9535
9501
|
randomPosition(position, size, fill) {
|
|
9536
9502
|
const generateTheta = (x, y) => {
|
|
@@ -9548,7 +9514,7 @@ class CircleShape {
|
|
|
9548
9514
|
return -theta;
|
|
9549
9515
|
}
|
|
9550
9516
|
},
|
|
9551
|
-
radius = (x, y, theta) => x * y / Math.sqrt(
|
|
9517
|
+
radius = (x, y, theta) => x * y / Math.sqrt((y * Math.cos(theta)) ** 2 + (x * Math.sin(theta)) ** 2),
|
|
9552
9518
|
[a, b] = [size.width / 2, size.height / 2],
|
|
9553
9519
|
randomTheta = generateTheta(a, b),
|
|
9554
9520
|
maxRadius = radius(a, b, randomTheta),
|
|
@@ -9561,7 +9527,7 @@ class CircleShape {
|
|
|
9561
9527
|
}
|
|
9562
9528
|
|
|
9563
9529
|
}
|
|
9564
|
-
;// CONCATENATED MODULE: ../../plugins/emitters/dist/Options/Classes/EmitterLife.js
|
|
9530
|
+
;// CONCATENATED MODULE: ../../plugins/emitters/dist/esm/Options/Classes/EmitterLife.js
|
|
9565
9531
|
class EmitterLife {
|
|
9566
9532
|
constructor() {
|
|
9567
9533
|
this.wait = false;
|
|
@@ -9590,7 +9556,7 @@ class EmitterLife {
|
|
|
9590
9556
|
}
|
|
9591
9557
|
|
|
9592
9558
|
}
|
|
9593
|
-
;// CONCATENATED MODULE: ../../plugins/emitters/dist/Options/Classes/EmitterRate.js
|
|
9559
|
+
;// CONCATENATED MODULE: ../../plugins/emitters/dist/esm/Options/Classes/EmitterRate.js
|
|
9594
9560
|
|
|
9595
9561
|
class EmitterRate {
|
|
9596
9562
|
constructor() {
|
|
@@ -9613,7 +9579,7 @@ class EmitterRate {
|
|
|
9613
9579
|
}
|
|
9614
9580
|
|
|
9615
9581
|
}
|
|
9616
|
-
;// CONCATENATED MODULE: ../../plugins/emitters/dist/Options/Classes/EmitterSize.js
|
|
9582
|
+
;// CONCATENATED MODULE: ../../plugins/emitters/dist/esm/Options/Classes/EmitterSize.js
|
|
9617
9583
|
class EmitterSize {
|
|
9618
9584
|
constructor() {
|
|
9619
9585
|
this.mode = "percent";
|
|
@@ -9640,7 +9606,7 @@ class EmitterSize {
|
|
|
9640
9606
|
}
|
|
9641
9607
|
|
|
9642
9608
|
}
|
|
9643
|
-
;// CONCATENATED MODULE: ../../plugins/emitters/dist/Options/Classes/Emitter.js
|
|
9609
|
+
;// CONCATENATED MODULE: ../../plugins/emitters/dist/esm/Options/Classes/Emitter.js
|
|
9644
9610
|
|
|
9645
9611
|
|
|
9646
9612
|
|
|
@@ -9721,7 +9687,7 @@ class Emitter {
|
|
|
9721
9687
|
}
|
|
9722
9688
|
|
|
9723
9689
|
}
|
|
9724
|
-
;// CONCATENATED MODULE: ../../plugins/emitters/dist/EmitterInstance.js
|
|
9690
|
+
;// CONCATENATED MODULE: ../../plugins/emitters/dist/esm/EmitterInstance.js
|
|
9725
9691
|
var EmitterInstance_classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function (receiver, state, value, kind, f) {
|
|
9726
9692
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
9727
9693
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
@@ -10059,7 +10025,7 @@ class EmitterInstance {
|
|
|
10059
10025
|
|
|
10060
10026
|
}
|
|
10061
10027
|
_EmitterInstance_firstSpawn = new WeakMap(), _EmitterInstance_startParticlesAdded = new WeakMap(), _EmitterInstance_engine = new WeakMap();
|
|
10062
|
-
;// CONCATENATED MODULE: ../../plugins/emitters/dist/Emitters.js
|
|
10028
|
+
;// CONCATENATED MODULE: ../../plugins/emitters/dist/esm/Emitters.js
|
|
10063
10029
|
var Emitters_classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function (receiver, state, value, kind, f) {
|
|
10064
10030
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
10065
10031
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
@@ -10236,7 +10202,7 @@ class Emitters {
|
|
|
10236
10202
|
|
|
10237
10203
|
}
|
|
10238
10204
|
_Emitters_engine = new WeakMap();
|
|
10239
|
-
;// CONCATENATED MODULE: ../../plugins/emitters/dist/ShapeManager.js
|
|
10205
|
+
;// CONCATENATED MODULE: ../../plugins/emitters/dist/esm/ShapeManager.js
|
|
10240
10206
|
var ShapeManager_classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function (receiver, state, value, kind, f) {
|
|
10241
10207
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
10242
10208
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
@@ -10270,7 +10236,7 @@ class ShapeManager {
|
|
|
10270
10236
|
|
|
10271
10237
|
}
|
|
10272
10238
|
_ShapeManager_engine = new WeakMap();
|
|
10273
|
-
;// CONCATENATED MODULE: ../../plugins/emitters/dist/Shapes/Square/SquareShape.js
|
|
10239
|
+
;// CONCATENATED MODULE: ../../plugins/emitters/dist/esm/Shapes/Square/SquareShape.js
|
|
10274
10240
|
function randomSquareCoordinate(position, offset) {
|
|
10275
10241
|
return position + offset * (Math.random() - 0.5);
|
|
10276
10242
|
}
|
|
@@ -10318,47 +10284,15 @@ class SquareShape {
|
|
|
10318
10284
|
}
|
|
10319
10285
|
|
|
10320
10286
|
}
|
|
10321
|
-
;// CONCATENATED MODULE: ../../plugins/emitters/dist/index.js
|
|
10322
|
-
var
|
|
10323
|
-
function adopt(value) {
|
|
10324
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
10325
|
-
resolve(value);
|
|
10326
|
-
});
|
|
10327
|
-
}
|
|
10328
|
-
|
|
10329
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
10330
|
-
function fulfilled(value) {
|
|
10331
|
-
try {
|
|
10332
|
-
step(generator.next(value));
|
|
10333
|
-
} catch (e) {
|
|
10334
|
-
reject(e);
|
|
10335
|
-
}
|
|
10336
|
-
}
|
|
10337
|
-
|
|
10338
|
-
function rejected(value) {
|
|
10339
|
-
try {
|
|
10340
|
-
step(generator["throw"](value));
|
|
10341
|
-
} catch (e) {
|
|
10342
|
-
reject(e);
|
|
10343
|
-
}
|
|
10344
|
-
}
|
|
10345
|
-
|
|
10346
|
-
function step(result) {
|
|
10347
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
10348
|
-
}
|
|
10349
|
-
|
|
10350
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
10351
|
-
});
|
|
10352
|
-
};
|
|
10353
|
-
|
|
10354
|
-
var dist_classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function (receiver, state, value, kind, f) {
|
|
10287
|
+
;// CONCATENATED MODULE: ../../plugins/emitters/dist/esm/index.js
|
|
10288
|
+
var esm_classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function (receiver, state, value, kind, f) {
|
|
10355
10289
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
10356
10290
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
10357
10291
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
10358
10292
|
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
|
|
10359
10293
|
};
|
|
10360
10294
|
|
|
10361
|
-
var
|
|
10295
|
+
var esm_classPrivateFieldGet = undefined && undefined.__classPrivateFieldGet || function (receiver, state, kind, f) {
|
|
10362
10296
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
10363
10297
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10364
10298
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
@@ -10377,13 +10311,13 @@ class EmittersPlugin {
|
|
|
10377
10311
|
constructor(engine) {
|
|
10378
10312
|
_EmittersPlugin_engine.set(this, void 0);
|
|
10379
10313
|
|
|
10380
|
-
|
|
10314
|
+
esm_classPrivateFieldSet(this, _EmittersPlugin_engine, engine, "f");
|
|
10381
10315
|
|
|
10382
10316
|
this.id = "emitters";
|
|
10383
10317
|
}
|
|
10384
10318
|
|
|
10385
10319
|
getPlugin(container) {
|
|
10386
|
-
return new Emitters(
|
|
10320
|
+
return new Emitters(esm_classPrivateFieldGet(this, _EmittersPlugin_engine, "f"), container);
|
|
10387
10321
|
}
|
|
10388
10322
|
|
|
10389
10323
|
needsPlugin(options) {
|
|
@@ -10448,64 +10382,30 @@ class EmittersPlugin {
|
|
|
10448
10382
|
}
|
|
10449
10383
|
|
|
10450
10384
|
_EmittersPlugin_engine = new WeakMap();
|
|
10451
|
-
function loadEmittersPlugin(engine) {
|
|
10452
|
-
|
|
10453
|
-
|
|
10454
|
-
|
|
10455
|
-
}
|
|
10385
|
+
async function loadEmittersPlugin(engine) {
|
|
10386
|
+
if (!engine.emitterShapeManager) {
|
|
10387
|
+
engine.emitterShapeManager = new ShapeManager(engine);
|
|
10388
|
+
}
|
|
10456
10389
|
|
|
10457
|
-
|
|
10458
|
-
|
|
10459
|
-
|
|
10390
|
+
if (!engine.addEmitterShape) {
|
|
10391
|
+
engine.addEmitterShape = (name, shape) => {
|
|
10392
|
+
var _a;
|
|
10460
10393
|
|
|
10461
|
-
|
|
10462
|
-
|
|
10463
|
-
|
|
10394
|
+
(_a = engine.emitterShapeManager) === null || _a === void 0 ? void 0 : _a.addShape(name, shape);
|
|
10395
|
+
};
|
|
10396
|
+
}
|
|
10464
10397
|
|
|
10465
|
-
|
|
10466
|
-
|
|
10467
|
-
|
|
10468
|
-
|
|
10469
|
-
});
|
|
10398
|
+
const plugin = new EmittersPlugin(engine);
|
|
10399
|
+
await engine.addPlugin(plugin);
|
|
10400
|
+
engine.addEmitterShape("circle", new CircleShape());
|
|
10401
|
+
engine.addEmitterShape("square", new SquareShape());
|
|
10470
10402
|
}
|
|
10471
10403
|
|
|
10472
10404
|
|
|
10473
10405
|
|
|
10474
10406
|
|
|
10475
10407
|
|
|
10476
|
-
;// CONCATENATED MODULE: ../../interactions/external/trail/dist/TrailMaker.js
|
|
10477
|
-
var TrailMaker_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
10478
|
-
function adopt(value) {
|
|
10479
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
10480
|
-
resolve(value);
|
|
10481
|
-
});
|
|
10482
|
-
}
|
|
10483
|
-
|
|
10484
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
10485
|
-
function fulfilled(value) {
|
|
10486
|
-
try {
|
|
10487
|
-
step(generator.next(value));
|
|
10488
|
-
} catch (e) {
|
|
10489
|
-
reject(e);
|
|
10490
|
-
}
|
|
10491
|
-
}
|
|
10492
|
-
|
|
10493
|
-
function rejected(value) {
|
|
10494
|
-
try {
|
|
10495
|
-
step(generator["throw"](value));
|
|
10496
|
-
} catch (e) {
|
|
10497
|
-
reject(e);
|
|
10498
|
-
}
|
|
10499
|
-
}
|
|
10500
|
-
|
|
10501
|
-
function step(result) {
|
|
10502
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
10503
|
-
}
|
|
10504
|
-
|
|
10505
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
10506
|
-
});
|
|
10507
|
-
};
|
|
10508
|
-
|
|
10408
|
+
;// CONCATENATED MODULE: ../../interactions/external/trail/dist/esm/TrailMaker.js
|
|
10509
10409
|
|
|
10510
10410
|
class TrailMaker extends ExternalInteractorBase {
|
|
10511
10411
|
constructor(container) {
|
|
@@ -10513,50 +10413,48 @@ class TrailMaker extends ExternalInteractorBase {
|
|
|
10513
10413
|
this.delay = 0;
|
|
10514
10414
|
}
|
|
10515
10415
|
|
|
10516
|
-
interact(delta) {
|
|
10416
|
+
async interact(delta) {
|
|
10517
10417
|
var _a, _b, _c, _d;
|
|
10518
10418
|
|
|
10519
|
-
|
|
10520
|
-
|
|
10521
|
-
|
|
10522
|
-
}
|
|
10419
|
+
if (!this.container.retina.reduceFactor) {
|
|
10420
|
+
return;
|
|
10421
|
+
}
|
|
10523
10422
|
|
|
10524
|
-
|
|
10525
|
-
|
|
10526
|
-
|
|
10527
|
-
|
|
10423
|
+
const container = this.container,
|
|
10424
|
+
options = container.actualOptions,
|
|
10425
|
+
trailOptions = options.interactivity.modes.trail,
|
|
10426
|
+
optDelay = trailOptions.delay * 1000 / this.container.retina.reduceFactor;
|
|
10528
10427
|
|
|
10529
|
-
|
|
10530
|
-
|
|
10531
|
-
|
|
10428
|
+
if (this.delay < optDelay) {
|
|
10429
|
+
this.delay += delta.value;
|
|
10430
|
+
}
|
|
10532
10431
|
|
|
10533
|
-
|
|
10534
|
-
|
|
10535
|
-
|
|
10432
|
+
if (this.delay < optDelay) {
|
|
10433
|
+
return;
|
|
10434
|
+
}
|
|
10536
10435
|
|
|
10537
|
-
|
|
10436
|
+
let canEmit = true;
|
|
10538
10437
|
|
|
10539
|
-
|
|
10540
|
-
|
|
10541
|
-
|
|
10542
|
-
}
|
|
10438
|
+
if (trailOptions.pauseOnStop) {
|
|
10439
|
+
if (container.interactivity.mouse.position === this.lastPosition || ((_a = container.interactivity.mouse.position) === null || _a === void 0 ? void 0 : _a.x) === ((_b = this.lastPosition) === null || _b === void 0 ? void 0 : _b.x) && ((_c = container.interactivity.mouse.position) === null || _c === void 0 ? void 0 : _c.y) === ((_d = this.lastPosition) === null || _d === void 0 ? void 0 : _d.y)) {
|
|
10440
|
+
canEmit = false;
|
|
10543
10441
|
}
|
|
10442
|
+
}
|
|
10544
10443
|
|
|
10545
|
-
|
|
10546
|
-
|
|
10547
|
-
|
|
10548
|
-
|
|
10549
|
-
|
|
10550
|
-
|
|
10551
|
-
|
|
10552
|
-
|
|
10444
|
+
if (container.interactivity.mouse.position) {
|
|
10445
|
+
this.lastPosition = {
|
|
10446
|
+
x: container.interactivity.mouse.position.x,
|
|
10447
|
+
y: container.interactivity.mouse.position.y
|
|
10448
|
+
};
|
|
10449
|
+
} else {
|
|
10450
|
+
delete this.lastPosition;
|
|
10451
|
+
}
|
|
10553
10452
|
|
|
10554
|
-
|
|
10555
|
-
|
|
10556
|
-
|
|
10453
|
+
if (canEmit) {
|
|
10454
|
+
container.particles.push(trailOptions.quantity, container.interactivity.mouse, trailOptions.particles);
|
|
10455
|
+
}
|
|
10557
10456
|
|
|
10558
|
-
|
|
10559
|
-
});
|
|
10457
|
+
this.delay -= optDelay;
|
|
10560
10458
|
}
|
|
10561
10459
|
|
|
10562
10460
|
isEnabled() {
|
|
@@ -10570,46 +10468,12 @@ class TrailMaker extends ExternalInteractorBase {
|
|
|
10570
10468
|
reset() {}
|
|
10571
10469
|
|
|
10572
10470
|
}
|
|
10573
|
-
;// CONCATENATED MODULE: ../../interactions/external/trail/dist/index.js
|
|
10574
|
-
var trail_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
10575
|
-
function adopt(value) {
|
|
10576
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
10577
|
-
resolve(value);
|
|
10578
|
-
});
|
|
10579
|
-
}
|
|
10580
|
-
|
|
10581
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
10582
|
-
function fulfilled(value) {
|
|
10583
|
-
try {
|
|
10584
|
-
step(generator.next(value));
|
|
10585
|
-
} catch (e) {
|
|
10586
|
-
reject(e);
|
|
10587
|
-
}
|
|
10588
|
-
}
|
|
10589
|
-
|
|
10590
|
-
function rejected(value) {
|
|
10591
|
-
try {
|
|
10592
|
-
step(generator["throw"](value));
|
|
10593
|
-
} catch (e) {
|
|
10594
|
-
reject(e);
|
|
10595
|
-
}
|
|
10596
|
-
}
|
|
10597
|
-
|
|
10598
|
-
function step(result) {
|
|
10599
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
10600
|
-
}
|
|
10601
|
-
|
|
10602
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
10603
|
-
});
|
|
10604
|
-
};
|
|
10605
|
-
|
|
10471
|
+
;// CONCATENATED MODULE: ../../interactions/external/trail/dist/esm/index.js
|
|
10606
10472
|
|
|
10607
|
-
function loadExternalTrailInteraction(engine) {
|
|
10608
|
-
|
|
10609
|
-
yield engine.addInteractor("externalTrail", container => new TrailMaker(container));
|
|
10610
|
-
});
|
|
10473
|
+
async function loadExternalTrailInteraction(engine) {
|
|
10474
|
+
await engine.addInteractor("externalTrail", container => new TrailMaker(container));
|
|
10611
10475
|
}
|
|
10612
|
-
;// CONCATENATED MODULE: ../../plugins/polygonMask/dist/Options/Classes/PolygonMaskDrawStroke.js
|
|
10476
|
+
;// CONCATENATED MODULE: ../../plugins/polygonMask/dist/esm/Options/Classes/PolygonMaskDrawStroke.js
|
|
10613
10477
|
|
|
10614
10478
|
class PolygonMaskDrawStroke {
|
|
10615
10479
|
constructor() {
|
|
@@ -10641,7 +10505,7 @@ class PolygonMaskDrawStroke {
|
|
|
10641
10505
|
}
|
|
10642
10506
|
|
|
10643
10507
|
}
|
|
10644
|
-
;// CONCATENATED MODULE: ../../plugins/polygonMask/dist/Options/Classes/PolygonMaskDraw.js
|
|
10508
|
+
;// CONCATENATED MODULE: ../../plugins/polygonMask/dist/esm/Options/Classes/PolygonMaskDraw.js
|
|
10645
10509
|
|
|
10646
10510
|
|
|
10647
10511
|
class PolygonMaskDraw {
|
|
@@ -10685,7 +10549,7 @@ class PolygonMaskDraw {
|
|
|
10685
10549
|
}
|
|
10686
10550
|
|
|
10687
10551
|
}
|
|
10688
|
-
;// CONCATENATED MODULE: ../../plugins/polygonMask/dist/Options/Classes/PolygonMaskInline.js
|
|
10552
|
+
;// CONCATENATED MODULE: ../../plugins/polygonMask/dist/esm/Options/Classes/PolygonMaskInline.js
|
|
10689
10553
|
class PolygonMaskInline {
|
|
10690
10554
|
constructor() {
|
|
10691
10555
|
this.arrangement = "one-per-point";
|
|
@@ -10702,7 +10566,7 @@ class PolygonMaskInline {
|
|
|
10702
10566
|
}
|
|
10703
10567
|
|
|
10704
10568
|
}
|
|
10705
|
-
;// CONCATENATED MODULE: ../../plugins/polygonMask/dist/Options/Classes/PolygonMaskLocalSvg.js
|
|
10569
|
+
;// CONCATENATED MODULE: ../../plugins/polygonMask/dist/esm/Options/Classes/PolygonMaskLocalSvg.js
|
|
10706
10570
|
class PolygonMaskLocalSvg {
|
|
10707
10571
|
constructor() {
|
|
10708
10572
|
this.path = [];
|
|
@@ -10733,7 +10597,7 @@ class PolygonMaskLocalSvg {
|
|
|
10733
10597
|
}
|
|
10734
10598
|
|
|
10735
10599
|
}
|
|
10736
|
-
;// CONCATENATED MODULE: ../../plugins/polygonMask/dist/Options/Classes/PolygonMaskMove.js
|
|
10600
|
+
;// CONCATENATED MODULE: ../../plugins/polygonMask/dist/esm/Options/Classes/PolygonMaskMove.js
|
|
10737
10601
|
class PolygonMaskMove {
|
|
10738
10602
|
constructor() {
|
|
10739
10603
|
this.radius = 10;
|
|
@@ -10755,7 +10619,7 @@ class PolygonMaskMove {
|
|
|
10755
10619
|
}
|
|
10756
10620
|
|
|
10757
10621
|
}
|
|
10758
|
-
;// CONCATENATED MODULE: ../../plugins/polygonMask/dist/Options/Classes/PolygonMask.js
|
|
10622
|
+
;// CONCATENATED MODULE: ../../plugins/polygonMask/dist/esm/Options/Classes/PolygonMask.js
|
|
10759
10623
|
|
|
10760
10624
|
|
|
10761
10625
|
|
|
@@ -10821,7 +10685,7 @@ class PolygonMask {
|
|
|
10821
10685
|
}
|
|
10822
10686
|
|
|
10823
10687
|
}
|
|
10824
|
-
;// CONCATENATED MODULE: ../../plugins/polygonMask/dist/utils.js
|
|
10688
|
+
;// CONCATENATED MODULE: ../../plugins/polygonMask/dist/esm/utils.js
|
|
10825
10689
|
|
|
10826
10690
|
function drawPolygonMask(context, rawData, stroke) {
|
|
10827
10691
|
const color = colorToRgb(stroke.color);
|
|
@@ -10939,7 +10803,7 @@ function calcClosestPtOnSegment(s1, s2, pos) {
|
|
|
10939
10803
|
dx: dxx,
|
|
10940
10804
|
dy: dyy
|
|
10941
10805
|
} = getDistances(s2, s1),
|
|
10942
|
-
t = (dx * dxx + dy * dyy) / (
|
|
10806
|
+
t = (dx * dxx + dy * dyy) / (dxx ** 2 + dyy ** 2),
|
|
10943
10807
|
res = {
|
|
10944
10808
|
x: s1.x + dxx * t,
|
|
10945
10809
|
y: s1.x + dyy * t,
|
|
@@ -10967,39 +10831,7 @@ function segmentBounce(start, stop, velocity) {
|
|
|
10967
10831
|
wallNormal.multTo(d);
|
|
10968
10832
|
velocity.subFrom(wallNormal);
|
|
10969
10833
|
}
|
|
10970
|
-
;// CONCATENATED MODULE: ../../plugins/polygonMask/dist/PolygonMaskInstance.js
|
|
10971
|
-
var PolygonMaskInstance_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
10972
|
-
function adopt(value) {
|
|
10973
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
10974
|
-
resolve(value);
|
|
10975
|
-
});
|
|
10976
|
-
}
|
|
10977
|
-
|
|
10978
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
10979
|
-
function fulfilled(value) {
|
|
10980
|
-
try {
|
|
10981
|
-
step(generator.next(value));
|
|
10982
|
-
} catch (e) {
|
|
10983
|
-
reject(e);
|
|
10984
|
-
}
|
|
10985
|
-
}
|
|
10986
|
-
|
|
10987
|
-
function rejected(value) {
|
|
10988
|
-
try {
|
|
10989
|
-
step(generator["throw"](value));
|
|
10990
|
-
} catch (e) {
|
|
10991
|
-
reject(e);
|
|
10992
|
-
}
|
|
10993
|
-
}
|
|
10994
|
-
|
|
10995
|
-
function step(result) {
|
|
10996
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
10997
|
-
}
|
|
10998
|
-
|
|
10999
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
11000
|
-
});
|
|
11001
|
-
};
|
|
11002
|
-
|
|
10834
|
+
;// CONCATENATED MODULE: ../../plugins/polygonMask/dist/esm/PolygonMaskInstance.js
|
|
11003
10835
|
var PolygonMaskInstance_classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function (receiver, state, value, kind, f) {
|
|
11004
10836
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
11005
10837
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
@@ -11035,16 +10867,14 @@ class PolygonMaskInstance {
|
|
|
11035
10867
|
this.polygonMaskMoveRadius = this.options.move.radius * container.retina.pixelRatio;
|
|
11036
10868
|
}
|
|
11037
10869
|
|
|
11038
|
-
initAsync(options) {
|
|
11039
|
-
|
|
11040
|
-
|
|
11041
|
-
|
|
11042
|
-
this.polygonMaskMoveRadius = polygonMaskOptions.move.radius * this.container.retina.pixelRatio;
|
|
10870
|
+
async initAsync(options) {
|
|
10871
|
+
this.options.load(options === null || options === void 0 ? void 0 : options.polygon);
|
|
10872
|
+
const polygonMaskOptions = this.options;
|
|
10873
|
+
this.polygonMaskMoveRadius = polygonMaskOptions.move.radius * this.container.retina.pixelRatio;
|
|
11043
10874
|
|
|
11044
|
-
|
|
11045
|
-
|
|
11046
|
-
|
|
11047
|
-
});
|
|
10875
|
+
if (polygonMaskOptions.enable) {
|
|
10876
|
+
await this.initRawData();
|
|
10877
|
+
}
|
|
11048
10878
|
}
|
|
11049
10879
|
|
|
11050
10880
|
resize() {
|
|
@@ -11059,10 +10889,10 @@ class PolygonMaskInstance {
|
|
|
11059
10889
|
clearTimeout(this.redrawTimeout);
|
|
11060
10890
|
}
|
|
11061
10891
|
|
|
11062
|
-
this.redrawTimeout = window.setTimeout(() =>
|
|
11063
|
-
|
|
11064
|
-
|
|
11065
|
-
}
|
|
10892
|
+
this.redrawTimeout = window.setTimeout(async () => {
|
|
10893
|
+
await this.initRawData(true);
|
|
10894
|
+
await container.particles.redraw();
|
|
10895
|
+
}, 250);
|
|
11066
10896
|
}
|
|
11067
10897
|
|
|
11068
10898
|
stop() {
|
|
@@ -11271,24 +11101,22 @@ class PolygonMaskInstance {
|
|
|
11271
11101
|
return parsePaths(this.paths, scale, this.offset);
|
|
11272
11102
|
}
|
|
11273
11103
|
|
|
11274
|
-
downloadSvgPath(svgUrl, force) {
|
|
11275
|
-
|
|
11276
|
-
|
|
11277
|
-
|
|
11278
|
-
forceDownload = force !== null && force !== void 0 ? force : false;
|
|
11104
|
+
async downloadSvgPath(svgUrl, force) {
|
|
11105
|
+
const options = this.options,
|
|
11106
|
+
url = svgUrl || options.url,
|
|
11107
|
+
forceDownload = force !== null && force !== void 0 ? force : false;
|
|
11279
11108
|
|
|
11280
|
-
|
|
11281
|
-
|
|
11282
|
-
|
|
11109
|
+
if (!url || this.paths !== undefined && !forceDownload) {
|
|
11110
|
+
return this.raw;
|
|
11111
|
+
}
|
|
11283
11112
|
|
|
11284
|
-
|
|
11113
|
+
const req = await fetch(url);
|
|
11285
11114
|
|
|
11286
|
-
|
|
11287
|
-
|
|
11288
|
-
|
|
11115
|
+
if (!req.ok) {
|
|
11116
|
+
throw new Error("tsParticles Error - Error occurred during polygon mask download");
|
|
11117
|
+
}
|
|
11289
11118
|
|
|
11290
|
-
|
|
11291
|
-
});
|
|
11119
|
+
return this.parseSvgPath(await req.text(), force);
|
|
11292
11120
|
}
|
|
11293
11121
|
|
|
11294
11122
|
drawPoints() {
|
|
@@ -11457,78 +11285,44 @@ class PolygonMaskInstance {
|
|
|
11457
11285
|
}
|
|
11458
11286
|
}
|
|
11459
11287
|
|
|
11460
|
-
initRawData(force) {
|
|
11461
|
-
|
|
11462
|
-
const options = this.options;
|
|
11463
|
-
|
|
11464
|
-
if (options.url) {
|
|
11465
|
-
this.raw = yield this.downloadSvgPath(options.url, force);
|
|
11466
|
-
} else if (options.data) {
|
|
11467
|
-
const data = options.data;
|
|
11468
|
-
let svg;
|
|
11288
|
+
async initRawData(force) {
|
|
11289
|
+
const options = this.options;
|
|
11469
11290
|
|
|
11470
|
-
|
|
11471
|
-
|
|
11472
|
-
|
|
11473
|
-
|
|
11474
|
-
|
|
11475
|
-
svg = data;
|
|
11476
|
-
}
|
|
11291
|
+
if (options.url) {
|
|
11292
|
+
this.raw = await this.downloadSvgPath(options.url, force);
|
|
11293
|
+
} else if (options.data) {
|
|
11294
|
+
const data = options.data;
|
|
11295
|
+
let svg;
|
|
11477
11296
|
|
|
11478
|
-
|
|
11297
|
+
if (typeof data !== "string") {
|
|
11298
|
+
const path = data.path instanceof Array ? data.path.map(t => `<path d="${t}" />`).join("") : `<path d="${data.path}" />`;
|
|
11299
|
+
const namespaces = 'xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"';
|
|
11300
|
+
svg = `<svg ${namespaces} width="${data.size.width}" height="${data.size.height}">${path}</svg>`;
|
|
11301
|
+
} else {
|
|
11302
|
+
svg = data;
|
|
11479
11303
|
}
|
|
11480
11304
|
|
|
11481
|
-
this.
|
|
11305
|
+
this.raw = this.parseSvgPath(svg, force);
|
|
11306
|
+
}
|
|
11482
11307
|
|
|
11483
|
-
|
|
11484
|
-
|
|
11485
|
-
|
|
11308
|
+
this.createPath2D();
|
|
11309
|
+
|
|
11310
|
+
PolygonMaskInstance_classPrivateFieldGet(this, _PolygonMaskInstance_engine, "f").dispatchEvent("polygonMaskLoaded", {
|
|
11311
|
+
container: this.container
|
|
11486
11312
|
});
|
|
11487
11313
|
}
|
|
11488
11314
|
|
|
11489
11315
|
}
|
|
11490
11316
|
_PolygonMaskInstance_engine = new WeakMap();
|
|
11491
|
-
;// CONCATENATED MODULE: ../../plugins/polygonMask/dist/index.js
|
|
11492
|
-
var
|
|
11493
|
-
function adopt(value) {
|
|
11494
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
11495
|
-
resolve(value);
|
|
11496
|
-
});
|
|
11497
|
-
}
|
|
11498
|
-
|
|
11499
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
11500
|
-
function fulfilled(value) {
|
|
11501
|
-
try {
|
|
11502
|
-
step(generator.next(value));
|
|
11503
|
-
} catch (e) {
|
|
11504
|
-
reject(e);
|
|
11505
|
-
}
|
|
11506
|
-
}
|
|
11507
|
-
|
|
11508
|
-
function rejected(value) {
|
|
11509
|
-
try {
|
|
11510
|
-
step(generator["throw"](value));
|
|
11511
|
-
} catch (e) {
|
|
11512
|
-
reject(e);
|
|
11513
|
-
}
|
|
11514
|
-
}
|
|
11515
|
-
|
|
11516
|
-
function step(result) {
|
|
11517
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
11518
|
-
}
|
|
11519
|
-
|
|
11520
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
11521
|
-
});
|
|
11522
|
-
};
|
|
11523
|
-
|
|
11524
|
-
var polygonMask_dist_classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function (receiver, state, value, kind, f) {
|
|
11317
|
+
;// CONCATENATED MODULE: ../../plugins/polygonMask/dist/esm/index.js
|
|
11318
|
+
var dist_esm_classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function (receiver, state, value, kind, f) {
|
|
11525
11319
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
11526
11320
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
11527
11321
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
11528
11322
|
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
|
|
11529
11323
|
};
|
|
11530
11324
|
|
|
11531
|
-
var
|
|
11325
|
+
var dist_esm_classPrivateFieldGet = undefined && undefined.__classPrivateFieldGet || function (receiver, state, kind, f) {
|
|
11532
11326
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
11533
11327
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11534
11328
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
@@ -11546,11 +11340,11 @@ class PolygonMaskPlugin {
|
|
|
11546
11340
|
|
|
11547
11341
|
this.id = "polygonMask";
|
|
11548
11342
|
|
|
11549
|
-
|
|
11343
|
+
dist_esm_classPrivateFieldSet(this, _PolygonMaskPlugin_engine, engine, "f");
|
|
11550
11344
|
}
|
|
11551
11345
|
|
|
11552
11346
|
getPlugin(container) {
|
|
11553
|
-
return new PolygonMaskInstance(container,
|
|
11347
|
+
return new PolygonMaskInstance(container, dist_esm_classPrivateFieldGet(this, _PolygonMaskPlugin_engine, "f"));
|
|
11554
11348
|
}
|
|
11555
11349
|
|
|
11556
11350
|
needsPlugin(options) {
|
|
@@ -11577,21 +11371,19 @@ class PolygonMaskPlugin {
|
|
|
11577
11371
|
}
|
|
11578
11372
|
|
|
11579
11373
|
_PolygonMaskPlugin_engine = new WeakMap();
|
|
11580
|
-
function loadPolygonMaskPlugin(engine) {
|
|
11581
|
-
|
|
11582
|
-
|
|
11583
|
-
|
|
11584
|
-
}
|
|
11374
|
+
async function loadPolygonMaskPlugin(engine) {
|
|
11375
|
+
if (!isSsr() && !("SVGPathSeg" in window)) {
|
|
11376
|
+
await __webpack_require__.e(/* import() */ 939).then(__webpack_require__.t.bind(__webpack_require__, 939, 23));
|
|
11377
|
+
}
|
|
11585
11378
|
|
|
11586
|
-
|
|
11587
|
-
|
|
11588
|
-
});
|
|
11379
|
+
const plugin = new PolygonMaskPlugin(engine);
|
|
11380
|
+
await engine.addPlugin(plugin);
|
|
11589
11381
|
}
|
|
11590
11382
|
|
|
11591
11383
|
|
|
11592
11384
|
|
|
11593
11385
|
|
|
11594
|
-
;// CONCATENATED MODULE: ../../updaters/roll/dist/RollUpdater.js
|
|
11386
|
+
;// CONCATENATED MODULE: ../../updaters/roll/dist/esm/RollUpdater.js
|
|
11595
11387
|
|
|
11596
11388
|
|
|
11597
11389
|
function updateRoll(particle, delta) {
|
|
@@ -11661,46 +11453,12 @@ class RollUpdater {
|
|
|
11661
11453
|
}
|
|
11662
11454
|
|
|
11663
11455
|
}
|
|
11664
|
-
;// CONCATENATED MODULE: ../../updaters/roll/dist/index.js
|
|
11665
|
-
var roll_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
11666
|
-
function adopt(value) {
|
|
11667
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
11668
|
-
resolve(value);
|
|
11669
|
-
});
|
|
11670
|
-
}
|
|
11671
|
-
|
|
11672
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
11673
|
-
function fulfilled(value) {
|
|
11674
|
-
try {
|
|
11675
|
-
step(generator.next(value));
|
|
11676
|
-
} catch (e) {
|
|
11677
|
-
reject(e);
|
|
11678
|
-
}
|
|
11679
|
-
}
|
|
11680
|
-
|
|
11681
|
-
function rejected(value) {
|
|
11682
|
-
try {
|
|
11683
|
-
step(generator["throw"](value));
|
|
11684
|
-
} catch (e) {
|
|
11685
|
-
reject(e);
|
|
11686
|
-
}
|
|
11687
|
-
}
|
|
11688
|
-
|
|
11689
|
-
function step(result) {
|
|
11690
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
11691
|
-
}
|
|
11692
|
-
|
|
11693
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
11694
|
-
});
|
|
11695
|
-
};
|
|
11696
|
-
|
|
11456
|
+
;// CONCATENATED MODULE: ../../updaters/roll/dist/esm/index.js
|
|
11697
11457
|
|
|
11698
|
-
function loadRollUpdater(engine) {
|
|
11699
|
-
|
|
11700
|
-
yield engine.addParticleUpdater("roll", () => new RollUpdater());
|
|
11701
|
-
});
|
|
11458
|
+
async function loadRollUpdater(engine) {
|
|
11459
|
+
await engine.addParticleUpdater("roll", () => new RollUpdater());
|
|
11702
11460
|
}
|
|
11703
|
-
;// CONCATENATED MODULE: ../pjs/dist/index.js
|
|
11461
|
+
;// CONCATENATED MODULE: ../pjs/dist/esm/index.js
|
|
11704
11462
|
const initPjs = engine => {
|
|
11705
11463
|
const particlesJS = (tagId, options) => {
|
|
11706
11464
|
return engine.load(tagId, options);
|
|
@@ -11728,7 +11486,7 @@ const initPjs = engine => {
|
|
|
11728
11486
|
};
|
|
11729
11487
|
|
|
11730
11488
|
|
|
11731
|
-
;// CONCATENATED MODULE: ../../updaters/angle/dist/AngleUpdater.js
|
|
11489
|
+
;// CONCATENATED MODULE: ../../updaters/angle/dist/esm/AngleUpdater.js
|
|
11732
11490
|
|
|
11733
11491
|
|
|
11734
11492
|
function updateAngle(particle, delta) {
|
|
@@ -11826,46 +11584,12 @@ class AngleUpdater {
|
|
|
11826
11584
|
}
|
|
11827
11585
|
|
|
11828
11586
|
}
|
|
11829
|
-
;// CONCATENATED MODULE: ../../updaters/angle/dist/index.js
|
|
11830
|
-
var angle_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
11831
|
-
function adopt(value) {
|
|
11832
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
11833
|
-
resolve(value);
|
|
11834
|
-
});
|
|
11835
|
-
}
|
|
11836
|
-
|
|
11837
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
11838
|
-
function fulfilled(value) {
|
|
11839
|
-
try {
|
|
11840
|
-
step(generator.next(value));
|
|
11841
|
-
} catch (e) {
|
|
11842
|
-
reject(e);
|
|
11843
|
-
}
|
|
11844
|
-
}
|
|
11587
|
+
;// CONCATENATED MODULE: ../../updaters/angle/dist/esm/index.js
|
|
11845
11588
|
|
|
11846
|
-
|
|
11847
|
-
|
|
11848
|
-
step(generator["throw"](value));
|
|
11849
|
-
} catch (e) {
|
|
11850
|
-
reject(e);
|
|
11851
|
-
}
|
|
11852
|
-
}
|
|
11853
|
-
|
|
11854
|
-
function step(result) {
|
|
11855
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
11856
|
-
}
|
|
11857
|
-
|
|
11858
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
11859
|
-
});
|
|
11860
|
-
};
|
|
11861
|
-
|
|
11862
|
-
|
|
11863
|
-
function loadAngleUpdater(engine) {
|
|
11864
|
-
return angle_dist_awaiter(this, void 0, void 0, function* () {
|
|
11865
|
-
yield engine.addParticleUpdater("angle", container => new AngleUpdater(container));
|
|
11866
|
-
});
|
|
11589
|
+
async function loadAngleUpdater(engine) {
|
|
11590
|
+
await engine.addParticleUpdater("angle", container => new AngleUpdater(container));
|
|
11867
11591
|
}
|
|
11868
|
-
;// CONCATENATED MODULE: ../../move/base/dist/Utils.js
|
|
11592
|
+
;// CONCATENATED MODULE: ../../move/base/dist/esm/Utils.js
|
|
11869
11593
|
|
|
11870
11594
|
function applyDistance(particle) {
|
|
11871
11595
|
const initialPosition = particle.initialPosition;
|
|
@@ -11986,7 +11710,7 @@ function getProximitySpeedFactor(particle) {
|
|
|
11986
11710
|
const slowFactor = options.interactivity.modes.slow.factor;
|
|
11987
11711
|
return proximityFactor / slowFactor;
|
|
11988
11712
|
}
|
|
11989
|
-
;// CONCATENATED MODULE: ../../move/base/dist/BaseMover.js
|
|
11713
|
+
;// CONCATENATED MODULE: ../../move/base/dist/esm/BaseMover.js
|
|
11990
11714
|
|
|
11991
11715
|
|
|
11992
11716
|
class BaseMover {
|
|
@@ -12075,7 +11799,7 @@ class BaseMover {
|
|
|
12075
11799
|
}
|
|
12076
11800
|
|
|
12077
11801
|
const zIndexOptions = particle.options.zIndex,
|
|
12078
|
-
zVelocityFactor =
|
|
11802
|
+
zVelocityFactor = (1 - particle.zIndexFactor) ** zIndexOptions.velocityRate;
|
|
12079
11803
|
|
|
12080
11804
|
if (moveOptions.spin.enable) {
|
|
12081
11805
|
spin(particle, moveSpeed);
|
|
@@ -12096,46 +11820,12 @@ class BaseMover {
|
|
|
12096
11820
|
}
|
|
12097
11821
|
|
|
12098
11822
|
}
|
|
12099
|
-
;// CONCATENATED MODULE: ../../move/base/dist/index.js
|
|
12100
|
-
var base_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
12101
|
-
function adopt(value) {
|
|
12102
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
12103
|
-
resolve(value);
|
|
12104
|
-
});
|
|
12105
|
-
}
|
|
12106
|
-
|
|
12107
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
12108
|
-
function fulfilled(value) {
|
|
12109
|
-
try {
|
|
12110
|
-
step(generator.next(value));
|
|
12111
|
-
} catch (e) {
|
|
12112
|
-
reject(e);
|
|
12113
|
-
}
|
|
12114
|
-
}
|
|
12115
|
-
|
|
12116
|
-
function rejected(value) {
|
|
12117
|
-
try {
|
|
12118
|
-
step(generator["throw"](value));
|
|
12119
|
-
} catch (e) {
|
|
12120
|
-
reject(e);
|
|
12121
|
-
}
|
|
12122
|
-
}
|
|
12123
|
-
|
|
12124
|
-
function step(result) {
|
|
12125
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
12126
|
-
}
|
|
12127
|
-
|
|
12128
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
12129
|
-
});
|
|
12130
|
-
};
|
|
12131
|
-
|
|
11823
|
+
;// CONCATENATED MODULE: ../../move/base/dist/esm/index.js
|
|
12132
11824
|
|
|
12133
|
-
function loadBaseMover(engine) {
|
|
12134
|
-
|
|
12135
|
-
engine.addMover("base", () => new BaseMover());
|
|
12136
|
-
});
|
|
11825
|
+
async function loadBaseMover(engine) {
|
|
11826
|
+
engine.addMover("base", () => new BaseMover());
|
|
12137
11827
|
}
|
|
12138
|
-
;// CONCATENATED MODULE: ../../shapes/circle/dist/CircleDrawer.js
|
|
11828
|
+
;// CONCATENATED MODULE: ../../shapes/circle/dist/esm/CircleDrawer.js
|
|
12139
11829
|
class CircleDrawer {
|
|
12140
11830
|
getSidesCount() {
|
|
12141
11831
|
return 12;
|
|
@@ -12146,46 +11836,12 @@ class CircleDrawer {
|
|
|
12146
11836
|
}
|
|
12147
11837
|
|
|
12148
11838
|
}
|
|
12149
|
-
;// CONCATENATED MODULE: ../../shapes/circle/dist/index.js
|
|
12150
|
-
var circle_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
12151
|
-
function adopt(value) {
|
|
12152
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
12153
|
-
resolve(value);
|
|
12154
|
-
});
|
|
12155
|
-
}
|
|
12156
|
-
|
|
12157
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
12158
|
-
function fulfilled(value) {
|
|
12159
|
-
try {
|
|
12160
|
-
step(generator.next(value));
|
|
12161
|
-
} catch (e) {
|
|
12162
|
-
reject(e);
|
|
12163
|
-
}
|
|
12164
|
-
}
|
|
12165
|
-
|
|
12166
|
-
function rejected(value) {
|
|
12167
|
-
try {
|
|
12168
|
-
step(generator["throw"](value));
|
|
12169
|
-
} catch (e) {
|
|
12170
|
-
reject(e);
|
|
12171
|
-
}
|
|
12172
|
-
}
|
|
12173
|
-
|
|
12174
|
-
function step(result) {
|
|
12175
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
12176
|
-
}
|
|
12177
|
-
|
|
12178
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
12179
|
-
});
|
|
12180
|
-
};
|
|
11839
|
+
;// CONCATENATED MODULE: ../../shapes/circle/dist/esm/index.js
|
|
12181
11840
|
|
|
12182
|
-
|
|
12183
|
-
|
|
12184
|
-
return circle_dist_awaiter(this, void 0, void 0, function* () {
|
|
12185
|
-
yield engine.addShape("circle", new CircleDrawer());
|
|
12186
|
-
});
|
|
11841
|
+
async function loadCircleShape(engine) {
|
|
11842
|
+
await engine.addShape("circle", new CircleDrawer());
|
|
12187
11843
|
}
|
|
12188
|
-
;// CONCATENATED MODULE: ../../updaters/color/dist/ColorUpdater.js
|
|
11844
|
+
;// CONCATENATED MODULE: ../../updaters/color/dist/esm/ColorUpdater.js
|
|
12189
11845
|
|
|
12190
11846
|
|
|
12191
11847
|
function updateColorValue(delta, value, valueAnimation, max, decrease) {
|
|
@@ -12264,78 +11920,12 @@ class ColorUpdater {
|
|
|
12264
11920
|
}
|
|
12265
11921
|
|
|
12266
11922
|
}
|
|
12267
|
-
;// CONCATENATED MODULE: ../../updaters/color/dist/index.js
|
|
12268
|
-
var color_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
12269
|
-
function adopt(value) {
|
|
12270
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
12271
|
-
resolve(value);
|
|
12272
|
-
});
|
|
12273
|
-
}
|
|
12274
|
-
|
|
12275
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
12276
|
-
function fulfilled(value) {
|
|
12277
|
-
try {
|
|
12278
|
-
step(generator.next(value));
|
|
12279
|
-
} catch (e) {
|
|
12280
|
-
reject(e);
|
|
12281
|
-
}
|
|
12282
|
-
}
|
|
12283
|
-
|
|
12284
|
-
function rejected(value) {
|
|
12285
|
-
try {
|
|
12286
|
-
step(generator["throw"](value));
|
|
12287
|
-
} catch (e) {
|
|
12288
|
-
reject(e);
|
|
12289
|
-
}
|
|
12290
|
-
}
|
|
11923
|
+
;// CONCATENATED MODULE: ../../updaters/color/dist/esm/index.js
|
|
12291
11924
|
|
|
12292
|
-
|
|
12293
|
-
|
|
12294
|
-
}
|
|
12295
|
-
|
|
12296
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
12297
|
-
});
|
|
12298
|
-
};
|
|
12299
|
-
|
|
12300
|
-
|
|
12301
|
-
function loadColorUpdater(engine) {
|
|
12302
|
-
return color_dist_awaiter(this, void 0, void 0, function* () {
|
|
12303
|
-
yield engine.addParticleUpdater("color", container => new ColorUpdater(container));
|
|
12304
|
-
});
|
|
11925
|
+
async function loadColorUpdater(engine) {
|
|
11926
|
+
await engine.addParticleUpdater("color", container => new ColorUpdater(container));
|
|
12305
11927
|
}
|
|
12306
|
-
;// CONCATENATED MODULE: ../../interactions/external/attract/dist/Attractor.js
|
|
12307
|
-
var Attractor_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
12308
|
-
function adopt(value) {
|
|
12309
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
12310
|
-
resolve(value);
|
|
12311
|
-
});
|
|
12312
|
-
}
|
|
12313
|
-
|
|
12314
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
12315
|
-
function fulfilled(value) {
|
|
12316
|
-
try {
|
|
12317
|
-
step(generator.next(value));
|
|
12318
|
-
} catch (e) {
|
|
12319
|
-
reject(e);
|
|
12320
|
-
}
|
|
12321
|
-
}
|
|
12322
|
-
|
|
12323
|
-
function rejected(value) {
|
|
12324
|
-
try {
|
|
12325
|
-
step(generator["throw"](value));
|
|
12326
|
-
} catch (e) {
|
|
12327
|
-
reject(e);
|
|
12328
|
-
}
|
|
12329
|
-
}
|
|
12330
|
-
|
|
12331
|
-
function step(result) {
|
|
12332
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
12333
|
-
}
|
|
12334
|
-
|
|
12335
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
12336
|
-
});
|
|
12337
|
-
};
|
|
12338
|
-
|
|
11928
|
+
;// CONCATENATED MODULE: ../../interactions/external/attract/dist/esm/Attractor.js
|
|
12339
11929
|
|
|
12340
11930
|
class Attractor extends ExternalInteractorBase {
|
|
12341
11931
|
constructor(container) {
|
|
@@ -12400,23 +11990,21 @@ class Attractor extends ExternalInteractorBase {
|
|
|
12400
11990
|
|
|
12401
11991
|
reset() {}
|
|
12402
11992
|
|
|
12403
|
-
interact() {
|
|
12404
|
-
|
|
12405
|
-
|
|
12406
|
-
|
|
12407
|
-
|
|
12408
|
-
|
|
12409
|
-
|
|
12410
|
-
|
|
12411
|
-
|
|
12412
|
-
|
|
12413
|
-
|
|
12414
|
-
|
|
12415
|
-
|
|
12416
|
-
|
|
12417
|
-
|
|
12418
|
-
}
|
|
12419
|
-
});
|
|
11993
|
+
async interact() {
|
|
11994
|
+
const container = this.container,
|
|
11995
|
+
options = container.actualOptions,
|
|
11996
|
+
mouseMoveStatus = container.interactivity.status === mouseMoveEvent,
|
|
11997
|
+
events = options.interactivity.events,
|
|
11998
|
+
hoverEnabled = events.onHover.enable,
|
|
11999
|
+
hoverMode = events.onHover.mode,
|
|
12000
|
+
clickEnabled = events.onClick.enable,
|
|
12001
|
+
clickMode = events.onClick.mode;
|
|
12002
|
+
|
|
12003
|
+
if (mouseMoveStatus && hoverEnabled && isInArray("attract", hoverMode)) {
|
|
12004
|
+
this.hoverAttract();
|
|
12005
|
+
} else if (clickEnabled && isInArray("attract", clickMode)) {
|
|
12006
|
+
this.clickAttract();
|
|
12007
|
+
}
|
|
12420
12008
|
}
|
|
12421
12009
|
|
|
12422
12010
|
hoverAttract() {
|
|
@@ -12487,78 +12075,12 @@ class Attractor extends ExternalInteractorBase {
|
|
|
12487
12075
|
}
|
|
12488
12076
|
|
|
12489
12077
|
}
|
|
12490
|
-
;// CONCATENATED MODULE: ../../interactions/external/attract/dist/index.js
|
|
12491
|
-
var attract_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
12492
|
-
function adopt(value) {
|
|
12493
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
12494
|
-
resolve(value);
|
|
12495
|
-
});
|
|
12496
|
-
}
|
|
12078
|
+
;// CONCATENATED MODULE: ../../interactions/external/attract/dist/esm/index.js
|
|
12497
12079
|
|
|
12498
|
-
|
|
12499
|
-
|
|
12500
|
-
try {
|
|
12501
|
-
step(generator.next(value));
|
|
12502
|
-
} catch (e) {
|
|
12503
|
-
reject(e);
|
|
12504
|
-
}
|
|
12505
|
-
}
|
|
12506
|
-
|
|
12507
|
-
function rejected(value) {
|
|
12508
|
-
try {
|
|
12509
|
-
step(generator["throw"](value));
|
|
12510
|
-
} catch (e) {
|
|
12511
|
-
reject(e);
|
|
12512
|
-
}
|
|
12513
|
-
}
|
|
12514
|
-
|
|
12515
|
-
function step(result) {
|
|
12516
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
12517
|
-
}
|
|
12518
|
-
|
|
12519
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
12520
|
-
});
|
|
12521
|
-
};
|
|
12522
|
-
|
|
12523
|
-
|
|
12524
|
-
function loadExternalAttractInteraction(engine) {
|
|
12525
|
-
return attract_dist_awaiter(this, void 0, void 0, function* () {
|
|
12526
|
-
yield engine.addInteractor("externalAttract", container => new Attractor(container));
|
|
12527
|
-
});
|
|
12080
|
+
async function loadExternalAttractInteraction(engine) {
|
|
12081
|
+
await engine.addInteractor("externalAttract", container => new Attractor(container));
|
|
12528
12082
|
}
|
|
12529
|
-
;// CONCATENATED MODULE: ../../interactions/external/bounce/dist/Bouncer.js
|
|
12530
|
-
var Bouncer_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
12531
|
-
function adopt(value) {
|
|
12532
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
12533
|
-
resolve(value);
|
|
12534
|
-
});
|
|
12535
|
-
}
|
|
12536
|
-
|
|
12537
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
12538
|
-
function fulfilled(value) {
|
|
12539
|
-
try {
|
|
12540
|
-
step(generator.next(value));
|
|
12541
|
-
} catch (e) {
|
|
12542
|
-
reject(e);
|
|
12543
|
-
}
|
|
12544
|
-
}
|
|
12545
|
-
|
|
12546
|
-
function rejected(value) {
|
|
12547
|
-
try {
|
|
12548
|
-
step(generator["throw"](value));
|
|
12549
|
-
} catch (e) {
|
|
12550
|
-
reject(e);
|
|
12551
|
-
}
|
|
12552
|
-
}
|
|
12553
|
-
|
|
12554
|
-
function step(result) {
|
|
12555
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
12556
|
-
}
|
|
12557
|
-
|
|
12558
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
12559
|
-
});
|
|
12560
|
-
};
|
|
12561
|
-
|
|
12083
|
+
;// CONCATENATED MODULE: ../../interactions/external/bounce/dist/esm/Bouncer.js
|
|
12562
12084
|
|
|
12563
12085
|
class Bouncer extends ExternalInteractorBase {
|
|
12564
12086
|
constructor(container) {
|
|
@@ -12574,22 +12096,20 @@ class Bouncer extends ExternalInteractorBase {
|
|
|
12574
12096
|
return mouse.position && events.onHover.enable && isInArray("bounce", events.onHover.mode) || isDivModeEnabled("bounce", divs);
|
|
12575
12097
|
}
|
|
12576
12098
|
|
|
12577
|
-
interact() {
|
|
12578
|
-
|
|
12579
|
-
|
|
12580
|
-
|
|
12581
|
-
|
|
12582
|
-
|
|
12583
|
-
|
|
12584
|
-
|
|
12585
|
-
|
|
12586
|
-
|
|
12587
|
-
|
|
12588
|
-
|
|
12589
|
-
|
|
12590
|
-
|
|
12591
|
-
}
|
|
12592
|
-
});
|
|
12099
|
+
async interact() {
|
|
12100
|
+
const container = this.container,
|
|
12101
|
+
options = container.actualOptions,
|
|
12102
|
+
events = options.interactivity.events,
|
|
12103
|
+
mouseMoveStatus = container.interactivity.status === mouseMoveEvent,
|
|
12104
|
+
hoverEnabled = events.onHover.enable,
|
|
12105
|
+
hoverMode = events.onHover.mode,
|
|
12106
|
+
divs = events.onDiv;
|
|
12107
|
+
|
|
12108
|
+
if (mouseMoveStatus && hoverEnabled && isInArray("bounce", hoverMode)) {
|
|
12109
|
+
this.processMouseBounce();
|
|
12110
|
+
} else {
|
|
12111
|
+
divModeExecute("bounce", divs, (selector, div) => this.singleSelectorBounce(selector, div));
|
|
12112
|
+
}
|
|
12593
12113
|
}
|
|
12594
12114
|
|
|
12595
12115
|
reset() {}
|
|
@@ -12636,7 +12156,7 @@ class Bouncer extends ExternalInteractorBase {
|
|
|
12636
12156
|
circleBounce(circleBounceDataFromParticle(particle), {
|
|
12637
12157
|
position,
|
|
12638
12158
|
radius,
|
|
12639
|
-
mass:
|
|
12159
|
+
mass: radius ** 2 * Math.PI / 2,
|
|
12640
12160
|
velocity: Vector.origin,
|
|
12641
12161
|
factor: Vector.origin
|
|
12642
12162
|
});
|
|
@@ -12647,78 +12167,12 @@ class Bouncer extends ExternalInteractorBase {
|
|
|
12647
12167
|
}
|
|
12648
12168
|
|
|
12649
12169
|
}
|
|
12650
|
-
;// CONCATENATED MODULE: ../../interactions/external/bounce/dist/index.js
|
|
12651
|
-
var bounce_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
12652
|
-
function adopt(value) {
|
|
12653
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
12654
|
-
resolve(value);
|
|
12655
|
-
});
|
|
12656
|
-
}
|
|
12657
|
-
|
|
12658
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
12659
|
-
function fulfilled(value) {
|
|
12660
|
-
try {
|
|
12661
|
-
step(generator.next(value));
|
|
12662
|
-
} catch (e) {
|
|
12663
|
-
reject(e);
|
|
12664
|
-
}
|
|
12665
|
-
}
|
|
12666
|
-
|
|
12667
|
-
function rejected(value) {
|
|
12668
|
-
try {
|
|
12669
|
-
step(generator["throw"](value));
|
|
12670
|
-
} catch (e) {
|
|
12671
|
-
reject(e);
|
|
12672
|
-
}
|
|
12673
|
-
}
|
|
12170
|
+
;// CONCATENATED MODULE: ../../interactions/external/bounce/dist/esm/index.js
|
|
12674
12171
|
|
|
12675
|
-
|
|
12676
|
-
|
|
12677
|
-
}
|
|
12678
|
-
|
|
12679
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
12680
|
-
});
|
|
12681
|
-
};
|
|
12682
|
-
|
|
12683
|
-
|
|
12684
|
-
function loadExternalBounceInteraction(engine) {
|
|
12685
|
-
return bounce_dist_awaiter(this, void 0, void 0, function* () {
|
|
12686
|
-
yield engine.addInteractor("externalBounce", container => new Bouncer(container));
|
|
12687
|
-
});
|
|
12172
|
+
async function loadExternalBounceInteraction(engine) {
|
|
12173
|
+
await engine.addInteractor("externalBounce", container => new Bouncer(container));
|
|
12688
12174
|
}
|
|
12689
|
-
;// CONCATENATED MODULE: ../../interactions/external/bubble/dist/Bubbler.js
|
|
12690
|
-
var Bubbler_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
12691
|
-
function adopt(value) {
|
|
12692
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
12693
|
-
resolve(value);
|
|
12694
|
-
});
|
|
12695
|
-
}
|
|
12696
|
-
|
|
12697
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
12698
|
-
function fulfilled(value) {
|
|
12699
|
-
try {
|
|
12700
|
-
step(generator.next(value));
|
|
12701
|
-
} catch (e) {
|
|
12702
|
-
reject(e);
|
|
12703
|
-
}
|
|
12704
|
-
}
|
|
12705
|
-
|
|
12706
|
-
function rejected(value) {
|
|
12707
|
-
try {
|
|
12708
|
-
step(generator["throw"](value));
|
|
12709
|
-
} catch (e) {
|
|
12710
|
-
reject(e);
|
|
12711
|
-
}
|
|
12712
|
-
}
|
|
12713
|
-
|
|
12714
|
-
function step(result) {
|
|
12715
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
12716
|
-
}
|
|
12717
|
-
|
|
12718
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
12719
|
-
});
|
|
12720
|
-
};
|
|
12721
|
-
|
|
12175
|
+
;// CONCATENATED MODULE: ../../interactions/external/bubble/dist/esm/Bubbler.js
|
|
12722
12176
|
|
|
12723
12177
|
|
|
12724
12178
|
function calculateBubbleValue(particleValue, modeValue, optionsValue, ratio) {
|
|
@@ -12780,26 +12234,24 @@ class Bubbler extends ExternalInteractorBase {
|
|
|
12780
12234
|
delete particle.bubble.color;
|
|
12781
12235
|
}
|
|
12782
12236
|
|
|
12783
|
-
interact() {
|
|
12784
|
-
|
|
12785
|
-
|
|
12786
|
-
|
|
12787
|
-
|
|
12788
|
-
|
|
12789
|
-
|
|
12790
|
-
|
|
12791
|
-
|
|
12792
|
-
|
|
12793
|
-
|
|
12794
|
-
|
|
12795
|
-
|
|
12796
|
-
|
|
12797
|
-
|
|
12798
|
-
|
|
12799
|
-
|
|
12800
|
-
|
|
12801
|
-
}
|
|
12802
|
-
});
|
|
12237
|
+
async interact() {
|
|
12238
|
+
const options = this.container.actualOptions,
|
|
12239
|
+
events = options.interactivity.events,
|
|
12240
|
+
onHover = events.onHover,
|
|
12241
|
+
onClick = events.onClick,
|
|
12242
|
+
hoverEnabled = onHover.enable,
|
|
12243
|
+
hoverMode = onHover.mode,
|
|
12244
|
+
clickEnabled = onClick.enable,
|
|
12245
|
+
clickMode = onClick.mode,
|
|
12246
|
+
divs = events.onDiv;
|
|
12247
|
+
|
|
12248
|
+
if (hoverEnabled && isInArray("bubble", hoverMode)) {
|
|
12249
|
+
this.hoverBubble();
|
|
12250
|
+
} else if (clickEnabled && isInArray("bubble", clickMode)) {
|
|
12251
|
+
this.clickBubble();
|
|
12252
|
+
} else {
|
|
12253
|
+
divModeExecute("bubble", divs, (selector, div) => this.singleSelectorHover(selector, div));
|
|
12254
|
+
}
|
|
12803
12255
|
}
|
|
12804
12256
|
|
|
12805
12257
|
singleSelectorHover(selector, div) {
|
|
@@ -13074,78 +12526,12 @@ class Bubbler extends ExternalInteractorBase {
|
|
|
13074
12526
|
}
|
|
13075
12527
|
|
|
13076
12528
|
}
|
|
13077
|
-
;// CONCATENATED MODULE: ../../interactions/external/bubble/dist/index.js
|
|
13078
|
-
var bubble_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
13079
|
-
function adopt(value) {
|
|
13080
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
13081
|
-
resolve(value);
|
|
13082
|
-
});
|
|
13083
|
-
}
|
|
13084
|
-
|
|
13085
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
13086
|
-
function fulfilled(value) {
|
|
13087
|
-
try {
|
|
13088
|
-
step(generator.next(value));
|
|
13089
|
-
} catch (e) {
|
|
13090
|
-
reject(e);
|
|
13091
|
-
}
|
|
13092
|
-
}
|
|
13093
|
-
|
|
13094
|
-
function rejected(value) {
|
|
13095
|
-
try {
|
|
13096
|
-
step(generator["throw"](value));
|
|
13097
|
-
} catch (e) {
|
|
13098
|
-
reject(e);
|
|
13099
|
-
}
|
|
13100
|
-
}
|
|
12529
|
+
;// CONCATENATED MODULE: ../../interactions/external/bubble/dist/esm/index.js
|
|
13101
12530
|
|
|
13102
|
-
|
|
13103
|
-
|
|
13104
|
-
}
|
|
13105
|
-
|
|
13106
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
13107
|
-
});
|
|
13108
|
-
};
|
|
13109
|
-
|
|
13110
|
-
|
|
13111
|
-
function loadExternalBubbleInteraction(engine) {
|
|
13112
|
-
return bubble_dist_awaiter(this, void 0, void 0, function* () {
|
|
13113
|
-
yield engine.addInteractor("externalBubble", container => new Bubbler(container));
|
|
13114
|
-
});
|
|
12531
|
+
async function loadExternalBubbleInteraction(engine) {
|
|
12532
|
+
await engine.addInteractor("externalBubble", container => new Bubbler(container));
|
|
13115
12533
|
}
|
|
13116
|
-
;// CONCATENATED MODULE: ../../interactions/external/connect/dist/Connector.js
|
|
13117
|
-
var Connector_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
13118
|
-
function adopt(value) {
|
|
13119
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
13120
|
-
resolve(value);
|
|
13121
|
-
});
|
|
13122
|
-
}
|
|
13123
|
-
|
|
13124
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
13125
|
-
function fulfilled(value) {
|
|
13126
|
-
try {
|
|
13127
|
-
step(generator.next(value));
|
|
13128
|
-
} catch (e) {
|
|
13129
|
-
reject(e);
|
|
13130
|
-
}
|
|
13131
|
-
}
|
|
13132
|
-
|
|
13133
|
-
function rejected(value) {
|
|
13134
|
-
try {
|
|
13135
|
-
step(generator["throw"](value));
|
|
13136
|
-
} catch (e) {
|
|
13137
|
-
reject(e);
|
|
13138
|
-
}
|
|
13139
|
-
}
|
|
13140
|
-
|
|
13141
|
-
function step(result) {
|
|
13142
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
13143
|
-
}
|
|
13144
|
-
|
|
13145
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
13146
|
-
});
|
|
13147
|
-
};
|
|
13148
|
-
|
|
12534
|
+
;// CONCATENATED MODULE: ../../interactions/external/connect/dist/esm/Connector.js
|
|
13149
12535
|
|
|
13150
12536
|
class Connector extends ExternalInteractorBase {
|
|
13151
12537
|
constructor(container) {
|
|
@@ -13166,115 +12552,47 @@ class Connector extends ExternalInteractorBase {
|
|
|
13166
12552
|
|
|
13167
12553
|
reset() {}
|
|
13168
12554
|
|
|
13169
|
-
interact() {
|
|
13170
|
-
|
|
13171
|
-
|
|
13172
|
-
options = container.actualOptions;
|
|
12555
|
+
async interact() {
|
|
12556
|
+
const container = this.container,
|
|
12557
|
+
options = container.actualOptions;
|
|
13173
12558
|
|
|
13174
|
-
|
|
13175
|
-
|
|
12559
|
+
if (options.interactivity.events.onHover.enable && container.interactivity.status === "mousemove") {
|
|
12560
|
+
const mousePos = container.interactivity.mouse.position;
|
|
13176
12561
|
|
|
13177
|
-
|
|
13178
|
-
|
|
13179
|
-
|
|
12562
|
+
if (!mousePos) {
|
|
12563
|
+
return;
|
|
12564
|
+
}
|
|
13180
12565
|
|
|
13181
|
-
|
|
13182
|
-
|
|
13183
|
-
|
|
12566
|
+
const distance = Math.abs(container.retina.connectModeRadius),
|
|
12567
|
+
query = container.particles.quadTree.queryCircle(mousePos, distance);
|
|
12568
|
+
let i = 0;
|
|
13184
12569
|
|
|
13185
|
-
|
|
13186
|
-
|
|
12570
|
+
for (const p1 of query) {
|
|
12571
|
+
const pos1 = p1.getPosition();
|
|
13187
12572
|
|
|
13188
|
-
|
|
13189
|
-
|
|
13190
|
-
|
|
13191
|
-
|
|
13192
|
-
|
|
12573
|
+
for (const p2 of query.slice(i + 1)) {
|
|
12574
|
+
const pos2 = p2.getPosition(),
|
|
12575
|
+
distMax = Math.abs(container.retina.connectModeDistance),
|
|
12576
|
+
xDiff = Math.abs(pos1.x - pos2.x),
|
|
12577
|
+
yDiff = Math.abs(pos1.y - pos2.y);
|
|
13193
12578
|
|
|
13194
|
-
|
|
13195
|
-
|
|
13196
|
-
}
|
|
12579
|
+
if (xDiff < distMax && yDiff < distMax) {
|
|
12580
|
+
container.canvas.drawConnectLine(p1, p2);
|
|
13197
12581
|
}
|
|
13198
|
-
|
|
13199
|
-
++i;
|
|
13200
12582
|
}
|
|
13201
|
-
}
|
|
13202
|
-
});
|
|
13203
|
-
}
|
|
13204
12583
|
|
|
13205
|
-
|
|
13206
|
-
;// CONCATENATED MODULE: ../../interactions/external/connect/dist/index.js
|
|
13207
|
-
var connect_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
13208
|
-
function adopt(value) {
|
|
13209
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
13210
|
-
resolve(value);
|
|
13211
|
-
});
|
|
13212
|
-
}
|
|
13213
|
-
|
|
13214
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
13215
|
-
function fulfilled(value) {
|
|
13216
|
-
try {
|
|
13217
|
-
step(generator.next(value));
|
|
13218
|
-
} catch (e) {
|
|
13219
|
-
reject(e);
|
|
12584
|
+
++i;
|
|
13220
12585
|
}
|
|
13221
12586
|
}
|
|
13222
|
-
|
|
13223
|
-
function rejected(value) {
|
|
13224
|
-
try {
|
|
13225
|
-
step(generator["throw"](value));
|
|
13226
|
-
} catch (e) {
|
|
13227
|
-
reject(e);
|
|
13228
|
-
}
|
|
13229
|
-
}
|
|
13230
|
-
|
|
13231
|
-
function step(result) {
|
|
13232
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
13233
|
-
}
|
|
13234
|
-
|
|
13235
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
13236
|
-
});
|
|
13237
|
-
};
|
|
13238
|
-
|
|
13239
|
-
|
|
13240
|
-
function loadExternalConnectInteraction(engine) {
|
|
13241
|
-
return connect_dist_awaiter(this, void 0, void 0, function* () {
|
|
13242
|
-
yield engine.addInteractor("externalConnect", container => new Connector(container));
|
|
13243
|
-
});
|
|
13244
|
-
}
|
|
13245
|
-
;// CONCATENATED MODULE: ../../interactions/external/grab/dist/Grabber.js
|
|
13246
|
-
var Grabber_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
13247
|
-
function adopt(value) {
|
|
13248
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
13249
|
-
resolve(value);
|
|
13250
|
-
});
|
|
13251
12587
|
}
|
|
13252
12588
|
|
|
13253
|
-
|
|
13254
|
-
|
|
13255
|
-
try {
|
|
13256
|
-
step(generator.next(value));
|
|
13257
|
-
} catch (e) {
|
|
13258
|
-
reject(e);
|
|
13259
|
-
}
|
|
13260
|
-
}
|
|
13261
|
-
|
|
13262
|
-
function rejected(value) {
|
|
13263
|
-
try {
|
|
13264
|
-
step(generator["throw"](value));
|
|
13265
|
-
} catch (e) {
|
|
13266
|
-
reject(e);
|
|
13267
|
-
}
|
|
13268
|
-
}
|
|
13269
|
-
|
|
13270
|
-
function step(result) {
|
|
13271
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
13272
|
-
}
|
|
13273
|
-
|
|
13274
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
13275
|
-
});
|
|
13276
|
-
};
|
|
12589
|
+
}
|
|
12590
|
+
;// CONCATENATED MODULE: ../../interactions/external/connect/dist/esm/index.js
|
|
13277
12591
|
|
|
12592
|
+
async function loadExternalConnectInteraction(engine) {
|
|
12593
|
+
await engine.addInteractor("externalConnect", container => new Connector(container));
|
|
12594
|
+
}
|
|
12595
|
+
;// CONCATENATED MODULE: ../../interactions/external/grab/dist/esm/Grabber.js
|
|
13278
12596
|
|
|
13279
12597
|
class Grabber extends ExternalInteractorBase {
|
|
13280
12598
|
constructor(container) {
|
|
@@ -13290,134 +12608,66 @@ class Grabber extends ExternalInteractorBase {
|
|
|
13290
12608
|
|
|
13291
12609
|
reset() {}
|
|
13292
12610
|
|
|
13293
|
-
interact() {
|
|
12611
|
+
async interact() {
|
|
13294
12612
|
var _a;
|
|
13295
12613
|
|
|
13296
|
-
|
|
13297
|
-
|
|
13298
|
-
|
|
13299
|
-
interactivity = options.interactivity;
|
|
13300
|
-
|
|
13301
|
-
if (!interactivity.events.onHover.enable || container.interactivity.status !== mouseMoveEvent) {
|
|
13302
|
-
return;
|
|
13303
|
-
}
|
|
13304
|
-
|
|
13305
|
-
const mousePos = container.interactivity.mouse.position;
|
|
13306
|
-
|
|
13307
|
-
if (!mousePos) {
|
|
13308
|
-
return;
|
|
13309
|
-
}
|
|
13310
|
-
|
|
13311
|
-
const distance = container.retina.grabModeDistance,
|
|
13312
|
-
query = container.particles.quadTree.queryCircle(mousePos, distance);
|
|
13313
|
-
|
|
13314
|
-
for (const particle of query) {
|
|
13315
|
-
const pos = particle.getPosition(),
|
|
13316
|
-
pointDistance = getDistance(pos, mousePos);
|
|
13317
|
-
|
|
13318
|
-
if (pointDistance > distance) {
|
|
13319
|
-
continue;
|
|
13320
|
-
}
|
|
13321
|
-
|
|
13322
|
-
const grabLineOptions = interactivity.modes.grab.links,
|
|
13323
|
-
lineOpacity = grabLineOptions.opacity,
|
|
13324
|
-
opacityLine = lineOpacity - pointDistance * lineOpacity / distance;
|
|
12614
|
+
const container = this.container,
|
|
12615
|
+
options = container.actualOptions,
|
|
12616
|
+
interactivity = options.interactivity;
|
|
13325
12617
|
|
|
13326
|
-
|
|
13327
|
-
|
|
13328
|
-
|
|
12618
|
+
if (!interactivity.events.onHover.enable || container.interactivity.status !== mouseMoveEvent) {
|
|
12619
|
+
return;
|
|
12620
|
+
}
|
|
13329
12621
|
|
|
13330
|
-
|
|
12622
|
+
const mousePos = container.interactivity.mouse.position;
|
|
13331
12623
|
|
|
13332
|
-
|
|
13333
|
-
|
|
13334
|
-
|
|
13335
|
-
}
|
|
12624
|
+
if (!mousePos) {
|
|
12625
|
+
return;
|
|
12626
|
+
}
|
|
13336
12627
|
|
|
13337
|
-
|
|
12628
|
+
const distance = container.retina.grabModeDistance,
|
|
12629
|
+
query = container.particles.quadTree.queryCircle(mousePos, distance);
|
|
13338
12630
|
|
|
13339
|
-
|
|
13340
|
-
|
|
13341
|
-
|
|
12631
|
+
for (const particle of query) {
|
|
12632
|
+
const pos = particle.getPosition(),
|
|
12633
|
+
pointDistance = getDistance(pos, mousePos);
|
|
13342
12634
|
|
|
13343
|
-
|
|
12635
|
+
if (pointDistance > distance) {
|
|
12636
|
+
continue;
|
|
13344
12637
|
}
|
|
13345
|
-
});
|
|
13346
|
-
}
|
|
13347
12638
|
|
|
13348
|
-
|
|
13349
|
-
|
|
13350
|
-
|
|
13351
|
-
function adopt(value) {
|
|
13352
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
13353
|
-
resolve(value);
|
|
13354
|
-
});
|
|
13355
|
-
}
|
|
12639
|
+
const grabLineOptions = interactivity.modes.grab.links,
|
|
12640
|
+
lineOpacity = grabLineOptions.opacity,
|
|
12641
|
+
opacityLine = lineOpacity - pointDistance * lineOpacity / distance;
|
|
13356
12642
|
|
|
13357
|
-
|
|
13358
|
-
|
|
13359
|
-
try {
|
|
13360
|
-
step(generator.next(value));
|
|
13361
|
-
} catch (e) {
|
|
13362
|
-
reject(e);
|
|
13363
|
-
}
|
|
13364
|
-
}
|
|
13365
|
-
|
|
13366
|
-
function rejected(value) {
|
|
13367
|
-
try {
|
|
13368
|
-
step(generator["throw"](value));
|
|
13369
|
-
} catch (e) {
|
|
13370
|
-
reject(e);
|
|
12643
|
+
if (opacityLine <= 0) {
|
|
12644
|
+
continue;
|
|
13371
12645
|
}
|
|
13372
|
-
}
|
|
13373
|
-
|
|
13374
|
-
function step(result) {
|
|
13375
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
13376
|
-
}
|
|
13377
12646
|
|
|
13378
|
-
|
|
13379
|
-
});
|
|
13380
|
-
};
|
|
12647
|
+
const optColor = (_a = grabLineOptions.color) !== null && _a !== void 0 ? _a : particle.options.links.color;
|
|
13381
12648
|
|
|
13382
|
-
|
|
13383
|
-
|
|
13384
|
-
|
|
13385
|
-
yield engine.addInteractor("externalGrab", container => new Grabber(container));
|
|
13386
|
-
});
|
|
13387
|
-
}
|
|
13388
|
-
;// CONCATENATED MODULE: ../../interactions/external/pause/dist/Pauser.js
|
|
13389
|
-
var Pauser_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
13390
|
-
function adopt(value) {
|
|
13391
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
13392
|
-
resolve(value);
|
|
13393
|
-
});
|
|
13394
|
-
}
|
|
13395
|
-
|
|
13396
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
13397
|
-
function fulfilled(value) {
|
|
13398
|
-
try {
|
|
13399
|
-
step(generator.next(value));
|
|
13400
|
-
} catch (e) {
|
|
13401
|
-
reject(e);
|
|
12649
|
+
if (!container.particles.grabLineColor) {
|
|
12650
|
+
const linksOptions = options.interactivity.modes.grab.links;
|
|
12651
|
+
container.particles.grabLineColor = getLinkRandomColor(optColor, linksOptions.blink, linksOptions.consent);
|
|
13402
12652
|
}
|
|
13403
|
-
}
|
|
13404
12653
|
|
|
13405
|
-
|
|
13406
|
-
|
|
13407
|
-
|
|
13408
|
-
|
|
13409
|
-
reject(e);
|
|
12654
|
+
const colorLine = getLinkColor(particle, undefined, container.particles.grabLineColor);
|
|
12655
|
+
|
|
12656
|
+
if (!colorLine) {
|
|
12657
|
+
return;
|
|
13410
12658
|
}
|
|
13411
|
-
}
|
|
13412
12659
|
|
|
13413
|
-
|
|
13414
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
12660
|
+
container.canvas.drawGrabLine(particle, colorLine, opacityLine, mousePos);
|
|
13415
12661
|
}
|
|
12662
|
+
}
|
|
13416
12663
|
|
|
13417
|
-
|
|
13418
|
-
|
|
13419
|
-
};
|
|
12664
|
+
}
|
|
12665
|
+
;// CONCATENATED MODULE: ../../interactions/external/grab/dist/esm/index.js
|
|
13420
12666
|
|
|
12667
|
+
async function loadExternalGrabInteraction(engine) {
|
|
12668
|
+
await engine.addInteractor("externalGrab", container => new Grabber(container));
|
|
12669
|
+
}
|
|
12670
|
+
;// CONCATENATED MODULE: ../../interactions/external/pause/dist/esm/Pauser.js
|
|
13421
12671
|
|
|
13422
12672
|
class Pauser extends ExternalInteractorBase {
|
|
13423
12673
|
constructor(container) {
|
|
@@ -13444,49 +12694,15 @@ class Pauser extends ExternalInteractorBase {
|
|
|
13444
12694
|
|
|
13445
12695
|
reset() {}
|
|
13446
12696
|
|
|
13447
|
-
interact() {
|
|
13448
|
-
return Pauser_awaiter(this, void 0, void 0, function* () {});
|
|
13449
|
-
}
|
|
12697
|
+
async interact() {}
|
|
13450
12698
|
|
|
13451
12699
|
}
|
|
13452
|
-
;// CONCATENATED MODULE: ../../interactions/external/pause/dist/index.js
|
|
12700
|
+
;// CONCATENATED MODULE: ../../interactions/external/pause/dist/esm/index.js
|
|
13453
12701
|
|
|
13454
12702
|
function loadExternalPauseInteraction(engine) {
|
|
13455
12703
|
engine.addInteractor("externalPause", container => new Pauser(container));
|
|
13456
12704
|
}
|
|
13457
|
-
;// CONCATENATED MODULE: ../../interactions/external/push/dist/Pusher.js
|
|
13458
|
-
var Pusher_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
13459
|
-
function adopt(value) {
|
|
13460
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
13461
|
-
resolve(value);
|
|
13462
|
-
});
|
|
13463
|
-
}
|
|
13464
|
-
|
|
13465
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
13466
|
-
function fulfilled(value) {
|
|
13467
|
-
try {
|
|
13468
|
-
step(generator.next(value));
|
|
13469
|
-
} catch (e) {
|
|
13470
|
-
reject(e);
|
|
13471
|
-
}
|
|
13472
|
-
}
|
|
13473
|
-
|
|
13474
|
-
function rejected(value) {
|
|
13475
|
-
try {
|
|
13476
|
-
step(generator["throw"](value));
|
|
13477
|
-
} catch (e) {
|
|
13478
|
-
reject(e);
|
|
13479
|
-
}
|
|
13480
|
-
}
|
|
13481
|
-
|
|
13482
|
-
function step(result) {
|
|
13483
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
13484
|
-
}
|
|
13485
|
-
|
|
13486
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
13487
|
-
});
|
|
13488
|
-
};
|
|
13489
|
-
|
|
12705
|
+
;// CONCATENATED MODULE: ../../interactions/external/push/dist/esm/Pusher.js
|
|
13490
12706
|
|
|
13491
12707
|
|
|
13492
12708
|
class Pusher extends ExternalInteractorBase {
|
|
@@ -13519,83 +12735,15 @@ class Pusher extends ExternalInteractorBase {
|
|
|
13519
12735
|
|
|
13520
12736
|
reset() {}
|
|
13521
12737
|
|
|
13522
|
-
interact() {
|
|
13523
|
-
return Pusher_awaiter(this, void 0, void 0, function* () {});
|
|
13524
|
-
}
|
|
12738
|
+
async interact() {}
|
|
13525
12739
|
|
|
13526
12740
|
}
|
|
13527
|
-
;// CONCATENATED MODULE: ../../interactions/external/push/dist/index.js
|
|
13528
|
-
var push_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
13529
|
-
function adopt(value) {
|
|
13530
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
13531
|
-
resolve(value);
|
|
13532
|
-
});
|
|
13533
|
-
}
|
|
13534
|
-
|
|
13535
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
13536
|
-
function fulfilled(value) {
|
|
13537
|
-
try {
|
|
13538
|
-
step(generator.next(value));
|
|
13539
|
-
} catch (e) {
|
|
13540
|
-
reject(e);
|
|
13541
|
-
}
|
|
13542
|
-
}
|
|
12741
|
+
;// CONCATENATED MODULE: ../../interactions/external/push/dist/esm/index.js
|
|
13543
12742
|
|
|
13544
|
-
|
|
13545
|
-
|
|
13546
|
-
step(generator["throw"](value));
|
|
13547
|
-
} catch (e) {
|
|
13548
|
-
reject(e);
|
|
13549
|
-
}
|
|
13550
|
-
}
|
|
13551
|
-
|
|
13552
|
-
function step(result) {
|
|
13553
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
13554
|
-
}
|
|
13555
|
-
|
|
13556
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
13557
|
-
});
|
|
13558
|
-
};
|
|
13559
|
-
|
|
13560
|
-
|
|
13561
|
-
function loadExternalPushInteraction(engine) {
|
|
13562
|
-
return push_dist_awaiter(this, void 0, void 0, function* () {
|
|
13563
|
-
yield engine.addInteractor("externalPush", container => new Pusher(container));
|
|
13564
|
-
});
|
|
12743
|
+
async function loadExternalPushInteraction(engine) {
|
|
12744
|
+
await engine.addInteractor("externalPush", container => new Pusher(container));
|
|
13565
12745
|
}
|
|
13566
|
-
;// CONCATENATED MODULE: ../../interactions/external/remove/dist/Remover.js
|
|
13567
|
-
var Remover_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
13568
|
-
function adopt(value) {
|
|
13569
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
13570
|
-
resolve(value);
|
|
13571
|
-
});
|
|
13572
|
-
}
|
|
13573
|
-
|
|
13574
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
13575
|
-
function fulfilled(value) {
|
|
13576
|
-
try {
|
|
13577
|
-
step(generator.next(value));
|
|
13578
|
-
} catch (e) {
|
|
13579
|
-
reject(e);
|
|
13580
|
-
}
|
|
13581
|
-
}
|
|
13582
|
-
|
|
13583
|
-
function rejected(value) {
|
|
13584
|
-
try {
|
|
13585
|
-
step(generator["throw"](value));
|
|
13586
|
-
} catch (e) {
|
|
13587
|
-
reject(e);
|
|
13588
|
-
}
|
|
13589
|
-
}
|
|
13590
|
-
|
|
13591
|
-
function step(result) {
|
|
13592
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
13593
|
-
}
|
|
13594
|
-
|
|
13595
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
13596
|
-
});
|
|
13597
|
-
};
|
|
13598
|
-
|
|
12746
|
+
;// CONCATENATED MODULE: ../../interactions/external/remove/dist/esm/Remover.js
|
|
13599
12747
|
|
|
13600
12748
|
class Remover extends ExternalInteractorBase {
|
|
13601
12749
|
constructor(container) {
|
|
@@ -13619,49 +12767,15 @@ class Remover extends ExternalInteractorBase {
|
|
|
13619
12767
|
|
|
13620
12768
|
reset() {}
|
|
13621
12769
|
|
|
13622
|
-
interact() {
|
|
13623
|
-
return Remover_awaiter(this, void 0, void 0, function* () {});
|
|
13624
|
-
}
|
|
12770
|
+
async interact() {}
|
|
13625
12771
|
|
|
13626
12772
|
}
|
|
13627
|
-
;// CONCATENATED MODULE: ../../interactions/external/remove/dist/index.js
|
|
12773
|
+
;// CONCATENATED MODULE: ../../interactions/external/remove/dist/esm/index.js
|
|
13628
12774
|
|
|
13629
12775
|
function loadExternalRemoveInteraction(engine) {
|
|
13630
12776
|
engine.addInteractor("externalRemove", container => new Remover(container));
|
|
13631
12777
|
}
|
|
13632
|
-
;// CONCATENATED MODULE: ../../interactions/external/repulse/dist/Repulser.js
|
|
13633
|
-
var Repulser_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
13634
|
-
function adopt(value) {
|
|
13635
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
13636
|
-
resolve(value);
|
|
13637
|
-
});
|
|
13638
|
-
}
|
|
13639
|
-
|
|
13640
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
13641
|
-
function fulfilled(value) {
|
|
13642
|
-
try {
|
|
13643
|
-
step(generator.next(value));
|
|
13644
|
-
} catch (e) {
|
|
13645
|
-
reject(e);
|
|
13646
|
-
}
|
|
13647
|
-
}
|
|
13648
|
-
|
|
13649
|
-
function rejected(value) {
|
|
13650
|
-
try {
|
|
13651
|
-
step(generator["throw"](value));
|
|
13652
|
-
} catch (e) {
|
|
13653
|
-
reject(e);
|
|
13654
|
-
}
|
|
13655
|
-
}
|
|
13656
|
-
|
|
13657
|
-
function step(result) {
|
|
13658
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
13659
|
-
}
|
|
13660
|
-
|
|
13661
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
13662
|
-
});
|
|
13663
|
-
};
|
|
13664
|
-
|
|
12778
|
+
;// CONCATENATED MODULE: ../../interactions/external/repulse/dist/esm/Repulser.js
|
|
13665
12779
|
|
|
13666
12780
|
class Repulser extends ExternalInteractorBase {
|
|
13667
12781
|
constructor(container) {
|
|
@@ -13728,26 +12842,24 @@ class Repulser extends ExternalInteractorBase {
|
|
|
13728
12842
|
|
|
13729
12843
|
reset() {}
|
|
13730
12844
|
|
|
13731
|
-
interact() {
|
|
13732
|
-
|
|
13733
|
-
|
|
13734
|
-
|
|
13735
|
-
|
|
13736
|
-
|
|
13737
|
-
|
|
13738
|
-
|
|
13739
|
-
|
|
13740
|
-
|
|
13741
|
-
|
|
13742
|
-
|
|
13743
|
-
|
|
13744
|
-
|
|
13745
|
-
|
|
13746
|
-
|
|
13747
|
-
|
|
13748
|
-
|
|
13749
|
-
}
|
|
13750
|
-
});
|
|
12845
|
+
async interact() {
|
|
12846
|
+
const container = this.container,
|
|
12847
|
+
options = container.actualOptions,
|
|
12848
|
+
mouseMoveStatus = container.interactivity.status === mouseMoveEvent,
|
|
12849
|
+
events = options.interactivity.events,
|
|
12850
|
+
hoverEnabled = events.onHover.enable,
|
|
12851
|
+
hoverMode = events.onHover.mode,
|
|
12852
|
+
clickEnabled = events.onClick.enable,
|
|
12853
|
+
clickMode = events.onClick.mode,
|
|
12854
|
+
divs = events.onDiv;
|
|
12855
|
+
|
|
12856
|
+
if (mouseMoveStatus && hoverEnabled && isInArray("repulse", hoverMode)) {
|
|
12857
|
+
this.hoverRepulse();
|
|
12858
|
+
} else if (clickEnabled && isInArray("repulse", clickMode)) {
|
|
12859
|
+
this.clickRepulse();
|
|
12860
|
+
} else {
|
|
12861
|
+
divModeExecute("repulse", divs, (selector, div) => this.singleSelectorRepulse(selector, div));
|
|
12862
|
+
}
|
|
13751
12863
|
}
|
|
13752
12864
|
|
|
13753
12865
|
singleSelectorRepulse(selector, div) {
|
|
@@ -13844,99 +12956,33 @@ class Repulser extends ExternalInteractorBase {
|
|
|
13844
12956
|
dy,
|
|
13845
12957
|
distance
|
|
13846
12958
|
} = getDistances(mouseClickPos, particle.position),
|
|
13847
|
-
d =
|
|
12959
|
+
d = distance ** 2,
|
|
13848
12960
|
velocity = container.actualOptions.interactivity.modes.repulse.speed,
|
|
13849
12961
|
force = -repulseRadius * velocity / d;
|
|
13850
12962
|
|
|
13851
|
-
if (d <= repulseRadius) {
|
|
13852
|
-
container.repulse.particles.push(particle);
|
|
13853
|
-
const vect = Vector.create(dx, dy);
|
|
13854
|
-
vect.length = force;
|
|
13855
|
-
particle.velocity.setTo(vect);
|
|
13856
|
-
}
|
|
13857
|
-
}
|
|
13858
|
-
} else if (container.repulse.clicking === false) {
|
|
13859
|
-
for (const particle of container.repulse.particles) {
|
|
13860
|
-
particle.velocity.setTo(particle.initialVelocity);
|
|
13861
|
-
}
|
|
13862
|
-
|
|
13863
|
-
container.repulse.particles = [];
|
|
13864
|
-
}
|
|
13865
|
-
}
|
|
13866
|
-
|
|
13867
|
-
}
|
|
13868
|
-
;// CONCATENATED MODULE: ../../interactions/external/repulse/dist/index.js
|
|
13869
|
-
var repulse_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
13870
|
-
function adopt(value) {
|
|
13871
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
13872
|
-
resolve(value);
|
|
13873
|
-
});
|
|
13874
|
-
}
|
|
13875
|
-
|
|
13876
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
13877
|
-
function fulfilled(value) {
|
|
13878
|
-
try {
|
|
13879
|
-
step(generator.next(value));
|
|
13880
|
-
} catch (e) {
|
|
13881
|
-
reject(e);
|
|
13882
|
-
}
|
|
13883
|
-
}
|
|
13884
|
-
|
|
13885
|
-
function rejected(value) {
|
|
13886
|
-
try {
|
|
13887
|
-
step(generator["throw"](value));
|
|
13888
|
-
} catch (e) {
|
|
13889
|
-
reject(e);
|
|
13890
|
-
}
|
|
13891
|
-
}
|
|
13892
|
-
|
|
13893
|
-
function step(result) {
|
|
13894
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
13895
|
-
}
|
|
13896
|
-
|
|
13897
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
13898
|
-
});
|
|
13899
|
-
};
|
|
13900
|
-
|
|
13901
|
-
|
|
13902
|
-
function loadExternalRepulseInteraction(engine) {
|
|
13903
|
-
return repulse_dist_awaiter(this, void 0, void 0, function* () {
|
|
13904
|
-
yield engine.addInteractor("externalRepulse", container => new Repulser(container));
|
|
13905
|
-
});
|
|
13906
|
-
}
|
|
13907
|
-
;// CONCATENATED MODULE: ../../shapes/image/dist/Utils.js
|
|
13908
|
-
var Utils_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
13909
|
-
function adopt(value) {
|
|
13910
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
13911
|
-
resolve(value);
|
|
13912
|
-
});
|
|
13913
|
-
}
|
|
13914
|
-
|
|
13915
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
13916
|
-
function fulfilled(value) {
|
|
13917
|
-
try {
|
|
13918
|
-
step(generator.next(value));
|
|
13919
|
-
} catch (e) {
|
|
13920
|
-
reject(e);
|
|
13921
|
-
}
|
|
13922
|
-
}
|
|
13923
|
-
|
|
13924
|
-
function rejected(value) {
|
|
13925
|
-
try {
|
|
13926
|
-
step(generator["throw"](value));
|
|
13927
|
-
} catch (e) {
|
|
13928
|
-
reject(e);
|
|
12963
|
+
if (d <= repulseRadius) {
|
|
12964
|
+
container.repulse.particles.push(particle);
|
|
12965
|
+
const vect = Vector.create(dx, dy);
|
|
12966
|
+
vect.length = force;
|
|
12967
|
+
particle.velocity.setTo(vect);
|
|
12968
|
+
}
|
|
12969
|
+
}
|
|
12970
|
+
} else if (container.repulse.clicking === false) {
|
|
12971
|
+
for (const particle of container.repulse.particles) {
|
|
12972
|
+
particle.velocity.setTo(particle.initialVelocity);
|
|
13929
12973
|
}
|
|
13930
|
-
}
|
|
13931
12974
|
|
|
13932
|
-
|
|
13933
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
12975
|
+
container.repulse.particles = [];
|
|
13934
12976
|
}
|
|
12977
|
+
}
|
|
13935
12978
|
|
|
13936
|
-
|
|
13937
|
-
|
|
13938
|
-
};
|
|
12979
|
+
}
|
|
12980
|
+
;// CONCATENATED MODULE: ../../interactions/external/repulse/dist/esm/index.js
|
|
13939
12981
|
|
|
12982
|
+
async function loadExternalRepulseInteraction(engine) {
|
|
12983
|
+
await engine.addInteractor("externalRepulse", container => new Repulser(container));
|
|
12984
|
+
}
|
|
12985
|
+
;// CONCATENATED MODULE: ../../shapes/image/dist/esm/Utils.js
|
|
13940
12986
|
|
|
13941
12987
|
const currentColorRegex = /(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d.]+%?\))|currentcolor/gi;
|
|
13942
12988
|
|
|
@@ -13959,46 +13005,42 @@ function replaceColorSvg(imageShape, color, opacity) {
|
|
|
13959
13005
|
return `${svgData.substring(0, preFillIndex)} fill="${colorStyle}"${svgData.substring(preFillIndex)}`;
|
|
13960
13006
|
}
|
|
13961
13007
|
|
|
13962
|
-
function loadImage(image) {
|
|
13963
|
-
return
|
|
13964
|
-
|
|
13965
|
-
|
|
13966
|
-
|
|
13967
|
-
|
|
13968
|
-
|
|
13969
|
-
|
|
13970
|
-
|
|
13971
|
-
|
|
13972
|
-
|
|
13973
|
-
|
|
13974
|
-
|
|
13975
|
-
|
|
13976
|
-
resolve();
|
|
13977
|
-
});
|
|
13978
|
-
img.src = image.source;
|
|
13008
|
+
async function loadImage(image) {
|
|
13009
|
+
return new Promise(resolve => {
|
|
13010
|
+
image.loading = true;
|
|
13011
|
+
const img = new Image();
|
|
13012
|
+
img.addEventListener("load", () => {
|
|
13013
|
+
image.element = img;
|
|
13014
|
+
image.loading = false;
|
|
13015
|
+
resolve();
|
|
13016
|
+
});
|
|
13017
|
+
img.addEventListener("error", () => {
|
|
13018
|
+
image.error = true;
|
|
13019
|
+
image.loading = false;
|
|
13020
|
+
console.error(`Error tsParticles - loading image: ${image.source}`);
|
|
13021
|
+
resolve();
|
|
13979
13022
|
});
|
|
13023
|
+
img.src = image.source;
|
|
13980
13024
|
});
|
|
13981
13025
|
}
|
|
13982
|
-
function downloadSvgImage(image) {
|
|
13983
|
-
|
|
13984
|
-
|
|
13985
|
-
|
|
13986
|
-
|
|
13987
|
-
}
|
|
13026
|
+
async function downloadSvgImage(image) {
|
|
13027
|
+
if (image.type !== "svg") {
|
|
13028
|
+
await loadImage(image);
|
|
13029
|
+
return;
|
|
13030
|
+
}
|
|
13988
13031
|
|
|
13989
|
-
|
|
13990
|
-
|
|
13991
|
-
|
|
13032
|
+
image.loading = true;
|
|
13033
|
+
const response = await fetch(image.source);
|
|
13034
|
+
image.loading = false;
|
|
13992
13035
|
|
|
13993
|
-
|
|
13994
|
-
|
|
13995
|
-
|
|
13996
|
-
|
|
13036
|
+
if (!response.ok) {
|
|
13037
|
+
console.error("Error tsParticles - Image not found");
|
|
13038
|
+
image.error = true;
|
|
13039
|
+
}
|
|
13997
13040
|
|
|
13998
|
-
|
|
13999
|
-
|
|
14000
|
-
|
|
14001
|
-
});
|
|
13041
|
+
if (!image.error) {
|
|
13042
|
+
image.svgData = await response.text();
|
|
13043
|
+
}
|
|
14002
13044
|
}
|
|
14003
13045
|
function replaceImageColor(image, imageData, color, particle) {
|
|
14004
13046
|
var _a, _b, _c;
|
|
@@ -14046,39 +13088,7 @@ function replaceImageColor(image, imageData, color, particle) {
|
|
|
14046
13088
|
img.src = url;
|
|
14047
13089
|
return imageRes;
|
|
14048
13090
|
}
|
|
14049
|
-
;// CONCATENATED MODULE: ../../shapes/image/dist/ImageDrawer.js
|
|
14050
|
-
var ImageDrawer_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
14051
|
-
function adopt(value) {
|
|
14052
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
14053
|
-
resolve(value);
|
|
14054
|
-
});
|
|
14055
|
-
}
|
|
14056
|
-
|
|
14057
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
14058
|
-
function fulfilled(value) {
|
|
14059
|
-
try {
|
|
14060
|
-
step(generator.next(value));
|
|
14061
|
-
} catch (e) {
|
|
14062
|
-
reject(e);
|
|
14063
|
-
}
|
|
14064
|
-
}
|
|
14065
|
-
|
|
14066
|
-
function rejected(value) {
|
|
14067
|
-
try {
|
|
14068
|
-
step(generator["throw"](value));
|
|
14069
|
-
} catch (e) {
|
|
14070
|
-
reject(e);
|
|
14071
|
-
}
|
|
14072
|
-
}
|
|
14073
|
-
|
|
14074
|
-
function step(result) {
|
|
14075
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
14076
|
-
}
|
|
14077
|
-
|
|
14078
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
14079
|
-
});
|
|
14080
|
-
};
|
|
14081
|
-
|
|
13091
|
+
;// CONCATENATED MODULE: ../../shapes/image/dist/esm/ImageDrawer.js
|
|
14082
13092
|
var ImageDrawer_classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function (receiver, state, value, kind, f) {
|
|
14083
13093
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
14084
13094
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
@@ -14210,74 +13220,38 @@ class ImageDrawer {
|
|
|
14210
13220
|
particle.close = imageShape.close;
|
|
14211
13221
|
}
|
|
14212
13222
|
|
|
14213
|
-
loadImageShape(container, imageShape) {
|
|
14214
|
-
|
|
14215
|
-
const source = imageShape.src;
|
|
13223
|
+
async loadImageShape(container, imageShape) {
|
|
13224
|
+
const source = imageShape.src;
|
|
14216
13225
|
|
|
14217
|
-
|
|
14218
|
-
|
|
14219
|
-
|
|
13226
|
+
if (!source) {
|
|
13227
|
+
throw new Error("Error tsParticles - No image.src");
|
|
13228
|
+
}
|
|
14220
13229
|
|
|
14221
|
-
|
|
14222
|
-
|
|
14223
|
-
|
|
14224
|
-
|
|
14225
|
-
|
|
14226
|
-
|
|
14227
|
-
|
|
14228
|
-
|
|
14229
|
-
|
|
14230
|
-
|
|
14231
|
-
|
|
14232
|
-
|
|
14233
|
-
|
|
14234
|
-
});
|
|
13230
|
+
try {
|
|
13231
|
+
const image = {
|
|
13232
|
+
source: source,
|
|
13233
|
+
type: source.substr(source.length - 3),
|
|
13234
|
+
error: false,
|
|
13235
|
+
loading: true
|
|
13236
|
+
};
|
|
13237
|
+
this.addImage(container, image);
|
|
13238
|
+
const imageFunc = imageShape.replaceColor ? downloadSvgImage : loadImage;
|
|
13239
|
+
await imageFunc(image);
|
|
13240
|
+
} catch (_a) {
|
|
13241
|
+
throw new Error(`tsParticles error - ${imageShape.src} not found`);
|
|
13242
|
+
}
|
|
14235
13243
|
}
|
|
14236
13244
|
|
|
14237
13245
|
}
|
|
14238
13246
|
_ImageDrawer_images = new WeakMap();
|
|
14239
|
-
;// CONCATENATED MODULE: ../../shapes/image/dist/index.js
|
|
14240
|
-
var image_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
14241
|
-
function adopt(value) {
|
|
14242
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
14243
|
-
resolve(value);
|
|
14244
|
-
});
|
|
14245
|
-
}
|
|
14246
|
-
|
|
14247
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
14248
|
-
function fulfilled(value) {
|
|
14249
|
-
try {
|
|
14250
|
-
step(generator.next(value));
|
|
14251
|
-
} catch (e) {
|
|
14252
|
-
reject(e);
|
|
14253
|
-
}
|
|
14254
|
-
}
|
|
14255
|
-
|
|
14256
|
-
function rejected(value) {
|
|
14257
|
-
try {
|
|
14258
|
-
step(generator["throw"](value));
|
|
14259
|
-
} catch (e) {
|
|
14260
|
-
reject(e);
|
|
14261
|
-
}
|
|
14262
|
-
}
|
|
14263
|
-
|
|
14264
|
-
function step(result) {
|
|
14265
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
14266
|
-
}
|
|
14267
|
-
|
|
14268
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
14269
|
-
});
|
|
14270
|
-
};
|
|
13247
|
+
;// CONCATENATED MODULE: ../../shapes/image/dist/esm/index.js
|
|
14271
13248
|
|
|
14272
|
-
|
|
14273
|
-
|
|
14274
|
-
|
|
14275
|
-
|
|
14276
|
-
yield engine.addShape("image", imageDrawer);
|
|
14277
|
-
yield engine.addShape("images", imageDrawer);
|
|
14278
|
-
});
|
|
13249
|
+
async function loadImageShape(engine) {
|
|
13250
|
+
const imageDrawer = new ImageDrawer();
|
|
13251
|
+
await engine.addShape("image", imageDrawer);
|
|
13252
|
+
await engine.addShape("images", imageDrawer);
|
|
14279
13253
|
}
|
|
14280
|
-
;// CONCATENATED MODULE: ../../updaters/life/dist/LifeUpdater.js
|
|
13254
|
+
;// CONCATENATED MODULE: ../../updaters/life/dist/esm/LifeUpdater.js
|
|
14281
13255
|
|
|
14282
13256
|
class LifeUpdater {
|
|
14283
13257
|
constructor(container) {
|
|
@@ -14355,46 +13329,12 @@ class LifeUpdater {
|
|
|
14355
13329
|
}
|
|
14356
13330
|
|
|
14357
13331
|
}
|
|
14358
|
-
;// CONCATENATED MODULE: ../../updaters/life/dist/index.js
|
|
14359
|
-
var life_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
14360
|
-
function adopt(value) {
|
|
14361
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
14362
|
-
resolve(value);
|
|
14363
|
-
});
|
|
14364
|
-
}
|
|
14365
|
-
|
|
14366
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
14367
|
-
function fulfilled(value) {
|
|
14368
|
-
try {
|
|
14369
|
-
step(generator.next(value));
|
|
14370
|
-
} catch (e) {
|
|
14371
|
-
reject(e);
|
|
14372
|
-
}
|
|
14373
|
-
}
|
|
14374
|
-
|
|
14375
|
-
function rejected(value) {
|
|
14376
|
-
try {
|
|
14377
|
-
step(generator["throw"](value));
|
|
14378
|
-
} catch (e) {
|
|
14379
|
-
reject(e);
|
|
14380
|
-
}
|
|
14381
|
-
}
|
|
13332
|
+
;// CONCATENATED MODULE: ../../updaters/life/dist/esm/index.js
|
|
14382
13333
|
|
|
14383
|
-
|
|
14384
|
-
|
|
14385
|
-
}
|
|
14386
|
-
|
|
14387
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
14388
|
-
});
|
|
14389
|
-
};
|
|
14390
|
-
|
|
14391
|
-
|
|
14392
|
-
function loadLifeUpdater(engine) {
|
|
14393
|
-
return life_dist_awaiter(this, void 0, void 0, function* () {
|
|
14394
|
-
yield engine.addParticleUpdater("life", container => new LifeUpdater(container));
|
|
14395
|
-
});
|
|
13334
|
+
async function loadLifeUpdater(engine) {
|
|
13335
|
+
await engine.addParticleUpdater("life", container => new LifeUpdater(container));
|
|
14396
13336
|
}
|
|
14397
|
-
;// CONCATENATED MODULE: ../../shapes/line/dist/LineDrawer.js
|
|
13337
|
+
;// CONCATENATED MODULE: ../../shapes/line/dist/esm/LineDrawer.js
|
|
14398
13338
|
class LineDrawer {
|
|
14399
13339
|
getSidesCount() {
|
|
14400
13340
|
return 1;
|
|
@@ -14406,46 +13346,12 @@ class LineDrawer {
|
|
|
14406
13346
|
}
|
|
14407
13347
|
|
|
14408
13348
|
}
|
|
14409
|
-
;// CONCATENATED MODULE: ../../shapes/line/dist/index.js
|
|
14410
|
-
var line_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
14411
|
-
function adopt(value) {
|
|
14412
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
14413
|
-
resolve(value);
|
|
14414
|
-
});
|
|
14415
|
-
}
|
|
14416
|
-
|
|
14417
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
14418
|
-
function fulfilled(value) {
|
|
14419
|
-
try {
|
|
14420
|
-
step(generator.next(value));
|
|
14421
|
-
} catch (e) {
|
|
14422
|
-
reject(e);
|
|
14423
|
-
}
|
|
14424
|
-
}
|
|
14425
|
-
|
|
14426
|
-
function rejected(value) {
|
|
14427
|
-
try {
|
|
14428
|
-
step(generator["throw"](value));
|
|
14429
|
-
} catch (e) {
|
|
14430
|
-
reject(e);
|
|
14431
|
-
}
|
|
14432
|
-
}
|
|
14433
|
-
|
|
14434
|
-
function step(result) {
|
|
14435
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
14436
|
-
}
|
|
14437
|
-
|
|
14438
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
14439
|
-
});
|
|
14440
|
-
};
|
|
13349
|
+
;// CONCATENATED MODULE: ../../shapes/line/dist/esm/index.js
|
|
14441
13350
|
|
|
14442
|
-
|
|
14443
|
-
|
|
14444
|
-
return line_dist_awaiter(this, void 0, void 0, function* () {
|
|
14445
|
-
yield engine.addShape("line", new LineDrawer());
|
|
14446
|
-
});
|
|
13351
|
+
async function loadLineShape(engine) {
|
|
13352
|
+
await engine.addShape("line", new LineDrawer());
|
|
14447
13353
|
}
|
|
14448
|
-
;// CONCATENATED MODULE: ../../updaters/opacity/dist/OpacityUpdater.js
|
|
13354
|
+
;// CONCATENATED MODULE: ../../updaters/opacity/dist/esm/OpacityUpdater.js
|
|
14449
13355
|
|
|
14450
13356
|
|
|
14451
13357
|
function checkDestroy(particle, value, minValue, maxValue) {
|
|
@@ -14583,46 +13489,12 @@ class OpacityUpdater {
|
|
|
14583
13489
|
}
|
|
14584
13490
|
|
|
14585
13491
|
}
|
|
14586
|
-
;// CONCATENATED MODULE: ../../updaters/opacity/dist/index.js
|
|
14587
|
-
var opacity_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
14588
|
-
function adopt(value) {
|
|
14589
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
14590
|
-
resolve(value);
|
|
14591
|
-
});
|
|
14592
|
-
}
|
|
14593
|
-
|
|
14594
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
14595
|
-
function fulfilled(value) {
|
|
14596
|
-
try {
|
|
14597
|
-
step(generator.next(value));
|
|
14598
|
-
} catch (e) {
|
|
14599
|
-
reject(e);
|
|
14600
|
-
}
|
|
14601
|
-
}
|
|
14602
|
-
|
|
14603
|
-
function rejected(value) {
|
|
14604
|
-
try {
|
|
14605
|
-
step(generator["throw"](value));
|
|
14606
|
-
} catch (e) {
|
|
14607
|
-
reject(e);
|
|
14608
|
-
}
|
|
14609
|
-
}
|
|
14610
|
-
|
|
14611
|
-
function step(result) {
|
|
14612
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
14613
|
-
}
|
|
13492
|
+
;// CONCATENATED MODULE: ../../updaters/opacity/dist/esm/index.js
|
|
14614
13493
|
|
|
14615
|
-
|
|
14616
|
-
|
|
14617
|
-
};
|
|
14618
|
-
|
|
14619
|
-
|
|
14620
|
-
function loadOpacityUpdater(engine) {
|
|
14621
|
-
return opacity_dist_awaiter(this, void 0, void 0, function* () {
|
|
14622
|
-
yield engine.addParticleUpdater("opacity", container => new OpacityUpdater(container));
|
|
14623
|
-
});
|
|
13494
|
+
async function loadOpacityUpdater(engine) {
|
|
13495
|
+
await engine.addParticleUpdater("opacity", container => new OpacityUpdater(container));
|
|
14624
13496
|
}
|
|
14625
|
-
;// CONCATENATED MODULE: ../../updaters/outModes/dist/Utils.js
|
|
13497
|
+
;// CONCATENATED MODULE: ../../updaters/outModes/dist/esm/Utils.js
|
|
14626
13498
|
|
|
14627
13499
|
function bounceHorizontal(data) {
|
|
14628
13500
|
if (!(data.outMode === "bounce" || data.outMode === "bounce-horizontal" || data.outMode === "bounceHorizontal" || data.outMode === "split")) {
|
|
@@ -14682,7 +13554,7 @@ function bounceVertical(data) {
|
|
|
14682
13554
|
}
|
|
14683
13555
|
}
|
|
14684
13556
|
}
|
|
14685
|
-
;// CONCATENATED MODULE: ../../updaters/outModes/dist/BounceOutMode.js
|
|
13557
|
+
;// CONCATENATED MODULE: ../../updaters/outModes/dist/esm/BounceOutMode.js
|
|
14686
13558
|
|
|
14687
13559
|
|
|
14688
13560
|
class BounceOutMode {
|
|
@@ -14739,7 +13611,7 @@ class BounceOutMode {
|
|
|
14739
13611
|
}
|
|
14740
13612
|
|
|
14741
13613
|
}
|
|
14742
|
-
;// CONCATENATED MODULE: ../../updaters/outModes/dist/DestroyOutMode.js
|
|
13614
|
+
;// CONCATENATED MODULE: ../../updaters/outModes/dist/esm/DestroyOutMode.js
|
|
14743
13615
|
|
|
14744
13616
|
class DestroyOutMode {
|
|
14745
13617
|
constructor(container) {
|
|
@@ -14786,7 +13658,7 @@ class DestroyOutMode {
|
|
|
14786
13658
|
}
|
|
14787
13659
|
|
|
14788
13660
|
}
|
|
14789
|
-
;// CONCATENATED MODULE: ../../updaters/outModes/dist/NoneOutMode.js
|
|
13661
|
+
;// CONCATENATED MODULE: ../../updaters/outModes/dist/esm/NoneOutMode.js
|
|
14790
13662
|
|
|
14791
13663
|
class NoneOutMode {
|
|
14792
13664
|
constructor(container) {
|
|
@@ -14826,7 +13698,7 @@ class NoneOutMode {
|
|
|
14826
13698
|
}
|
|
14827
13699
|
|
|
14828
13700
|
}
|
|
14829
|
-
;// CONCATENATED MODULE: ../../updaters/outModes/dist/OutOutMode.js
|
|
13701
|
+
;// CONCATENATED MODULE: ../../updaters/outModes/dist/esm/OutOutMode.js
|
|
14830
13702
|
|
|
14831
13703
|
class OutOutMode {
|
|
14832
13704
|
constructor(container) {
|
|
@@ -14967,7 +13839,7 @@ class OutOutMode {
|
|
|
14967
13839
|
}
|
|
14968
13840
|
|
|
14969
13841
|
}
|
|
14970
|
-
;// CONCATENATED MODULE: ../../updaters/outModes/dist/OutOfCanvasUpdater.js
|
|
13842
|
+
;// CONCATENATED MODULE: ../../updaters/outModes/dist/esm/OutOfCanvasUpdater.js
|
|
14971
13843
|
|
|
14972
13844
|
|
|
14973
13845
|
|
|
@@ -15001,46 +13873,12 @@ class OutOfCanvasUpdater {
|
|
|
15001
13873
|
}
|
|
15002
13874
|
|
|
15003
13875
|
}
|
|
15004
|
-
;// CONCATENATED MODULE: ../../updaters/outModes/dist/index.js
|
|
15005
|
-
var outModes_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
15006
|
-
function adopt(value) {
|
|
15007
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
15008
|
-
resolve(value);
|
|
15009
|
-
});
|
|
15010
|
-
}
|
|
15011
|
-
|
|
15012
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15013
|
-
function fulfilled(value) {
|
|
15014
|
-
try {
|
|
15015
|
-
step(generator.next(value));
|
|
15016
|
-
} catch (e) {
|
|
15017
|
-
reject(e);
|
|
15018
|
-
}
|
|
15019
|
-
}
|
|
15020
|
-
|
|
15021
|
-
function rejected(value) {
|
|
15022
|
-
try {
|
|
15023
|
-
step(generator["throw"](value));
|
|
15024
|
-
} catch (e) {
|
|
15025
|
-
reject(e);
|
|
15026
|
-
}
|
|
15027
|
-
}
|
|
15028
|
-
|
|
15029
|
-
function step(result) {
|
|
15030
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
15031
|
-
}
|
|
15032
|
-
|
|
15033
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
15034
|
-
});
|
|
15035
|
-
};
|
|
13876
|
+
;// CONCATENATED MODULE: ../../updaters/outModes/dist/esm/index.js
|
|
15036
13877
|
|
|
15037
|
-
|
|
15038
|
-
|
|
15039
|
-
return outModes_dist_awaiter(this, void 0, void 0, function* () {
|
|
15040
|
-
yield engine.addParticleUpdater("outModes", container => new OutOfCanvasUpdater(container));
|
|
15041
|
-
});
|
|
13878
|
+
async function loadOutModesUpdater(engine) {
|
|
13879
|
+
await engine.addParticleUpdater("outModes", container => new OutOfCanvasUpdater(container));
|
|
15042
13880
|
}
|
|
15043
|
-
;// CONCATENATED MODULE: ../../move/parallax/dist/ParallaxMover.js
|
|
13881
|
+
;// CONCATENATED MODULE: ../../move/parallax/dist/esm/ParallaxMover.js
|
|
15044
13882
|
|
|
15045
13883
|
class ParallaxMover {
|
|
15046
13884
|
init() {}
|
|
@@ -15079,114 +13917,46 @@ class ParallaxMover {
|
|
|
15079
13917
|
}
|
|
15080
13918
|
|
|
15081
13919
|
}
|
|
15082
|
-
;// CONCATENATED MODULE: ../../move/parallax/dist/index.js
|
|
15083
|
-
var parallax_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
15084
|
-
function adopt(value) {
|
|
15085
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
15086
|
-
resolve(value);
|
|
15087
|
-
});
|
|
15088
|
-
}
|
|
15089
|
-
|
|
15090
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15091
|
-
function fulfilled(value) {
|
|
15092
|
-
try {
|
|
15093
|
-
step(generator.next(value));
|
|
15094
|
-
} catch (e) {
|
|
15095
|
-
reject(e);
|
|
15096
|
-
}
|
|
15097
|
-
}
|
|
15098
|
-
|
|
15099
|
-
function rejected(value) {
|
|
15100
|
-
try {
|
|
15101
|
-
step(generator["throw"](value));
|
|
15102
|
-
} catch (e) {
|
|
15103
|
-
reject(e);
|
|
15104
|
-
}
|
|
15105
|
-
}
|
|
15106
|
-
|
|
15107
|
-
function step(result) {
|
|
15108
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
15109
|
-
}
|
|
15110
|
-
|
|
15111
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
15112
|
-
});
|
|
15113
|
-
};
|
|
15114
|
-
|
|
13920
|
+
;// CONCATENATED MODULE: ../../move/parallax/dist/esm/index.js
|
|
15115
13921
|
|
|
15116
|
-
function loadParallaxMover(engine) {
|
|
15117
|
-
|
|
15118
|
-
engine.addMover("parallax", () => new ParallaxMover());
|
|
15119
|
-
});
|
|
13922
|
+
async function loadParallaxMover(engine) {
|
|
13923
|
+
engine.addMover("parallax", () => new ParallaxMover());
|
|
15120
13924
|
}
|
|
15121
|
-
;// CONCATENATED MODULE: ../../interactions/particles/attract/dist/Attractor.js
|
|
15122
|
-
var dist_Attractor_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
15123
|
-
function adopt(value) {
|
|
15124
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
15125
|
-
resolve(value);
|
|
15126
|
-
});
|
|
15127
|
-
}
|
|
15128
|
-
|
|
15129
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15130
|
-
function fulfilled(value) {
|
|
15131
|
-
try {
|
|
15132
|
-
step(generator.next(value));
|
|
15133
|
-
} catch (e) {
|
|
15134
|
-
reject(e);
|
|
15135
|
-
}
|
|
15136
|
-
}
|
|
15137
|
-
|
|
15138
|
-
function rejected(value) {
|
|
15139
|
-
try {
|
|
15140
|
-
step(generator["throw"](value));
|
|
15141
|
-
} catch (e) {
|
|
15142
|
-
reject(e);
|
|
15143
|
-
}
|
|
15144
|
-
}
|
|
15145
|
-
|
|
15146
|
-
function step(result) {
|
|
15147
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
15148
|
-
}
|
|
15149
|
-
|
|
15150
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
15151
|
-
});
|
|
15152
|
-
};
|
|
15153
|
-
|
|
13925
|
+
;// CONCATENATED MODULE: ../../interactions/particles/attract/dist/esm/Attractor.js
|
|
15154
13926
|
|
|
15155
13927
|
class Attractor_Attractor extends ParticlesInteractorBase {
|
|
15156
13928
|
constructor(container) {
|
|
15157
13929
|
super(container);
|
|
15158
13930
|
}
|
|
15159
13931
|
|
|
15160
|
-
interact(p1) {
|
|
13932
|
+
async interact(p1) {
|
|
15161
13933
|
var _a;
|
|
15162
13934
|
|
|
15163
|
-
|
|
15164
|
-
|
|
15165
|
-
|
|
15166
|
-
|
|
15167
|
-
query = container.particles.quadTree.queryCircle(pos1, distance);
|
|
15168
|
-
|
|
15169
|
-
for (const p2 of query) {
|
|
15170
|
-
if (p1 === p2 || !p2.options.move.attract.enable || p2.destroyed || p2.spawning) {
|
|
15171
|
-
continue;
|
|
15172
|
-
}
|
|
13935
|
+
const container = this.container,
|
|
13936
|
+
distance = (_a = p1.retina.attractDistance) !== null && _a !== void 0 ? _a : container.retina.attractDistance,
|
|
13937
|
+
pos1 = p1.getPosition(),
|
|
13938
|
+
query = container.particles.quadTree.queryCircle(pos1, distance);
|
|
15173
13939
|
|
|
15174
|
-
|
|
15175
|
-
|
|
15176
|
-
|
|
15177
|
-
dy
|
|
15178
|
-
} = getDistances(pos1, pos2),
|
|
15179
|
-
rotate = p1.options.move.attract.rotate,
|
|
15180
|
-
ax = dx / (rotate.x * 1000),
|
|
15181
|
-
ay = dy / (rotate.y * 1000),
|
|
15182
|
-
p1Factor = p2.size.value / p1.size.value,
|
|
15183
|
-
p2Factor = 1 / p1Factor;
|
|
15184
|
-
p1.velocity.x -= ax * p1Factor;
|
|
15185
|
-
p1.velocity.y -= ay * p1Factor;
|
|
15186
|
-
p2.velocity.x += ax * p2Factor;
|
|
15187
|
-
p2.velocity.y += ay * p2Factor;
|
|
13940
|
+
for (const p2 of query) {
|
|
13941
|
+
if (p1 === p2 || !p2.options.move.attract.enable || p2.destroyed || p2.spawning) {
|
|
13942
|
+
continue;
|
|
15188
13943
|
}
|
|
15189
|
-
|
|
13944
|
+
|
|
13945
|
+
const pos2 = p2.getPosition(),
|
|
13946
|
+
{
|
|
13947
|
+
dx,
|
|
13948
|
+
dy
|
|
13949
|
+
} = getDistances(pos1, pos2),
|
|
13950
|
+
rotate = p1.options.move.attract.rotate,
|
|
13951
|
+
ax = dx / (rotate.x * 1000),
|
|
13952
|
+
ay = dy / (rotate.y * 1000),
|
|
13953
|
+
p1Factor = p2.size.value / p1.size.value,
|
|
13954
|
+
p2Factor = 1 / p1Factor;
|
|
13955
|
+
p1.velocity.x -= ax * p1Factor;
|
|
13956
|
+
p1.velocity.y -= ay * p1Factor;
|
|
13957
|
+
p2.velocity.x += ax * p2Factor;
|
|
13958
|
+
p2.velocity.y += ay * p2Factor;
|
|
13959
|
+
}
|
|
15190
13960
|
}
|
|
15191
13961
|
|
|
15192
13962
|
isEnabled(particle) {
|
|
@@ -15196,46 +13966,12 @@ class Attractor_Attractor extends ParticlesInteractorBase {
|
|
|
15196
13966
|
reset() {}
|
|
15197
13967
|
|
|
15198
13968
|
}
|
|
15199
|
-
;// CONCATENATED MODULE: ../../interactions/particles/attract/dist/index.js
|
|
15200
|
-
var particles_attract_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
15201
|
-
function adopt(value) {
|
|
15202
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
15203
|
-
resolve(value);
|
|
15204
|
-
});
|
|
15205
|
-
}
|
|
13969
|
+
;// CONCATENATED MODULE: ../../interactions/particles/attract/dist/esm/index.js
|
|
15206
13970
|
|
|
15207
|
-
|
|
15208
|
-
|
|
15209
|
-
try {
|
|
15210
|
-
step(generator.next(value));
|
|
15211
|
-
} catch (e) {
|
|
15212
|
-
reject(e);
|
|
15213
|
-
}
|
|
15214
|
-
}
|
|
15215
|
-
|
|
15216
|
-
function rejected(value) {
|
|
15217
|
-
try {
|
|
15218
|
-
step(generator["throw"](value));
|
|
15219
|
-
} catch (e) {
|
|
15220
|
-
reject(e);
|
|
15221
|
-
}
|
|
15222
|
-
}
|
|
15223
|
-
|
|
15224
|
-
function step(result) {
|
|
15225
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
15226
|
-
}
|
|
15227
|
-
|
|
15228
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
15229
|
-
});
|
|
15230
|
-
};
|
|
15231
|
-
|
|
15232
|
-
|
|
15233
|
-
function loadParticlesAttractInteraction(engine) {
|
|
15234
|
-
return particles_attract_dist_awaiter(this, void 0, void 0, function* () {
|
|
15235
|
-
yield engine.addInteractor("particlesAttract", container => new Attractor_Attractor(container));
|
|
15236
|
-
});
|
|
13971
|
+
async function loadParticlesAttractInteraction(engine) {
|
|
13972
|
+
await engine.addInteractor("particlesAttract", container => new Attractor_Attractor(container));
|
|
15237
13973
|
}
|
|
15238
|
-
;// CONCATENATED MODULE: ../../interactions/particles/collisions/dist/Absorb.js
|
|
13974
|
+
;// CONCATENATED MODULE: ../../interactions/particles/collisions/dist/esm/Absorb.js
|
|
15239
13975
|
|
|
15240
13976
|
function absorb(p1, p2, fps, pixelRatio) {
|
|
15241
13977
|
if (p1.getRadius() === undefined && p2.getRadius() !== undefined) {
|
|
@@ -15264,12 +14000,12 @@ function absorb(p1, p2, fps, pixelRatio) {
|
|
|
15264
14000
|
}
|
|
15265
14001
|
}
|
|
15266
14002
|
}
|
|
15267
|
-
;// CONCATENATED MODULE: ../../interactions/particles/collisions/dist/Bounce.js
|
|
14003
|
+
;// CONCATENATED MODULE: ../../interactions/particles/collisions/dist/esm/Bounce.js
|
|
15268
14004
|
|
|
15269
14005
|
function bounce(p1, p2) {
|
|
15270
14006
|
circleBounce(circleBounceDataFromParticle(p1), circleBounceDataFromParticle(p2));
|
|
15271
14007
|
}
|
|
15272
|
-
;// CONCATENATED MODULE: ../../interactions/particles/collisions/dist/Destroy.js
|
|
14008
|
+
;// CONCATENATED MODULE: ../../interactions/particles/collisions/dist/esm/Destroy.js
|
|
15273
14009
|
|
|
15274
14010
|
function destroy(p1, p2) {
|
|
15275
14011
|
if (!p1.unbreakable && !p2.unbreakable) {
|
|
@@ -15288,7 +14024,7 @@ function destroy(p1, p2) {
|
|
|
15288
14024
|
}
|
|
15289
14025
|
}
|
|
15290
14026
|
}
|
|
15291
|
-
;// CONCATENATED MODULE: ../../interactions/particles/collisions/dist/ResolveCollision.js
|
|
14027
|
+
;// CONCATENATED MODULE: ../../interactions/particles/collisions/dist/esm/ResolveCollision.js
|
|
15292
14028
|
|
|
15293
14029
|
|
|
15294
14030
|
|
|
@@ -15313,39 +14049,7 @@ function resolveCollision(p1, p2, fps, pixelRatio) {
|
|
|
15313
14049
|
}
|
|
15314
14050
|
}
|
|
15315
14051
|
}
|
|
15316
|
-
;// CONCATENATED MODULE: ../../interactions/particles/collisions/dist/Collider.js
|
|
15317
|
-
var Collider_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
15318
|
-
function adopt(value) {
|
|
15319
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
15320
|
-
resolve(value);
|
|
15321
|
-
});
|
|
15322
|
-
}
|
|
15323
|
-
|
|
15324
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15325
|
-
function fulfilled(value) {
|
|
15326
|
-
try {
|
|
15327
|
-
step(generator.next(value));
|
|
15328
|
-
} catch (e) {
|
|
15329
|
-
reject(e);
|
|
15330
|
-
}
|
|
15331
|
-
}
|
|
15332
|
-
|
|
15333
|
-
function rejected(value) {
|
|
15334
|
-
try {
|
|
15335
|
-
step(generator["throw"](value));
|
|
15336
|
-
} catch (e) {
|
|
15337
|
-
reject(e);
|
|
15338
|
-
}
|
|
15339
|
-
}
|
|
15340
|
-
|
|
15341
|
-
function step(result) {
|
|
15342
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
15343
|
-
}
|
|
15344
|
-
|
|
15345
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
15346
|
-
});
|
|
15347
|
-
};
|
|
15348
|
-
|
|
14052
|
+
;// CONCATENATED MODULE: ../../interactions/particles/collisions/dist/esm/Collider.js
|
|
15349
14053
|
|
|
15350
14054
|
|
|
15351
14055
|
class Collider extends ParticlesInteractorBase {
|
|
@@ -15359,110 +14063,42 @@ class Collider extends ParticlesInteractorBase {
|
|
|
15359
14063
|
|
|
15360
14064
|
reset() {}
|
|
15361
14065
|
|
|
15362
|
-
interact(p1) {
|
|
15363
|
-
|
|
15364
|
-
|
|
15365
|
-
|
|
15366
|
-
|
|
15367
|
-
query = container.particles.quadTree.queryCircle(pos1, radius1 * 2);
|
|
15368
|
-
|
|
15369
|
-
for (const p2 of query) {
|
|
15370
|
-
if (p1 === p2 || !p2.options.collisions.enable || p1.options.collisions.mode !== p2.options.collisions.mode || p2.destroyed || p2.spawning) {
|
|
15371
|
-
continue;
|
|
15372
|
-
}
|
|
15373
|
-
|
|
15374
|
-
const pos2 = p2.getPosition();
|
|
15375
|
-
const radius2 = p2.getRadius();
|
|
15376
|
-
|
|
15377
|
-
if (Math.abs(Math.round(pos1.z) - Math.round(pos2.z)) > radius1 + radius2) {
|
|
15378
|
-
continue;
|
|
15379
|
-
}
|
|
15380
|
-
|
|
15381
|
-
const dist = getDistance(pos1, pos2);
|
|
15382
|
-
const distP = radius1 + radius2;
|
|
15383
|
-
|
|
15384
|
-
if (dist > distP) {
|
|
15385
|
-
continue;
|
|
15386
|
-
}
|
|
14066
|
+
async interact(p1) {
|
|
14067
|
+
const container = this.container,
|
|
14068
|
+
pos1 = p1.getPosition(),
|
|
14069
|
+
radius1 = p1.getRadius(),
|
|
14070
|
+
query = container.particles.quadTree.queryCircle(pos1, radius1 * 2);
|
|
15387
14071
|
|
|
15388
|
-
|
|
14072
|
+
for (const p2 of query) {
|
|
14073
|
+
if (p1 === p2 || !p2.options.collisions.enable || p1.options.collisions.mode !== p2.options.collisions.mode || p2.destroyed || p2.spawning) {
|
|
14074
|
+
continue;
|
|
15389
14075
|
}
|
|
15390
|
-
});
|
|
15391
|
-
}
|
|
15392
|
-
|
|
15393
|
-
}
|
|
15394
|
-
;// CONCATENATED MODULE: ../../interactions/particles/collisions/dist/index.js
|
|
15395
|
-
var collisions_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
15396
|
-
function adopt(value) {
|
|
15397
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
15398
|
-
resolve(value);
|
|
15399
|
-
});
|
|
15400
|
-
}
|
|
15401
14076
|
|
|
15402
|
-
|
|
15403
|
-
|
|
15404
|
-
try {
|
|
15405
|
-
step(generator.next(value));
|
|
15406
|
-
} catch (e) {
|
|
15407
|
-
reject(e);
|
|
15408
|
-
}
|
|
15409
|
-
}
|
|
14077
|
+
const pos2 = p2.getPosition();
|
|
14078
|
+
const radius2 = p2.getRadius();
|
|
15410
14079
|
|
|
15411
|
-
|
|
15412
|
-
|
|
15413
|
-
step(generator["throw"](value));
|
|
15414
|
-
} catch (e) {
|
|
15415
|
-
reject(e);
|
|
14080
|
+
if (Math.abs(Math.round(pos1.z) - Math.round(pos2.z)) > radius1 + radius2) {
|
|
14081
|
+
continue;
|
|
15416
14082
|
}
|
|
15417
|
-
}
|
|
15418
|
-
|
|
15419
|
-
function step(result) {
|
|
15420
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
15421
|
-
}
|
|
15422
|
-
|
|
15423
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
15424
|
-
});
|
|
15425
|
-
};
|
|
15426
|
-
|
|
15427
|
-
|
|
15428
|
-
function loadParticlesCollisionsInteraction(engine) {
|
|
15429
|
-
return collisions_dist_awaiter(this, void 0, void 0, function* () {
|
|
15430
|
-
yield engine.addInteractor("particlesCollisions", container => new Collider(container));
|
|
15431
|
-
});
|
|
15432
|
-
}
|
|
15433
|
-
;// CONCATENATED MODULE: ../../interactions/particles/links/dist/Linker.js
|
|
15434
|
-
var Linker_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
15435
|
-
function adopt(value) {
|
|
15436
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
15437
|
-
resolve(value);
|
|
15438
|
-
});
|
|
15439
|
-
}
|
|
15440
14083
|
|
|
15441
|
-
|
|
15442
|
-
|
|
15443
|
-
try {
|
|
15444
|
-
step(generator.next(value));
|
|
15445
|
-
} catch (e) {
|
|
15446
|
-
reject(e);
|
|
15447
|
-
}
|
|
15448
|
-
}
|
|
14084
|
+
const dist = getDistance(pos1, pos2);
|
|
14085
|
+
const distP = radius1 + radius2;
|
|
15449
14086
|
|
|
15450
|
-
|
|
15451
|
-
|
|
15452
|
-
step(generator["throw"](value));
|
|
15453
|
-
} catch (e) {
|
|
15454
|
-
reject(e);
|
|
14087
|
+
if (dist > distP) {
|
|
14088
|
+
continue;
|
|
15455
14089
|
}
|
|
15456
|
-
}
|
|
15457
14090
|
|
|
15458
|
-
|
|
15459
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
14091
|
+
resolveCollision(p1, p2, container.fpsLimit / 1000, container.retina.pixelRatio);
|
|
15460
14092
|
}
|
|
14093
|
+
}
|
|
15461
14094
|
|
|
15462
|
-
|
|
15463
|
-
|
|
15464
|
-
};
|
|
14095
|
+
}
|
|
14096
|
+
;// CONCATENATED MODULE: ../../interactions/particles/collisions/dist/esm/index.js
|
|
15465
14097
|
|
|
14098
|
+
async function loadParticlesCollisionsInteraction(engine) {
|
|
14099
|
+
await engine.addInteractor("particlesCollisions", container => new Collider(container));
|
|
14100
|
+
}
|
|
14101
|
+
;// CONCATENATED MODULE: ../../interactions/particles/links/dist/esm/Linker.js
|
|
15466
14102
|
|
|
15467
14103
|
|
|
15468
14104
|
function getLinkDistance(pos1, pos2, optDistance, canvasSize, warp) {
|
|
@@ -15511,53 +14147,51 @@ class Linker extends ParticlesInteractorBase {
|
|
|
15511
14147
|
|
|
15512
14148
|
reset() {}
|
|
15513
14149
|
|
|
15514
|
-
interact(p1) {
|
|
14150
|
+
async interact(p1) {
|
|
15515
14151
|
var _a;
|
|
15516
14152
|
|
|
15517
|
-
|
|
15518
|
-
|
|
15519
|
-
|
|
15520
|
-
|
|
15521
|
-
canvasSize = container.canvas.size;
|
|
15522
|
-
|
|
15523
|
-
if (pos1.x < 0 || pos1.y < 0 || pos1.x > canvasSize.width || pos1.y > canvasSize.height) {
|
|
15524
|
-
return;
|
|
15525
|
-
}
|
|
14153
|
+
p1.links = [];
|
|
14154
|
+
const pos1 = p1.getPosition(),
|
|
14155
|
+
container = this.container,
|
|
14156
|
+
canvasSize = container.canvas.size;
|
|
15526
14157
|
|
|
15527
|
-
|
|
15528
|
-
|
|
15529
|
-
|
|
15530
|
-
warp = linkOpt1.warp,
|
|
15531
|
-
range = warp ? new CircleWarp(pos1.x, pos1.y, optDistance, canvasSize) : new Circle(pos1.x, pos1.y, optDistance),
|
|
15532
|
-
query = container.particles.quadTree.query(range);
|
|
14158
|
+
if (pos1.x < 0 || pos1.y < 0 || pos1.x > canvasSize.width || pos1.y > canvasSize.height) {
|
|
14159
|
+
return;
|
|
14160
|
+
}
|
|
15533
14161
|
|
|
15534
|
-
|
|
15535
|
-
|
|
14162
|
+
const linkOpt1 = p1.options.links,
|
|
14163
|
+
optOpacity = linkOpt1.opacity,
|
|
14164
|
+
optDistance = (_a = p1.retina.linksDistance) !== null && _a !== void 0 ? _a : container.retina.linksDistance,
|
|
14165
|
+
warp = linkOpt1.warp,
|
|
14166
|
+
range = warp ? new CircleWarp(pos1.x, pos1.y, optDistance, canvasSize) : new Circle(pos1.x, pos1.y, optDistance),
|
|
14167
|
+
query = container.particles.quadTree.query(range);
|
|
15536
14168
|
|
|
15537
|
-
|
|
15538
|
-
|
|
15539
|
-
}
|
|
14169
|
+
for (const p2 of query) {
|
|
14170
|
+
const linkOpt2 = p2.options.links;
|
|
15540
14171
|
|
|
15541
|
-
|
|
14172
|
+
if (p1 === p2 || !linkOpt2.enable || linkOpt1.id !== linkOpt2.id || p2.spawning || p2.destroyed || p1.links.map(t => t.destination).indexOf(p2) !== -1 || p2.links.map(t => t.destination).indexOf(p1) !== -1) {
|
|
14173
|
+
continue;
|
|
14174
|
+
}
|
|
15542
14175
|
|
|
15543
|
-
|
|
15544
|
-
continue;
|
|
15545
|
-
}
|
|
14176
|
+
const pos2 = p2.getPosition();
|
|
15546
14177
|
|
|
15547
|
-
|
|
14178
|
+
if (pos2.x < 0 || pos2.y < 0 || pos2.x > canvasSize.width || pos2.y > canvasSize.height) {
|
|
14179
|
+
continue;
|
|
14180
|
+
}
|
|
15548
14181
|
|
|
15549
|
-
|
|
15550
|
-
return;
|
|
15551
|
-
}
|
|
14182
|
+
const distance = getLinkDistance(pos1, pos2, optDistance, canvasSize, warp && linkOpt2.warp);
|
|
15552
14183
|
|
|
15553
|
-
|
|
15554
|
-
|
|
15555
|
-
p1.links.push({
|
|
15556
|
-
destination: p2,
|
|
15557
|
-
opacity: opacityLine
|
|
15558
|
-
});
|
|
14184
|
+
if (distance > optDistance) {
|
|
14185
|
+
return;
|
|
15559
14186
|
}
|
|
15560
|
-
|
|
14187
|
+
|
|
14188
|
+
const opacityLine = (1 - distance / optDistance) * optOpacity;
|
|
14189
|
+
this.setColor(p1);
|
|
14190
|
+
p1.links.push({
|
|
14191
|
+
destination: p2,
|
|
14192
|
+
opacity: opacityLine
|
|
14193
|
+
});
|
|
14194
|
+
}
|
|
15561
14195
|
}
|
|
15562
14196
|
|
|
15563
14197
|
setColor(p1) {
|
|
@@ -15578,46 +14212,12 @@ class Linker extends ParticlesInteractorBase {
|
|
|
15578
14212
|
}
|
|
15579
14213
|
|
|
15580
14214
|
}
|
|
15581
|
-
;// CONCATENATED MODULE: ../../interactions/particles/links/dist/interaction.js
|
|
15582
|
-
var interaction_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
15583
|
-
function adopt(value) {
|
|
15584
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
15585
|
-
resolve(value);
|
|
15586
|
-
});
|
|
15587
|
-
}
|
|
15588
|
-
|
|
15589
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15590
|
-
function fulfilled(value) {
|
|
15591
|
-
try {
|
|
15592
|
-
step(generator.next(value));
|
|
15593
|
-
} catch (e) {
|
|
15594
|
-
reject(e);
|
|
15595
|
-
}
|
|
15596
|
-
}
|
|
15597
|
-
|
|
15598
|
-
function rejected(value) {
|
|
15599
|
-
try {
|
|
15600
|
-
step(generator["throw"](value));
|
|
15601
|
-
} catch (e) {
|
|
15602
|
-
reject(e);
|
|
15603
|
-
}
|
|
15604
|
-
}
|
|
15605
|
-
|
|
15606
|
-
function step(result) {
|
|
15607
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
15608
|
-
}
|
|
15609
|
-
|
|
15610
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
15611
|
-
});
|
|
15612
|
-
};
|
|
14215
|
+
;// CONCATENATED MODULE: ../../interactions/particles/links/dist/esm/interaction.js
|
|
15613
14216
|
|
|
15614
|
-
|
|
15615
|
-
|
|
15616
|
-
return interaction_awaiter(this, void 0, void 0, function* () {
|
|
15617
|
-
yield engine.addInteractor("particlesLinks", container => new Linker(container));
|
|
15618
|
-
});
|
|
14217
|
+
async function loadInteraction(engine) {
|
|
14218
|
+
await engine.addInteractor("particlesLinks", container => new Linker(container));
|
|
15619
14219
|
}
|
|
15620
|
-
;// CONCATENATED MODULE: ../../interactions/particles/links/dist/Utils.js
|
|
14220
|
+
;// CONCATENATED MODULE: ../../interactions/particles/links/dist/esm/Utils.js
|
|
15621
14221
|
|
|
15622
14222
|
function drawLinkLine(context, width, begin, end, maxDistance, canvasSize, warp, backgroundMask, composite, colorLine, opacity, shadow) {
|
|
15623
14223
|
let drawn = false;
|
|
@@ -15724,7 +14324,7 @@ function drawLinkTriangle(context, pos1, pos2, pos3, backgroundMask, composite,
|
|
|
15724
14324
|
context.fillStyle = getStyleFromRgb(colorTriangle, opacityTriangle);
|
|
15725
14325
|
context.fill();
|
|
15726
14326
|
}
|
|
15727
|
-
;// CONCATENATED MODULE: ../../interactions/particles/links/dist/LinkInstance.js
|
|
14327
|
+
;// CONCATENATED MODULE: ../../interactions/particles/links/dist/esm/LinkInstance.js
|
|
15728
14328
|
|
|
15729
14329
|
|
|
15730
14330
|
class LinkInstance {
|
|
@@ -15870,39 +14470,7 @@ class LinkInstance {
|
|
|
15870
14470
|
}
|
|
15871
14471
|
|
|
15872
14472
|
}
|
|
15873
|
-
;// CONCATENATED MODULE: ../../interactions/particles/links/dist/plugin.js
|
|
15874
|
-
var plugin_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
15875
|
-
function adopt(value) {
|
|
15876
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
15877
|
-
resolve(value);
|
|
15878
|
-
});
|
|
15879
|
-
}
|
|
15880
|
-
|
|
15881
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15882
|
-
function fulfilled(value) {
|
|
15883
|
-
try {
|
|
15884
|
-
step(generator.next(value));
|
|
15885
|
-
} catch (e) {
|
|
15886
|
-
reject(e);
|
|
15887
|
-
}
|
|
15888
|
-
}
|
|
15889
|
-
|
|
15890
|
-
function rejected(value) {
|
|
15891
|
-
try {
|
|
15892
|
-
step(generator["throw"](value));
|
|
15893
|
-
} catch (e) {
|
|
15894
|
-
reject(e);
|
|
15895
|
-
}
|
|
15896
|
-
}
|
|
15897
|
-
|
|
15898
|
-
function step(result) {
|
|
15899
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
15900
|
-
}
|
|
15901
|
-
|
|
15902
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
15903
|
-
});
|
|
15904
|
-
};
|
|
15905
|
-
|
|
14473
|
+
;// CONCATENATED MODULE: ../../interactions/particles/links/dist/esm/plugin.js
|
|
15906
14474
|
|
|
15907
14475
|
|
|
15908
14476
|
class LinksPlugin {
|
|
@@ -15922,54 +14490,18 @@ class LinksPlugin {
|
|
|
15922
14490
|
|
|
15923
14491
|
}
|
|
15924
14492
|
|
|
15925
|
-
function loadPlugin(engine) {
|
|
15926
|
-
|
|
15927
|
-
|
|
15928
|
-
yield engine.addPlugin(plugin);
|
|
15929
|
-
});
|
|
14493
|
+
async function loadPlugin(engine) {
|
|
14494
|
+
const plugin = new LinksPlugin();
|
|
14495
|
+
await engine.addPlugin(plugin);
|
|
15930
14496
|
}
|
|
15931
|
-
;// CONCATENATED MODULE: ../../interactions/particles/links/dist/index.js
|
|
15932
|
-
var links_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
15933
|
-
function adopt(value) {
|
|
15934
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
15935
|
-
resolve(value);
|
|
15936
|
-
});
|
|
15937
|
-
}
|
|
15938
|
-
|
|
15939
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15940
|
-
function fulfilled(value) {
|
|
15941
|
-
try {
|
|
15942
|
-
step(generator.next(value));
|
|
15943
|
-
} catch (e) {
|
|
15944
|
-
reject(e);
|
|
15945
|
-
}
|
|
15946
|
-
}
|
|
15947
|
-
|
|
15948
|
-
function rejected(value) {
|
|
15949
|
-
try {
|
|
15950
|
-
step(generator["throw"](value));
|
|
15951
|
-
} catch (e) {
|
|
15952
|
-
reject(e);
|
|
15953
|
-
}
|
|
15954
|
-
}
|
|
15955
|
-
|
|
15956
|
-
function step(result) {
|
|
15957
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
15958
|
-
}
|
|
15959
|
-
|
|
15960
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
15961
|
-
});
|
|
15962
|
-
};
|
|
14497
|
+
;// CONCATENATED MODULE: ../../interactions/particles/links/dist/esm/index.js
|
|
15963
14498
|
|
|
15964
14499
|
|
|
15965
|
-
|
|
15966
|
-
|
|
15967
|
-
|
|
15968
|
-
yield loadInteraction(engine);
|
|
15969
|
-
yield loadPlugin(engine);
|
|
15970
|
-
});
|
|
14500
|
+
async function loadParticlesLinksInteraction(engine) {
|
|
14501
|
+
await loadInteraction(engine);
|
|
14502
|
+
await loadPlugin(engine);
|
|
15971
14503
|
}
|
|
15972
|
-
;// CONCATENATED MODULE: ../../shapes/polygon/dist/PolygonDrawerBase.js
|
|
14504
|
+
;// CONCATENATED MODULE: ../../shapes/polygon/dist/esm/PolygonDrawerBase.js
|
|
15973
14505
|
class PolygonDrawerBase {
|
|
15974
14506
|
getSidesCount(particle) {
|
|
15975
14507
|
var _a, _b;
|
|
@@ -16002,7 +14534,7 @@ class PolygonDrawerBase {
|
|
|
16002
14534
|
}
|
|
16003
14535
|
|
|
16004
14536
|
}
|
|
16005
|
-
;// CONCATENATED MODULE: ../../shapes/polygon/dist/PolygonDrawer.js
|
|
14537
|
+
;// CONCATENATED MODULE: ../../shapes/polygon/dist/esm/PolygonDrawer.js
|
|
16006
14538
|
|
|
16007
14539
|
class PolygonDrawer extends PolygonDrawerBase {
|
|
16008
14540
|
getSidesData(particle, radius) {
|
|
@@ -16028,7 +14560,7 @@ class PolygonDrawer extends PolygonDrawerBase {
|
|
|
16028
14560
|
}
|
|
16029
14561
|
|
|
16030
14562
|
}
|
|
16031
|
-
;// CONCATENATED MODULE: ../../shapes/polygon/dist/TriangleDrawer.js
|
|
14563
|
+
;// CONCATENATED MODULE: ../../shapes/polygon/dist/esm/TriangleDrawer.js
|
|
16032
14564
|
|
|
16033
14565
|
class TriangleDrawer extends PolygonDrawerBase {
|
|
16034
14566
|
getSidesCount() {
|
|
@@ -16053,58 +14585,20 @@ class TriangleDrawer extends PolygonDrawerBase {
|
|
|
16053
14585
|
}
|
|
16054
14586
|
|
|
16055
14587
|
}
|
|
16056
|
-
;// CONCATENATED MODULE: ../../shapes/polygon/dist/index.js
|
|
16057
|
-
var polygon_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
16058
|
-
function adopt(value) {
|
|
16059
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
16060
|
-
resolve(value);
|
|
16061
|
-
});
|
|
16062
|
-
}
|
|
16063
|
-
|
|
16064
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16065
|
-
function fulfilled(value) {
|
|
16066
|
-
try {
|
|
16067
|
-
step(generator.next(value));
|
|
16068
|
-
} catch (e) {
|
|
16069
|
-
reject(e);
|
|
16070
|
-
}
|
|
16071
|
-
}
|
|
16072
|
-
|
|
16073
|
-
function rejected(value) {
|
|
16074
|
-
try {
|
|
16075
|
-
step(generator["throw"](value));
|
|
16076
|
-
} catch (e) {
|
|
16077
|
-
reject(e);
|
|
16078
|
-
}
|
|
16079
|
-
}
|
|
14588
|
+
;// CONCATENATED MODULE: ../../shapes/polygon/dist/esm/index.js
|
|
16080
14589
|
|
|
16081
|
-
function step(result) {
|
|
16082
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
16083
|
-
}
|
|
16084
|
-
|
|
16085
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
16086
|
-
});
|
|
16087
|
-
};
|
|
16088
14590
|
|
|
16089
|
-
|
|
16090
|
-
|
|
16091
|
-
function loadGenericPolygonShape(engine) {
|
|
16092
|
-
return polygon_dist_awaiter(this, void 0, void 0, function* () {
|
|
16093
|
-
yield engine.addShape("polygon", new PolygonDrawer());
|
|
16094
|
-
});
|
|
14591
|
+
async function loadGenericPolygonShape(engine) {
|
|
14592
|
+
await engine.addShape("polygon", new PolygonDrawer());
|
|
16095
14593
|
}
|
|
16096
|
-
function loadTriangleShape(engine) {
|
|
16097
|
-
|
|
16098
|
-
yield engine.addShape("triangle", new TriangleDrawer());
|
|
16099
|
-
});
|
|
14594
|
+
async function loadTriangleShape(engine) {
|
|
14595
|
+
await engine.addShape("triangle", new TriangleDrawer());
|
|
16100
14596
|
}
|
|
16101
|
-
function loadPolygonShape(engine) {
|
|
16102
|
-
|
|
16103
|
-
|
|
16104
|
-
yield loadTriangleShape(engine);
|
|
16105
|
-
});
|
|
14597
|
+
async function loadPolygonShape(engine) {
|
|
14598
|
+
await loadGenericPolygonShape(engine);
|
|
14599
|
+
await loadTriangleShape(engine);
|
|
16106
14600
|
}
|
|
16107
|
-
;// CONCATENATED MODULE: ../../updaters/size/dist/SizeUpdater.js
|
|
14601
|
+
;// CONCATENATED MODULE: ../../updaters/size/dist/esm/SizeUpdater.js
|
|
16108
14602
|
|
|
16109
14603
|
|
|
16110
14604
|
function SizeUpdater_checkDestroy(particle, value, minValue, maxValue) {
|
|
@@ -16192,46 +14686,12 @@ class SizeUpdater {
|
|
|
16192
14686
|
}
|
|
16193
14687
|
|
|
16194
14688
|
}
|
|
16195
|
-
;// CONCATENATED MODULE: ../../updaters/size/dist/index.js
|
|
16196
|
-
var size_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
16197
|
-
function adopt(value) {
|
|
16198
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
16199
|
-
resolve(value);
|
|
16200
|
-
});
|
|
16201
|
-
}
|
|
16202
|
-
|
|
16203
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16204
|
-
function fulfilled(value) {
|
|
16205
|
-
try {
|
|
16206
|
-
step(generator.next(value));
|
|
16207
|
-
} catch (e) {
|
|
16208
|
-
reject(e);
|
|
16209
|
-
}
|
|
16210
|
-
}
|
|
16211
|
-
|
|
16212
|
-
function rejected(value) {
|
|
16213
|
-
try {
|
|
16214
|
-
step(generator["throw"](value));
|
|
16215
|
-
} catch (e) {
|
|
16216
|
-
reject(e);
|
|
16217
|
-
}
|
|
16218
|
-
}
|
|
16219
|
-
|
|
16220
|
-
function step(result) {
|
|
16221
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
16222
|
-
}
|
|
16223
|
-
|
|
16224
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
16225
|
-
});
|
|
16226
|
-
};
|
|
14689
|
+
;// CONCATENATED MODULE: ../../updaters/size/dist/esm/index.js
|
|
16227
14690
|
|
|
16228
|
-
|
|
16229
|
-
|
|
16230
|
-
return size_dist_awaiter(this, void 0, void 0, function* () {
|
|
16231
|
-
yield engine.addParticleUpdater("size", () => new SizeUpdater());
|
|
16232
|
-
});
|
|
14691
|
+
async function loadSizeUpdater(engine) {
|
|
14692
|
+
await engine.addParticleUpdater("size", () => new SizeUpdater());
|
|
16233
14693
|
}
|
|
16234
|
-
;// CONCATENATED MODULE: ../../shapes/square/dist/SquareDrawer.js
|
|
14694
|
+
;// CONCATENATED MODULE: ../../shapes/square/dist/esm/SquareDrawer.js
|
|
16235
14695
|
const fixFactor = Math.sqrt(2);
|
|
16236
14696
|
class SquareDrawer {
|
|
16237
14697
|
getSidesCount() {
|
|
@@ -16243,48 +14703,14 @@ class SquareDrawer {
|
|
|
16243
14703
|
}
|
|
16244
14704
|
|
|
16245
14705
|
}
|
|
16246
|
-
;// CONCATENATED MODULE: ../../shapes/square/dist/index.js
|
|
16247
|
-
var square_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
16248
|
-
function adopt(value) {
|
|
16249
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
16250
|
-
resolve(value);
|
|
16251
|
-
});
|
|
16252
|
-
}
|
|
16253
|
-
|
|
16254
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16255
|
-
function fulfilled(value) {
|
|
16256
|
-
try {
|
|
16257
|
-
step(generator.next(value));
|
|
16258
|
-
} catch (e) {
|
|
16259
|
-
reject(e);
|
|
16260
|
-
}
|
|
16261
|
-
}
|
|
16262
|
-
|
|
16263
|
-
function rejected(value) {
|
|
16264
|
-
try {
|
|
16265
|
-
step(generator["throw"](value));
|
|
16266
|
-
} catch (e) {
|
|
16267
|
-
reject(e);
|
|
16268
|
-
}
|
|
16269
|
-
}
|
|
14706
|
+
;// CONCATENATED MODULE: ../../shapes/square/dist/esm/index.js
|
|
16270
14707
|
|
|
16271
|
-
|
|
16272
|
-
|
|
16273
|
-
|
|
16274
|
-
|
|
16275
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
16276
|
-
});
|
|
16277
|
-
};
|
|
16278
|
-
|
|
16279
|
-
|
|
16280
|
-
function loadSquareShape(engine) {
|
|
16281
|
-
return square_dist_awaiter(this, void 0, void 0, function* () {
|
|
16282
|
-
const drawer = new SquareDrawer();
|
|
16283
|
-
yield engine.addShape("edge", drawer);
|
|
16284
|
-
yield engine.addShape("square", drawer);
|
|
16285
|
-
});
|
|
14708
|
+
async function loadSquareShape(engine) {
|
|
14709
|
+
const drawer = new SquareDrawer();
|
|
14710
|
+
await engine.addShape("edge", drawer);
|
|
14711
|
+
await engine.addShape("square", drawer);
|
|
16286
14712
|
}
|
|
16287
|
-
;// CONCATENATED MODULE: ../../shapes/star/dist/StarDrawer.js
|
|
14713
|
+
;// CONCATENATED MODULE: ../../shapes/star/dist/esm/StarDrawer.js
|
|
16288
14714
|
class StarDrawer {
|
|
16289
14715
|
getSidesCount(particle) {
|
|
16290
14716
|
var _a, _b;
|
|
@@ -16310,46 +14736,12 @@ class StarDrawer {
|
|
|
16310
14736
|
}
|
|
16311
14737
|
|
|
16312
14738
|
}
|
|
16313
|
-
;// CONCATENATED MODULE: ../../shapes/star/dist/index.js
|
|
16314
|
-
var star_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
16315
|
-
function adopt(value) {
|
|
16316
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
16317
|
-
resolve(value);
|
|
16318
|
-
});
|
|
16319
|
-
}
|
|
16320
|
-
|
|
16321
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16322
|
-
function fulfilled(value) {
|
|
16323
|
-
try {
|
|
16324
|
-
step(generator.next(value));
|
|
16325
|
-
} catch (e) {
|
|
16326
|
-
reject(e);
|
|
16327
|
-
}
|
|
16328
|
-
}
|
|
16329
|
-
|
|
16330
|
-
function rejected(value) {
|
|
16331
|
-
try {
|
|
16332
|
-
step(generator["throw"](value));
|
|
16333
|
-
} catch (e) {
|
|
16334
|
-
reject(e);
|
|
16335
|
-
}
|
|
16336
|
-
}
|
|
16337
|
-
|
|
16338
|
-
function step(result) {
|
|
16339
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
16340
|
-
}
|
|
16341
|
-
|
|
16342
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
16343
|
-
});
|
|
16344
|
-
};
|
|
14739
|
+
;// CONCATENATED MODULE: ../../shapes/star/dist/esm/index.js
|
|
16345
14740
|
|
|
16346
|
-
|
|
16347
|
-
|
|
16348
|
-
return star_dist_awaiter(this, void 0, void 0, function* () {
|
|
16349
|
-
yield engine.addShape("star", new StarDrawer());
|
|
16350
|
-
});
|
|
14741
|
+
async function loadStarShape(engine) {
|
|
14742
|
+
await engine.addShape("star", new StarDrawer());
|
|
16351
14743
|
}
|
|
16352
|
-
;// CONCATENATED MODULE: ../../updaters/strokeColor/dist/StrokeColorUpdater.js
|
|
14744
|
+
;// CONCATENATED MODULE: ../../updaters/strokeColor/dist/esm/StrokeColorUpdater.js
|
|
16353
14745
|
|
|
16354
14746
|
|
|
16355
14747
|
function StrokeColorUpdater_updateColorValue(delta, value, valueAnimation, max, decrease) {
|
|
@@ -16446,78 +14838,12 @@ class StrokeColorUpdater {
|
|
|
16446
14838
|
}
|
|
16447
14839
|
|
|
16448
14840
|
}
|
|
16449
|
-
;// CONCATENATED MODULE: ../../updaters/strokeColor/dist/index.js
|
|
16450
|
-
var strokeColor_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
16451
|
-
function adopt(value) {
|
|
16452
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
16453
|
-
resolve(value);
|
|
16454
|
-
});
|
|
16455
|
-
}
|
|
14841
|
+
;// CONCATENATED MODULE: ../../updaters/strokeColor/dist/esm/index.js
|
|
16456
14842
|
|
|
16457
|
-
|
|
16458
|
-
|
|
16459
|
-
try {
|
|
16460
|
-
step(generator.next(value));
|
|
16461
|
-
} catch (e) {
|
|
16462
|
-
reject(e);
|
|
16463
|
-
}
|
|
16464
|
-
}
|
|
16465
|
-
|
|
16466
|
-
function rejected(value) {
|
|
16467
|
-
try {
|
|
16468
|
-
step(generator["throw"](value));
|
|
16469
|
-
} catch (e) {
|
|
16470
|
-
reject(e);
|
|
16471
|
-
}
|
|
16472
|
-
}
|
|
16473
|
-
|
|
16474
|
-
function step(result) {
|
|
16475
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
16476
|
-
}
|
|
16477
|
-
|
|
16478
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
16479
|
-
});
|
|
16480
|
-
};
|
|
16481
|
-
|
|
16482
|
-
|
|
16483
|
-
function loadStrokeColorUpdater(engine) {
|
|
16484
|
-
return strokeColor_dist_awaiter(this, void 0, void 0, function* () {
|
|
16485
|
-
yield engine.addParticleUpdater("strokeColor", container => new StrokeColorUpdater(container));
|
|
16486
|
-
});
|
|
14843
|
+
async function loadStrokeColorUpdater(engine) {
|
|
14844
|
+
await engine.addParticleUpdater("strokeColor", container => new StrokeColorUpdater(container));
|
|
16487
14845
|
}
|
|
16488
|
-
;// CONCATENATED MODULE: ../../shapes/text/dist/TextDrawer.js
|
|
16489
|
-
var TextDrawer_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
16490
|
-
function adopt(value) {
|
|
16491
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
16492
|
-
resolve(value);
|
|
16493
|
-
});
|
|
16494
|
-
}
|
|
16495
|
-
|
|
16496
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16497
|
-
function fulfilled(value) {
|
|
16498
|
-
try {
|
|
16499
|
-
step(generator.next(value));
|
|
16500
|
-
} catch (e) {
|
|
16501
|
-
reject(e);
|
|
16502
|
-
}
|
|
16503
|
-
}
|
|
16504
|
-
|
|
16505
|
-
function rejected(value) {
|
|
16506
|
-
try {
|
|
16507
|
-
step(generator["throw"](value));
|
|
16508
|
-
} catch (e) {
|
|
16509
|
-
reject(e);
|
|
16510
|
-
}
|
|
16511
|
-
}
|
|
16512
|
-
|
|
16513
|
-
function step(result) {
|
|
16514
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
16515
|
-
}
|
|
16516
|
-
|
|
16517
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
16518
|
-
});
|
|
16519
|
-
};
|
|
16520
|
-
|
|
14846
|
+
;// CONCATENATED MODULE: ../../shapes/text/dist/esm/TextDrawer.js
|
|
16521
14847
|
|
|
16522
14848
|
const validTypes = ["text", "character", "char"];
|
|
16523
14849
|
class TextDrawer {
|
|
@@ -16525,30 +14851,28 @@ class TextDrawer {
|
|
|
16525
14851
|
return 12;
|
|
16526
14852
|
}
|
|
16527
14853
|
|
|
16528
|
-
init(container) {
|
|
16529
|
-
|
|
16530
|
-
const options = container.actualOptions;
|
|
14854
|
+
async init(container) {
|
|
14855
|
+
const options = container.actualOptions;
|
|
16531
14856
|
|
|
16532
|
-
|
|
16533
|
-
|
|
14857
|
+
if (validTypes.find(t => isInArray(t, options.particles.shape.type))) {
|
|
14858
|
+
const shapeOptions = validTypes.map(t => options.particles.shape.options[t]).find(t => !!t);
|
|
16534
14859
|
|
|
16535
|
-
|
|
16536
|
-
|
|
14860
|
+
if (shapeOptions instanceof Array) {
|
|
14861
|
+
const promises = [];
|
|
16537
14862
|
|
|
16538
|
-
|
|
16539
|
-
|
|
16540
|
-
|
|
16541
|
-
|
|
14863
|
+
for (const character of shapeOptions) {
|
|
14864
|
+
const charShape = character;
|
|
14865
|
+
promises.push(loadFont(charShape.font, charShape.weight));
|
|
14866
|
+
}
|
|
16542
14867
|
|
|
16543
|
-
|
|
16544
|
-
|
|
16545
|
-
|
|
16546
|
-
|
|
16547
|
-
|
|
16548
|
-
}
|
|
14868
|
+
await Promise.allSettled(promises);
|
|
14869
|
+
} else {
|
|
14870
|
+
if (shapeOptions !== undefined) {
|
|
14871
|
+
const charShape = shapeOptions;
|
|
14872
|
+
await loadFont(charShape.font, charShape.weight);
|
|
16549
14873
|
}
|
|
16550
14874
|
}
|
|
16551
|
-
}
|
|
14875
|
+
}
|
|
16552
14876
|
}
|
|
16553
14877
|
|
|
16554
14878
|
draw(context, particle, radius, opacity) {
|
|
@@ -16596,82 +14920,16 @@ class TextDrawer {
|
|
|
16596
14920
|
}
|
|
16597
14921
|
|
|
16598
14922
|
}
|
|
16599
|
-
;// CONCATENATED MODULE: ../../shapes/text/dist/index.js
|
|
16600
|
-
var text_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
16601
|
-
function adopt(value) {
|
|
16602
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
16603
|
-
resolve(value);
|
|
16604
|
-
});
|
|
16605
|
-
}
|
|
16606
|
-
|
|
16607
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16608
|
-
function fulfilled(value) {
|
|
16609
|
-
try {
|
|
16610
|
-
step(generator.next(value));
|
|
16611
|
-
} catch (e) {
|
|
16612
|
-
reject(e);
|
|
16613
|
-
}
|
|
16614
|
-
}
|
|
16615
|
-
|
|
16616
|
-
function rejected(value) {
|
|
16617
|
-
try {
|
|
16618
|
-
step(generator["throw"](value));
|
|
16619
|
-
} catch (e) {
|
|
16620
|
-
reject(e);
|
|
16621
|
-
}
|
|
16622
|
-
}
|
|
16623
|
-
|
|
16624
|
-
function step(result) {
|
|
16625
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
16626
|
-
}
|
|
16627
|
-
|
|
16628
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
16629
|
-
});
|
|
16630
|
-
};
|
|
14923
|
+
;// CONCATENATED MODULE: ../../shapes/text/dist/esm/index.js
|
|
16631
14924
|
|
|
14925
|
+
async function loadTextShape(engine) {
|
|
14926
|
+
const drawer = new TextDrawer();
|
|
16632
14927
|
|
|
16633
|
-
|
|
16634
|
-
|
|
16635
|
-
const drawer = new TextDrawer();
|
|
16636
|
-
|
|
16637
|
-
for (const type of validTypes) {
|
|
16638
|
-
yield engine.addShape(type, drawer);
|
|
16639
|
-
}
|
|
16640
|
-
});
|
|
16641
|
-
}
|
|
16642
|
-
;// CONCATENATED MODULE: ../slim/dist/index.js
|
|
16643
|
-
var slim_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
16644
|
-
function adopt(value) {
|
|
16645
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
16646
|
-
resolve(value);
|
|
16647
|
-
});
|
|
14928
|
+
for (const type of validTypes) {
|
|
14929
|
+
await engine.addShape(type, drawer);
|
|
16648
14930
|
}
|
|
16649
|
-
|
|
16650
|
-
|
|
16651
|
-
function fulfilled(value) {
|
|
16652
|
-
try {
|
|
16653
|
-
step(generator.next(value));
|
|
16654
|
-
} catch (e) {
|
|
16655
|
-
reject(e);
|
|
16656
|
-
}
|
|
16657
|
-
}
|
|
16658
|
-
|
|
16659
|
-
function rejected(value) {
|
|
16660
|
-
try {
|
|
16661
|
-
step(generator["throw"](value));
|
|
16662
|
-
} catch (e) {
|
|
16663
|
-
reject(e);
|
|
16664
|
-
}
|
|
16665
|
-
}
|
|
16666
|
-
|
|
16667
|
-
function step(result) {
|
|
16668
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
16669
|
-
}
|
|
16670
|
-
|
|
16671
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
16672
|
-
});
|
|
16673
|
-
};
|
|
16674
|
-
|
|
14931
|
+
}
|
|
14932
|
+
;// CONCATENATED MODULE: ../slim/dist/esm/index.js
|
|
16675
14933
|
|
|
16676
14934
|
|
|
16677
14935
|
|
|
@@ -16701,40 +14959,38 @@ var slim_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _
|
|
|
16701
14959
|
|
|
16702
14960
|
|
|
16703
14961
|
|
|
16704
|
-
function loadSlim(engine) {
|
|
16705
|
-
|
|
16706
|
-
|
|
16707
|
-
|
|
16708
|
-
|
|
16709
|
-
|
|
16710
|
-
|
|
16711
|
-
|
|
16712
|
-
|
|
16713
|
-
|
|
16714
|
-
|
|
16715
|
-
|
|
16716
|
-
|
|
16717
|
-
|
|
16718
|
-
|
|
16719
|
-
|
|
16720
|
-
|
|
16721
|
-
|
|
16722
|
-
|
|
16723
|
-
|
|
16724
|
-
|
|
16725
|
-
|
|
16726
|
-
|
|
16727
|
-
|
|
16728
|
-
|
|
16729
|
-
|
|
16730
|
-
|
|
16731
|
-
|
|
16732
|
-
|
|
16733
|
-
|
|
16734
|
-
yield initPjs(engine);
|
|
16735
|
-
});
|
|
14962
|
+
async function loadSlim(engine) {
|
|
14963
|
+
await loadBaseMover(engine);
|
|
14964
|
+
await loadParallaxMover(engine);
|
|
14965
|
+
await loadExternalAttractInteraction(engine);
|
|
14966
|
+
await loadExternalBounceInteraction(engine);
|
|
14967
|
+
await loadExternalBubbleInteraction(engine);
|
|
14968
|
+
await loadExternalConnectInteraction(engine);
|
|
14969
|
+
await loadExternalGrabInteraction(engine);
|
|
14970
|
+
await loadExternalPauseInteraction(engine);
|
|
14971
|
+
await loadExternalPushInteraction(engine);
|
|
14972
|
+
await loadExternalRemoveInteraction(engine);
|
|
14973
|
+
await loadExternalRepulseInteraction(engine);
|
|
14974
|
+
await loadParticlesAttractInteraction(engine);
|
|
14975
|
+
await loadParticlesCollisionsInteraction(engine);
|
|
14976
|
+
await loadParticlesLinksInteraction(engine);
|
|
14977
|
+
await loadCircleShape(engine);
|
|
14978
|
+
await loadImageShape(engine);
|
|
14979
|
+
await loadLineShape(engine);
|
|
14980
|
+
await loadPolygonShape(engine);
|
|
14981
|
+
await loadSquareShape(engine);
|
|
14982
|
+
await loadStarShape(engine);
|
|
14983
|
+
await loadTextShape(engine);
|
|
14984
|
+
await loadLifeUpdater(engine);
|
|
14985
|
+
await loadOpacityUpdater(engine);
|
|
14986
|
+
await loadSizeUpdater(engine);
|
|
14987
|
+
await loadAngleUpdater(engine);
|
|
14988
|
+
await loadColorUpdater(engine);
|
|
14989
|
+
await loadStrokeColorUpdater(engine);
|
|
14990
|
+
await loadOutModesUpdater(engine);
|
|
14991
|
+
await initPjs(engine);
|
|
16736
14992
|
}
|
|
16737
|
-
;// CONCATENATED MODULE: ../../updaters/tilt/dist/TiltUpdater.js
|
|
14993
|
+
;// CONCATENATED MODULE: ../../updaters/tilt/dist/esm/TiltUpdater.js
|
|
16738
14994
|
|
|
16739
14995
|
|
|
16740
14996
|
function updateTilt(particle, delta) {
|
|
@@ -16832,46 +15088,12 @@ class TiltUpdater {
|
|
|
16832
15088
|
}
|
|
16833
15089
|
|
|
16834
15090
|
}
|
|
16835
|
-
;// CONCATENATED MODULE: ../../updaters/tilt/dist/index.js
|
|
16836
|
-
var tilt_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
16837
|
-
function adopt(value) {
|
|
16838
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
16839
|
-
resolve(value);
|
|
16840
|
-
});
|
|
16841
|
-
}
|
|
16842
|
-
|
|
16843
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16844
|
-
function fulfilled(value) {
|
|
16845
|
-
try {
|
|
16846
|
-
step(generator.next(value));
|
|
16847
|
-
} catch (e) {
|
|
16848
|
-
reject(e);
|
|
16849
|
-
}
|
|
16850
|
-
}
|
|
16851
|
-
|
|
16852
|
-
function rejected(value) {
|
|
16853
|
-
try {
|
|
16854
|
-
step(generator["throw"](value));
|
|
16855
|
-
} catch (e) {
|
|
16856
|
-
reject(e);
|
|
16857
|
-
}
|
|
16858
|
-
}
|
|
16859
|
-
|
|
16860
|
-
function step(result) {
|
|
16861
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
16862
|
-
}
|
|
16863
|
-
|
|
16864
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
16865
|
-
});
|
|
16866
|
-
};
|
|
15091
|
+
;// CONCATENATED MODULE: ../../updaters/tilt/dist/esm/index.js
|
|
16867
15092
|
|
|
16868
|
-
|
|
16869
|
-
|
|
16870
|
-
return tilt_dist_awaiter(this, void 0, void 0, function* () {
|
|
16871
|
-
yield engine.addParticleUpdater("tilt", container => new TiltUpdater(container));
|
|
16872
|
-
});
|
|
15093
|
+
async function loadTiltUpdater(engine) {
|
|
15094
|
+
await engine.addParticleUpdater("tilt", container => new TiltUpdater(container));
|
|
16873
15095
|
}
|
|
16874
|
-
;// CONCATENATED MODULE: ../../updaters/twinkle/dist/TwinkleUpdater.js
|
|
15096
|
+
;// CONCATENATED MODULE: ../../updaters/twinkle/dist/esm/TwinkleUpdater.js
|
|
16875
15097
|
|
|
16876
15098
|
class TwinkleUpdater {
|
|
16877
15099
|
getColorStyles(particle, context, radius, opacity) {
|
|
@@ -16879,7 +15101,7 @@ class TwinkleUpdater {
|
|
|
16879
15101
|
twinkle = pOptions.twinkle.particles,
|
|
16880
15102
|
twinkling = twinkle.enable && Math.random() < twinkle.frequency,
|
|
16881
15103
|
zIndexOptions = particle.options.zIndex,
|
|
16882
|
-
zOpacityFactor =
|
|
15104
|
+
zOpacityFactor = (1 - particle.zIndexFactor) ** zIndexOptions.opacityRate,
|
|
16883
15105
|
twinklingOpacity = twinkling ? getRangeValue(twinkle.opacity) * zOpacityFactor : opacity,
|
|
16884
15106
|
twinkleRgb = colorToHsl(twinkle.color),
|
|
16885
15107
|
twinkleStyle = twinkleRgb ? getStyleFromHsl(twinkleRgb, twinklingOpacity) : undefined,
|
|
@@ -16899,46 +15121,12 @@ class TwinkleUpdater {
|
|
|
16899
15121
|
update() {}
|
|
16900
15122
|
|
|
16901
15123
|
}
|
|
16902
|
-
;// CONCATENATED MODULE: ../../updaters/twinkle/dist/index.js
|
|
16903
|
-
var twinkle_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
16904
|
-
function adopt(value) {
|
|
16905
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
16906
|
-
resolve(value);
|
|
16907
|
-
});
|
|
16908
|
-
}
|
|
16909
|
-
|
|
16910
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16911
|
-
function fulfilled(value) {
|
|
16912
|
-
try {
|
|
16913
|
-
step(generator.next(value));
|
|
16914
|
-
} catch (e) {
|
|
16915
|
-
reject(e);
|
|
16916
|
-
}
|
|
16917
|
-
}
|
|
16918
|
-
|
|
16919
|
-
function rejected(value) {
|
|
16920
|
-
try {
|
|
16921
|
-
step(generator["throw"](value));
|
|
16922
|
-
} catch (e) {
|
|
16923
|
-
reject(e);
|
|
16924
|
-
}
|
|
16925
|
-
}
|
|
16926
|
-
|
|
16927
|
-
function step(result) {
|
|
16928
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
16929
|
-
}
|
|
16930
|
-
|
|
16931
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
16932
|
-
});
|
|
16933
|
-
};
|
|
15124
|
+
;// CONCATENATED MODULE: ../../updaters/twinkle/dist/esm/index.js
|
|
16934
15125
|
|
|
16935
|
-
|
|
16936
|
-
|
|
16937
|
-
return twinkle_dist_awaiter(this, void 0, void 0, function* () {
|
|
16938
|
-
yield engine.addParticleUpdater("twinkle", () => new TwinkleUpdater());
|
|
16939
|
-
});
|
|
15126
|
+
async function loadTwinkleUpdater(engine) {
|
|
15127
|
+
await engine.addParticleUpdater("twinkle", () => new TwinkleUpdater());
|
|
16940
15128
|
}
|
|
16941
|
-
;// CONCATENATED MODULE: ../../updaters/wobble/dist/WobbleUpdater.js
|
|
15129
|
+
;// CONCATENATED MODULE: ../../updaters/wobble/dist/esm/WobbleUpdater.js
|
|
16942
15130
|
|
|
16943
15131
|
|
|
16944
15132
|
function updateWobble(particle, delta) {
|
|
@@ -16999,77 +15187,12 @@ class WobbleUpdater {
|
|
|
16999
15187
|
}
|
|
17000
15188
|
|
|
17001
15189
|
}
|
|
17002
|
-
;// CONCATENATED MODULE: ../../updaters/wobble/dist/index.js
|
|
17003
|
-
var wobble_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
17004
|
-
function adopt(value) {
|
|
17005
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
17006
|
-
resolve(value);
|
|
17007
|
-
});
|
|
17008
|
-
}
|
|
17009
|
-
|
|
17010
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17011
|
-
function fulfilled(value) {
|
|
17012
|
-
try {
|
|
17013
|
-
step(generator.next(value));
|
|
17014
|
-
} catch (e) {
|
|
17015
|
-
reject(e);
|
|
17016
|
-
}
|
|
17017
|
-
}
|
|
17018
|
-
|
|
17019
|
-
function rejected(value) {
|
|
17020
|
-
try {
|
|
17021
|
-
step(generator["throw"](value));
|
|
17022
|
-
} catch (e) {
|
|
17023
|
-
reject(e);
|
|
17024
|
-
}
|
|
17025
|
-
}
|
|
17026
|
-
|
|
17027
|
-
function step(result) {
|
|
17028
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
17029
|
-
}
|
|
17030
|
-
|
|
17031
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
17032
|
-
});
|
|
17033
|
-
};
|
|
17034
|
-
|
|
15190
|
+
;// CONCATENATED MODULE: ../../updaters/wobble/dist/esm/index.js
|
|
17035
15191
|
|
|
17036
|
-
function loadWobbleUpdater(engine) {
|
|
17037
|
-
|
|
17038
|
-
yield engine.addParticleUpdater("wobble", container => new WobbleUpdater(container));
|
|
17039
|
-
});
|
|
15192
|
+
async function loadWobbleUpdater(engine) {
|
|
15193
|
+
await engine.addParticleUpdater("wobble", container => new WobbleUpdater(container));
|
|
17040
15194
|
}
|
|
17041
|
-
;// CONCATENATED MODULE: ./dist/index.js
|
|
17042
|
-
var dist_awaiter_0 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
17043
|
-
function adopt(value) {
|
|
17044
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
17045
|
-
resolve(value);
|
|
17046
|
-
});
|
|
17047
|
-
}
|
|
17048
|
-
|
|
17049
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17050
|
-
function fulfilled(value) {
|
|
17051
|
-
try {
|
|
17052
|
-
step(generator.next(value));
|
|
17053
|
-
} catch (e) {
|
|
17054
|
-
reject(e);
|
|
17055
|
-
}
|
|
17056
|
-
}
|
|
17057
|
-
|
|
17058
|
-
function rejected(value) {
|
|
17059
|
-
try {
|
|
17060
|
-
step(generator["throw"](value));
|
|
17061
|
-
} catch (e) {
|
|
17062
|
-
reject(e);
|
|
17063
|
-
}
|
|
17064
|
-
}
|
|
17065
|
-
|
|
17066
|
-
function step(result) {
|
|
17067
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
17068
|
-
}
|
|
17069
|
-
|
|
17070
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
17071
|
-
});
|
|
17072
|
-
};
|
|
15195
|
+
;// CONCATENATED MODULE: ./dist/browser/index.js
|
|
17073
15196
|
|
|
17074
15197
|
|
|
17075
15198
|
|
|
@@ -17079,21 +15202,18 @@ var dist_awaiter_0 = undefined && undefined.__awaiter || function (thisArg, _arg
|
|
|
17079
15202
|
|
|
17080
15203
|
|
|
17081
15204
|
|
|
17082
|
-
|
|
17083
|
-
|
|
17084
|
-
|
|
17085
|
-
|
|
17086
|
-
|
|
17087
|
-
|
|
17088
|
-
|
|
17089
|
-
|
|
17090
|
-
|
|
17091
|
-
|
|
17092
|
-
yield loadEmittersPlugin(engine);
|
|
17093
|
-
yield loadPolygonMaskPlugin(engine);
|
|
17094
|
-
});
|
|
15205
|
+
async function loadFull(engine) {
|
|
15206
|
+
await loadSlim(engine);
|
|
15207
|
+
await loadRollUpdater(engine);
|
|
15208
|
+
await loadTiltUpdater(engine);
|
|
15209
|
+
await loadTwinkleUpdater(engine);
|
|
15210
|
+
await loadWobbleUpdater(engine);
|
|
15211
|
+
await loadExternalTrailInteraction(engine);
|
|
15212
|
+
await loadAbsorbersPlugin(engine);
|
|
15213
|
+
await loadEmittersPlugin(engine);
|
|
15214
|
+
await loadPolygonMaskPlugin(engine);
|
|
17095
15215
|
}
|
|
17096
|
-
;// CONCATENATED MODULE: ./dist/bundle.js
|
|
15216
|
+
;// CONCATENATED MODULE: ./dist/browser/bundle.js
|
|
17097
15217
|
|
|
17098
15218
|
|
|
17099
15219
|
loadFull(tsParticles);
|