@tsparticles/preset-confetti-cannon 4.1.2 → 4.1.3
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(g){g.__tsParticlesInternals=g.__tsParticlesInternals||{};g.__tsParticlesInternals.bundles=g.__tsParticlesInternals.bundles||{};g.__tsParticlesInternals.effects=g.__tsParticlesInternals.effects||{};g.__tsParticlesInternals.engine=g.__tsParticlesInternals.engine||{};g.__tsParticlesInternals.interactions=g.__tsParticlesInternals.interactions||{};g.__tsParticlesInternals.palettes=g.__tsParticlesInternals.palettes||{};g.__tsParticlesInternals.paths=g.__tsParticlesInternals.paths||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins.emittersShapes=g.__tsParticlesInternals.plugins.emittersShapes||{};g.__tsParticlesInternals.presets=g.__tsParticlesInternals.presets||{};g.__tsParticlesInternals.shapes=g.__tsParticlesInternals.shapes||{};g.__tsParticlesInternals.updaters=g.__tsParticlesInternals.updaters||{};g.__tsParticlesInternals.utils=g.__tsParticlesInternals.utils||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas.utils=g.__tsParticlesInternals.canvas.utils||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path.utils=g.__tsParticlesInternals.path.utils||{};var __tsProxyFactory=typeof Proxy!=="undefined"?function(obj){return new Proxy(obj,{get:function(target,key){if(!(key in target)){target[key]={};}return target[key];}});}:function(obj){return obj;};g.__tsParticlesInternals.bundles=__tsProxyFactory(g.__tsParticlesInternals.bundles);g.__tsParticlesInternals.effects=__tsProxyFactory(g.__tsParticlesInternals.effects);g.__tsParticlesInternals.interactions=__tsProxyFactory(g.__tsParticlesInternals.interactions);g.__tsParticlesInternals.palettes=__tsProxyFactory(g.__tsParticlesInternals.palettes);g.__tsParticlesInternals.paths=__tsProxyFactory(g.__tsParticlesInternals.paths);g.__tsParticlesInternals.plugins=__tsProxyFactory(g.__tsParticlesInternals.plugins);g.__tsParticlesInternals.plugins.emittersShapes=__tsProxyFactory(g.__tsParticlesInternals.plugins.emittersShapes);g.__tsParticlesInternals.presets=__tsProxyFactory(g.__tsParticlesInternals.presets);g.__tsParticlesInternals.shapes=__tsProxyFactory(g.__tsParticlesInternals.shapes);g.__tsParticlesInternals.updaters=__tsProxyFactory(g.__tsParticlesInternals.updaters);g.__tsParticlesInternals.utils=__tsProxyFactory(g.__tsParticlesInternals.utils);g.__tsParticlesInternals.canvas=__tsProxyFactory(g.__tsParticlesInternals.canvas);g.__tsParticlesInternals.path=__tsProxyFactory(g.__tsParticlesInternals.path);g.tsparticlesInternalExports=g.tsparticlesInternalExports||{};})(typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:this);
|
|
2
|
-
/* Preset v4.1.
|
|
2
|
+
/* Preset v4.1.3 */
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
5
5
|
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
@@ -1008,7 +1008,7 @@
|
|
|
1008
1008
|
return this.#domArray;
|
|
1009
1009
|
}
|
|
1010
1010
|
get version() {
|
|
1011
|
-
return "4.1.
|
|
1011
|
+
return "4.1.3";
|
|
1012
1012
|
}
|
|
1013
1013
|
addEventListener(type, listener) {
|
|
1014
1014
|
this.#eventDispatcher.addEventListener(type, listener);
|
|
@@ -2801,7 +2801,7 @@
|
|
|
2801
2801
|
}
|
|
2802
2802
|
|
|
2803
2803
|
async function loadBlendPlugin(engine) {
|
|
2804
|
-
engine.checkVersion("4.1.
|
|
2804
|
+
engine.checkVersion("4.1.3");
|
|
2805
2805
|
await engine.pluginManager.register(e => {
|
|
2806
2806
|
e.pluginManager.addPlugin(new BlendPlugin());
|
|
2807
2807
|
});
|
|
@@ -2838,7 +2838,7 @@
|
|
|
2838
2838
|
}
|
|
2839
2839
|
|
|
2840
2840
|
async function loadCircleShape(engine) {
|
|
2841
|
-
engine.checkVersion("4.1.
|
|
2841
|
+
engine.checkVersion("4.1.3");
|
|
2842
2842
|
await engine.pluginManager.register(e => {
|
|
2843
2843
|
e.pluginManager.addShape(["circle"], () => {
|
|
2844
2844
|
return Promise.resolve(new CircleDrawer());
|
|
@@ -2886,7 +2886,7 @@
|
|
|
2886
2886
|
}
|
|
2887
2887
|
|
|
2888
2888
|
async function loadHexColorPlugin(engine) {
|
|
2889
|
-
engine.checkVersion("4.1.
|
|
2889
|
+
engine.checkVersion("4.1.3");
|
|
2890
2890
|
await engine.pluginManager.register(e => {
|
|
2891
2891
|
e.pluginManager.addColorManager("hex", new HexColorManager());
|
|
2892
2892
|
});
|
|
@@ -2939,7 +2939,7 @@
|
|
|
2939
2939
|
}
|
|
2940
2940
|
|
|
2941
2941
|
async function loadHslColorPlugin(engine) {
|
|
2942
|
-
engine.checkVersion("4.1.
|
|
2942
|
+
engine.checkVersion("4.1.3");
|
|
2943
2943
|
await engine.pluginManager.register(e => {
|
|
2944
2944
|
e.pluginManager.addColorManager("hsl", new HslColorManager());
|
|
2945
2945
|
});
|
|
@@ -2963,7 +2963,7 @@
|
|
|
2963
2963
|
}
|
|
2964
2964
|
|
|
2965
2965
|
async function loadMovePlugin(engine) {
|
|
2966
|
-
engine.checkVersion("4.1.
|
|
2966
|
+
engine.checkVersion("4.1.3");
|
|
2967
2967
|
await engine.pluginManager.register(e => {
|
|
2968
2968
|
const moveEngine = e, movePluginManager = moveEngine.pluginManager;
|
|
2969
2969
|
movePluginManager.initializers.pathGenerators ??= new Map();
|
|
@@ -3070,7 +3070,7 @@
|
|
|
3070
3070
|
}
|
|
3071
3071
|
|
|
3072
3072
|
async function loadOpacityUpdater(engine) {
|
|
3073
|
-
engine.checkVersion("4.1.
|
|
3073
|
+
engine.checkVersion("4.1.3");
|
|
3074
3074
|
await engine.pluginManager.register(e => {
|
|
3075
3075
|
e.pluginManager.addParticleUpdater("opacity", container => {
|
|
3076
3076
|
return Promise.resolve(new OpacityUpdater(container));
|
|
@@ -3417,7 +3417,7 @@
|
|
|
3417
3417
|
}
|
|
3418
3418
|
|
|
3419
3419
|
async function loadOutModesUpdater(engine) {
|
|
3420
|
-
engine.checkVersion("4.1.
|
|
3420
|
+
engine.checkVersion("4.1.3");
|
|
3421
3421
|
await engine.pluginManager.register(e => {
|
|
3422
3422
|
e.pluginManager.addParticleUpdater("outModes", container => {
|
|
3423
3423
|
return Promise.resolve(new OutOfCanvasUpdater(container));
|
|
@@ -3488,7 +3488,7 @@
|
|
|
3488
3488
|
}
|
|
3489
3489
|
|
|
3490
3490
|
async function loadPaintUpdater(engine) {
|
|
3491
|
-
engine.checkVersion("4.1.
|
|
3491
|
+
engine.checkVersion("4.1.3");
|
|
3492
3492
|
await engine.pluginManager.register(e => {
|
|
3493
3493
|
e.pluginManager.addParticleUpdater("paint", container => {
|
|
3494
3494
|
return Promise.resolve(new PaintUpdater(e.pluginManager, container));
|
|
@@ -3543,7 +3543,7 @@
|
|
|
3543
3543
|
}
|
|
3544
3544
|
|
|
3545
3545
|
async function loadRgbColorPlugin(engine) {
|
|
3546
|
-
engine.checkVersion("4.1.
|
|
3546
|
+
engine.checkVersion("4.1.3");
|
|
3547
3547
|
await engine.pluginManager.register(e => {
|
|
3548
3548
|
e.pluginManager.addColorManager("rgb", new RgbColorManager());
|
|
3549
3549
|
});
|
|
@@ -3642,7 +3642,7 @@
|
|
|
3642
3642
|
}
|
|
3643
3643
|
|
|
3644
3644
|
async function loadSizeUpdater(engine) {
|
|
3645
|
-
engine.checkVersion("4.1.
|
|
3645
|
+
engine.checkVersion("4.1.3");
|
|
3646
3646
|
await engine.pluginManager.register(e => {
|
|
3647
3647
|
e.pluginManager.addParticleUpdater("size", container => {
|
|
3648
3648
|
return Promise.resolve(new SizeUpdater(container));
|
|
@@ -3651,7 +3651,7 @@
|
|
|
3651
3651
|
}
|
|
3652
3652
|
|
|
3653
3653
|
async function loadBasic(engine) {
|
|
3654
|
-
engine.checkVersion("4.1.
|
|
3654
|
+
engine.checkVersion("4.1.3");
|
|
3655
3655
|
await engine.pluginManager.register(async (e) => {
|
|
3656
3656
|
await Promise.all([
|
|
3657
3657
|
loadBlendPlugin(e),
|
|
@@ -3919,7 +3919,7 @@
|
|
|
3919
3919
|
const clickEvent = "click", mouseDownEvent = "pointerdown", mouseUpEvent = "pointerup", mouseLeaveEvent = "pointerleave", mouseMoveEvent = "pointermove", touchStartEvent = "touchstart", touchEndEvent = "touchend", touchMoveEvent = "touchmove", touchCancelEvent = "touchcancel";
|
|
3920
3920
|
|
|
3921
3921
|
async function loadInteractivityPlugin(engine) {
|
|
3922
|
-
engine.checkVersion("4.1.
|
|
3922
|
+
engine.checkVersion("4.1.3");
|
|
3923
3923
|
await engine.pluginManager.register(e => {
|
|
3924
3924
|
const interactivityEngine = e, interactivityPluginManager = interactivityEngine.pluginManager;
|
|
3925
3925
|
interactivityPluginManager.addPlugin(new InteractivityPlugin(interactivityPluginManager));
|
|
@@ -4127,7 +4127,7 @@
|
|
|
4127
4127
|
}
|
|
4128
4128
|
|
|
4129
4129
|
async function loadExternalCannonInteraction(engine) {
|
|
4130
|
-
engine.checkVersion("4.1.
|
|
4130
|
+
engine.checkVersion("4.1.3");
|
|
4131
4131
|
await engine.pluginManager.register((e) => {
|
|
4132
4132
|
ensureInteractivityPluginLoaded(e);
|
|
4133
4133
|
e.pluginManager.addInteractor?.("externalCannon", container => {
|
|
@@ -4295,7 +4295,7 @@
|
|
|
4295
4295
|
}
|
|
4296
4296
|
|
|
4297
4297
|
async function loadLifeUpdater(engine) {
|
|
4298
|
-
engine.checkVersion("4.1.
|
|
4298
|
+
engine.checkVersion("4.1.3");
|
|
4299
4299
|
await engine.pluginManager.register(e => {
|
|
4300
4300
|
e.pluginManager.addParticleUpdater("life", container => {
|
|
4301
4301
|
return Promise.resolve(new LifeUpdater(container));
|
|
@@ -4363,7 +4363,7 @@
|
|
|
4363
4363
|
}
|
|
4364
4364
|
|
|
4365
4365
|
async function loadMotionPlugin(engine) {
|
|
4366
|
-
engine.checkVersion("4.1.
|
|
4366
|
+
engine.checkVersion("4.1.3");
|
|
4367
4367
|
await engine.pluginManager.register(e => {
|
|
4368
4368
|
e.pluginManager.addPlugin(new MotionPlugin());
|
|
4369
4369
|
});
|
|
@@ -4520,7 +4520,7 @@
|
|
|
4520
4520
|
}
|
|
4521
4521
|
|
|
4522
4522
|
async function loadRollUpdater(engine) {
|
|
4523
|
-
engine.checkVersion("4.1.
|
|
4523
|
+
engine.checkVersion("4.1.3");
|
|
4524
4524
|
await engine.pluginManager.register(e => {
|
|
4525
4525
|
e.pluginManager.addParticleUpdater("roll", () => {
|
|
4526
4526
|
return Promise.resolve(new RollUpdater(e.pluginManager));
|
|
@@ -4654,7 +4654,7 @@
|
|
|
4654
4654
|
}
|
|
4655
4655
|
|
|
4656
4656
|
async function loadRotateUpdater(engine) {
|
|
4657
|
-
engine.checkVersion("4.1.
|
|
4657
|
+
engine.checkVersion("4.1.3");
|
|
4658
4658
|
await engine.pluginManager.register(e => {
|
|
4659
4659
|
e.pluginManager.addParticleUpdater("rotate", container => {
|
|
4660
4660
|
return Promise.resolve(new RotateUpdater(container));
|
|
@@ -4678,7 +4678,7 @@
|
|
|
4678
4678
|
}
|
|
4679
4679
|
|
|
4680
4680
|
async function loadSquareShape(engine) {
|
|
4681
|
-
engine.checkVersion("4.1.
|
|
4681
|
+
engine.checkVersion("4.1.3");
|
|
4682
4682
|
await engine.pluginManager.register(e => {
|
|
4683
4683
|
e.pluginManager.addShape(["edge", "square"], () => Promise.resolve(new SquareDrawer()));
|
|
4684
4684
|
});
|
|
@@ -4815,7 +4815,7 @@
|
|
|
4815
4815
|
}
|
|
4816
4816
|
|
|
4817
4817
|
async function loadTiltUpdater(engine) {
|
|
4818
|
-
engine.checkVersion("4.1.
|
|
4818
|
+
engine.checkVersion("4.1.3");
|
|
4819
4819
|
await engine.pluginManager.register(e => {
|
|
4820
4820
|
e.pluginManager.addParticleUpdater("tilt", container => {
|
|
4821
4821
|
return Promise.resolve(new TiltUpdater(container));
|
|
@@ -4937,7 +4937,7 @@
|
|
|
4937
4937
|
}
|
|
4938
4938
|
|
|
4939
4939
|
async function loadWobbleUpdater(engine) {
|
|
4940
|
-
engine.checkVersion("4.1.
|
|
4940
|
+
engine.checkVersion("4.1.3");
|
|
4941
4941
|
await engine.pluginManager.register(e => {
|
|
4942
4942
|
e.pluginManager.addParticleUpdater("wobble", container => {
|
|
4943
4943
|
return Promise.resolve(new WobbleUpdater(container));
|
|
@@ -6000,19 +6000,25 @@
|
|
|
6000
6000
|
this.shape = itemFromSingleOrMultiple(shapeType, this.id, reduceDuplicates);
|
|
6001
6001
|
const effectOptions = particlesOptions.effect, shapeOptions = particlesOptions.shape;
|
|
6002
6002
|
if (overrideOptions) {
|
|
6003
|
-
if (overrideOptions.effect
|
|
6004
|
-
const overrideEffectType = overrideOptions.effect.type
|
|
6005
|
-
if (effect) {
|
|
6006
|
-
|
|
6007
|
-
|
|
6003
|
+
if (overrideOptions.effect) {
|
|
6004
|
+
const overrideEffectType = overrideOptions.effect.type;
|
|
6005
|
+
if (overrideEffectType && overrideEffectType !== this.effect) {
|
|
6006
|
+
const effect = itemFromSingleOrMultiple(overrideEffectType, this.id, reduceDuplicates);
|
|
6007
|
+
if (effect) {
|
|
6008
|
+
this.effect = effect;
|
|
6009
|
+
}
|
|
6008
6010
|
}
|
|
6009
|
-
|
|
6010
|
-
|
|
6011
|
-
|
|
6012
|
-
|
|
6013
|
-
|
|
6014
|
-
|
|
6011
|
+
effectOptions.load(overrideOptions.effect);
|
|
6012
|
+
}
|
|
6013
|
+
if (overrideOptions.shape) {
|
|
6014
|
+
const overrideShapeType = overrideOptions.shape.type;
|
|
6015
|
+
if (overrideShapeType && overrideShapeType !== this.shape) {
|
|
6016
|
+
const shape = itemFromSingleOrMultiple(overrideShapeType, this.id, reduceDuplicates);
|
|
6017
|
+
if (shape) {
|
|
6018
|
+
this.shape = shape;
|
|
6019
|
+
}
|
|
6015
6020
|
}
|
|
6021
|
+
shapeOptions.load(overrideOptions.shape);
|
|
6016
6022
|
}
|
|
6017
6023
|
}
|
|
6018
6024
|
if (this.effect === randomColorValue) {
|