@tsparticles/engine 4.0.0-beta.1 → 4.0.0-beta.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.
- package/browser/Core/Container.js +3 -0
- package/browser/Core/Engine.js +1 -1
- package/browser/Core/Interfaces/IPositionFromSizeParams.js +1 -1
- package/browser/Core/ParticlesManager.js +1 -0
- package/cjs/Core/Container.js +3 -0
- package/cjs/Core/Engine.js +1 -1
- package/cjs/Core/Interfaces/IPositionFromSizeParams.js +1 -1
- package/cjs/Core/ParticlesManager.js +1 -0
- package/dist_browser_Core_Container_js.js +3 -3
- package/esm/Core/Container.js +3 -0
- package/esm/Core/Engine.js +1 -1
- package/esm/Core/Interfaces/IPositionFromSizeParams.js +1 -1
- package/esm/Core/ParticlesManager.js +1 -0
- package/package.json +2 -3
- package/report.html +1 -1
- package/tsparticles.engine.js +2 -2
- package/tsparticles.engine.min.js +1 -1
- package/umd/Core/CanvasManager.js +0 -317
- package/umd/Core/Container.js +0 -383
- package/umd/Core/Engine.js +0 -183
- package/umd/Core/Interfaces/Colors.js +0 -12
- package/umd/Core/Interfaces/IBounds.js +0 -12
- package/umd/Core/Interfaces/IBubbleParticleData.js +0 -12
- package/umd/Core/Interfaces/ICircleBouncer.js +0 -12
- package/umd/Core/Interfaces/IColorManager.js +0 -12
- package/umd/Core/Interfaces/IContainerPlugin.js +0 -12
- package/umd/Core/Interfaces/ICoordinates.js +0 -12
- package/umd/Core/Interfaces/IDelta.js +0 -12
- package/umd/Core/Interfaces/IDimension.js +0 -12
- package/umd/Core/Interfaces/IDistance.js +0 -12
- package/umd/Core/Interfaces/IDrawParticleParams.js +0 -12
- package/umd/Core/Interfaces/IEffectDrawer.js +0 -12
- package/umd/Core/Interfaces/ILoadParams.js +0 -12
- package/umd/Core/Interfaces/IPalette.js +0 -12
- package/umd/Core/Interfaces/IParticleColorStyle.js +0 -12
- package/umd/Core/Interfaces/IParticleHslAnimation.js +0 -12
- package/umd/Core/Interfaces/IParticleLife.js +0 -12
- package/umd/Core/Interfaces/IParticleOpacityData.js +0 -12
- package/umd/Core/Interfaces/IParticleRetinaProps.js +0 -12
- package/umd/Core/Interfaces/IParticleRoll.js +0 -12
- package/umd/Core/Interfaces/IParticleRotateData.js +0 -12
- package/umd/Core/Interfaces/IParticleTransformValues.js +0 -12
- package/umd/Core/Interfaces/IParticleUpdater.js +0 -12
- package/umd/Core/Interfaces/IParticleValueAnimation.js +0 -12
- package/umd/Core/Interfaces/IPlugin.js +0 -12
- package/umd/Core/Interfaces/IPositionFromSizeParams.js +0 -12
- package/umd/Core/Interfaces/IRangeValue.js +0 -12
- package/umd/Core/Interfaces/IShapeDrawData.js +0 -12
- package/umd/Core/Interfaces/IShapeDrawer.js +0 -12
- package/umd/Core/Interfaces/IShapeValues.js +0 -12
- package/umd/Core/Interfaces/ISlowParticleData.js +0 -12
- package/umd/Core/Particle.js +0 -433
- package/umd/Core/ParticlesManager.js +0 -377
- package/umd/Core/RenderManager.js +0 -317
- package/umd/Core/Retina.js +0 -47
- package/umd/Core/Utils/Constants.js +0 -23
- package/umd/Core/Utils/EventListeners.js +0 -102
- package/umd/Core/Utils/PluginManager.js +0 -159
- package/umd/Core/Utils/Ranges.js +0 -91
- package/umd/Core/Utils/SpatialHashGrid.js +0 -116
- package/umd/Core/Utils/Vectors.js +0 -126
- package/umd/Enums/AnimationStatus.js +0 -18
- package/umd/Enums/Directions/MoveDirection.js +0 -27
- package/umd/Enums/Directions/OutModeDirection.js +0 -20
- package/umd/Enums/Directions/RotateDirection.js +0 -19
- package/umd/Enums/Modes/AnimationMode.js +0 -20
- package/umd/Enums/Modes/LimitMode.js +0 -18
- package/umd/Enums/Modes/OutMode.js +0 -21
- package/umd/Enums/Modes/PixelMode.js +0 -18
- package/umd/Enums/RangeType.js +0 -18
- package/umd/Enums/Types/AlterType.js +0 -18
- package/umd/Enums/Types/DestroyType.js +0 -19
- package/umd/Enums/Types/EasingType.js +0 -58
- package/umd/Enums/Types/EventType.js +0 -28
- package/umd/Enums/Types/GradientType.js +0 -19
- package/umd/Enums/Types/ParticleOutType.js +0 -19
- package/umd/Enums/Types/StartValueType.js +0 -19
- package/umd/Options/Classes/AnimatableColor.js +0 -52
- package/umd/Options/Classes/AnimationOptions.js +0 -79
- package/umd/Options/Classes/Background/Background.js +0 -56
- package/umd/Options/Classes/ColorAnimation.js +0 -44
- package/umd/Options/Classes/FullScreen/FullScreen.js +0 -34
- package/umd/Options/Classes/HslAnimation.js +0 -30
- package/umd/Options/Classes/Options.js +0 -171
- package/umd/Options/Classes/OptionsColor.js +0 -42
- package/umd/Options/Classes/Particles/Bounce/ParticlesBounce.js +0 -31
- package/umd/Options/Classes/Particles/Bounce/ParticlesBounceFactor.js +0 -21
- package/umd/Options/Classes/Particles/Effect/Effect.js +0 -46
- package/umd/Options/Classes/Particles/Fill.js +0 -42
- package/umd/Options/Classes/Particles/Move/Move.js +0 -120
- package/umd/Options/Classes/Particles/Move/MoveAngle.js +0 -35
- package/umd/Options/Classes/Particles/Move/MoveCenter.js +0 -45
- package/umd/Options/Classes/Particles/Move/MoveGravity.js +0 -45
- package/umd/Options/Classes/Particles/Move/OutModes.js +0 -38
- package/umd/Options/Classes/Particles/Move/Path/MovePath.js +0 -46
- package/umd/Options/Classes/Particles/Move/Spin.js +0 -40
- package/umd/Options/Classes/Particles/Number/ParticlesDensity.js +0 -41
- package/umd/Options/Classes/Particles/Number/ParticlesNumber.js +0 -37
- package/umd/Options/Classes/Particles/Number/ParticlesNumberLimit.js +0 -35
- package/umd/Options/Classes/Particles/Opacity/Opacity.js +0 -35
- package/umd/Options/Classes/Particles/Opacity/OpacityAnimation.js +0 -34
- package/umd/Options/Classes/Particles/ParticlesOptions.js +0 -116
- package/umd/Options/Classes/Particles/Shape/Shape.js +0 -46
- package/umd/Options/Classes/Particles/Size/Size.js +0 -35
- package/umd/Options/Classes/Particles/Size/SizeAnimation.js +0 -34
- package/umd/Options/Classes/Particles/Stroke.js +0 -39
- package/umd/Options/Classes/Particles/ZIndex/ZIndex.js +0 -42
- package/umd/Options/Classes/ResizeEvent.js +0 -34
- package/umd/Options/Classes/ValueWithRandom.js +0 -56
- package/umd/Options/Interfaces/Background/IBackground.js +0 -12
- package/umd/Options/Interfaces/FullScreen/IFullScreen.js +0 -12
- package/umd/Options/Interfaces/IAnimatable.js +0 -12
- package/umd/Options/Interfaces/IAnimatableColor.js +0 -12
- package/umd/Options/Interfaces/IAnimation.js +0 -12
- package/umd/Options/Interfaces/IColorAnimation.js +0 -12
- package/umd/Options/Interfaces/IHslAnimation.js +0 -12
- package/umd/Options/Interfaces/IOptionLoader.js +0 -12
- package/umd/Options/Interfaces/IOptions.js +0 -12
- package/umd/Options/Interfaces/IOptionsColor.js +0 -12
- package/umd/Options/Interfaces/IResizeEvent.js +0 -12
- package/umd/Options/Interfaces/IValueWithRandom.js +0 -12
- package/umd/Options/Interfaces/Particles/Bounce/IParticlesBounce.js +0 -12
- package/umd/Options/Interfaces/Particles/Effect/IEffect.js +0 -12
- package/umd/Options/Interfaces/Particles/IFill.js +0 -12
- package/umd/Options/Interfaces/Particles/IParticlesOptions.js +0 -12
- package/umd/Options/Interfaces/Particles/IStroke.js +0 -12
- package/umd/Options/Interfaces/Particles/Move/IMove.js +0 -12
- package/umd/Options/Interfaces/Particles/Move/IMoveAngle.js +0 -12
- package/umd/Options/Interfaces/Particles/Move/IMoveCenter.js +0 -12
- package/umd/Options/Interfaces/Particles/Move/IMoveGravity.js +0 -12
- package/umd/Options/Interfaces/Particles/Move/IOutModes.js +0 -12
- package/umd/Options/Interfaces/Particles/Move/ISpin.js +0 -12
- package/umd/Options/Interfaces/Particles/Move/Path/IMovePath.js +0 -12
- package/umd/Options/Interfaces/Particles/Number/IParticlesDensity.js +0 -12
- package/umd/Options/Interfaces/Particles/Number/IParticlesNumber.js +0 -12
- package/umd/Options/Interfaces/Particles/Number/IParticlesNumberLimit.js +0 -12
- package/umd/Options/Interfaces/Particles/Opacity/IOpacity.js +0 -12
- package/umd/Options/Interfaces/Particles/Opacity/IOpacityAnimation.js +0 -12
- package/umd/Options/Interfaces/Particles/Shape/IShape.js +0 -12
- package/umd/Options/Interfaces/Particles/Size/ISize.js +0 -12
- package/umd/Options/Interfaces/Particles/Size/ISizeAnimation.js +0 -12
- package/umd/Options/Interfaces/Particles/ZIndex/IZIndex.js +0 -12
- package/umd/Types/CanvasContextType.js +0 -12
- package/umd/Types/CustomEventArgs.js +0 -12
- package/umd/Types/CustomEventListener.js +0 -12
- package/umd/Types/EasingFunction.js +0 -12
- package/umd/Types/EngineInitializers.js +0 -12
- package/umd/Types/ExportResult.js +0 -12
- package/umd/Types/ISourceOptions.js +0 -12
- package/umd/Types/ParticlesGroups.js +0 -12
- package/umd/Types/PathOptions.js +0 -12
- package/umd/Types/RangeValue.js +0 -12
- package/umd/Types/RecursivePartial.js +0 -12
- package/umd/Types/ShapeData.js +0 -12
- package/umd/Types/SingleOrMultiple.js +0 -12
- package/umd/Utils/CanvasUtils.js +0 -145
- package/umd/Utils/ColorUtils.js +0 -395
- package/umd/Utils/EventDispatcher.js +0 -63
- package/umd/Utils/LogUtils.js +0 -37
- package/umd/Utils/MathUtils.js +0 -203
- package/umd/Utils/OptionsUtils.js +0 -25
- package/umd/Utils/TypeUtils.js +0 -40
- package/umd/Utils/Utils.js +0 -484
- package/umd/bundle.js +0 -32
- package/umd/export-types.js +0 -12
- package/umd/exports.js +0 -82
- package/umd/index.js +0 -32
- package/umd/initEngine.js +0 -17
package/umd/Utils/Utils.js
DELETED
|
@@ -1,484 +0,0 @@
|
|
|
1
|
-
(function (factory) {
|
|
2
|
-
if (typeof module === "object" && typeof module.exports === "object") {
|
|
3
|
-
var v = factory(require, exports);
|
|
4
|
-
if (v !== undefined) module.exports = v;
|
|
5
|
-
}
|
|
6
|
-
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports", "./MathUtils.js", "../Core/Utils/Constants.js", "./TypeUtils.js", "../Enums/Modes/AnimationMode.js", "../Enums/AnimationStatus.js", "../Enums/Types/DestroyType.js", "../Enums/Directions/OutModeDirection.js", "../Enums/Modes/PixelMode.js", "../Enums/Types/StartValueType.js", "../Core/Utils/Vectors.js"], factory);
|
|
8
|
-
}
|
|
9
|
-
})(function (require, exports) {
|
|
10
|
-
"use strict";
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.getFullScreenStyle = void 0;
|
|
13
|
-
exports.memoize = memoize;
|
|
14
|
-
exports.hasMatchMedia = hasMatchMedia;
|
|
15
|
-
exports.safeDocument = safeDocument;
|
|
16
|
-
exports.safeMatchMedia = safeMatchMedia;
|
|
17
|
-
exports.safeIntersectionObserver = safeIntersectionObserver;
|
|
18
|
-
exports.safeMutationObserver = safeMutationObserver;
|
|
19
|
-
exports.isInArray = isInArray;
|
|
20
|
-
exports.arrayRandomIndex = arrayRandomIndex;
|
|
21
|
-
exports.itemFromArray = itemFromArray;
|
|
22
|
-
exports.isPointInside = isPointInside;
|
|
23
|
-
exports.areBoundsInside = areBoundsInside;
|
|
24
|
-
exports.calculateBounds = calculateBounds;
|
|
25
|
-
exports.deepExtend = deepExtend;
|
|
26
|
-
exports.circleBounceDataFromParticle = circleBounceDataFromParticle;
|
|
27
|
-
exports.circleBounce = circleBounce;
|
|
28
|
-
exports.executeOnSingleOrMultiple = executeOnSingleOrMultiple;
|
|
29
|
-
exports.itemFromSingleOrMultiple = itemFromSingleOrMultiple;
|
|
30
|
-
exports.findItemFromSingleOrMultiple = findItemFromSingleOrMultiple;
|
|
31
|
-
exports.initParticleNumericAnimationValue = initParticleNumericAnimationValue;
|
|
32
|
-
exports.getPosition = getPosition;
|
|
33
|
-
exports.getSize = getSize;
|
|
34
|
-
exports.updateAnimation = updateAnimation;
|
|
35
|
-
exports.cloneStyle = cloneStyle;
|
|
36
|
-
exports.manageListener = manageListener;
|
|
37
|
-
exports.getItemsFromInitializer = getItemsFromInitializer;
|
|
38
|
-
exports.getItemMapFromInitializer = getItemMapFromInitializer;
|
|
39
|
-
const MathUtils_js_1 = require("./MathUtils.js");
|
|
40
|
-
const Constants_js_1 = require("../Core/Utils/Constants.js");
|
|
41
|
-
const TypeUtils_js_1 = require("./TypeUtils.js");
|
|
42
|
-
const AnimationMode_js_1 = require("../Enums/Modes/AnimationMode.js");
|
|
43
|
-
const AnimationStatus_js_1 = require("../Enums/AnimationStatus.js");
|
|
44
|
-
const DestroyType_js_1 = require("../Enums/Types/DestroyType.js");
|
|
45
|
-
const OutModeDirection_js_1 = require("../Enums/Directions/OutModeDirection.js");
|
|
46
|
-
const PixelMode_js_1 = require("../Enums/Modes/PixelMode.js");
|
|
47
|
-
const StartValueType_js_1 = require("../Enums/Types/StartValueType.js");
|
|
48
|
-
const Vectors_js_1 = require("../Core/Utils/Vectors.js");
|
|
49
|
-
const minRadius = 0, minMemoizeSize = 0;
|
|
50
|
-
function memoize(fn, options) {
|
|
51
|
-
const cache = new Map(), maxSize = options?.maxSize, ttlMs = options?.ttlMs, keyFn = options?.keyFn, stableStringify = (obj, seen = new WeakSet()) => {
|
|
52
|
-
if (obj === null) {
|
|
53
|
-
return "null";
|
|
54
|
-
}
|
|
55
|
-
const t = typeof obj;
|
|
56
|
-
if (t === "undefined") {
|
|
57
|
-
return "undefined";
|
|
58
|
-
}
|
|
59
|
-
if (t === "number" || t === "boolean" || t === "string") {
|
|
60
|
-
return JSON.stringify(obj);
|
|
61
|
-
}
|
|
62
|
-
if (t === "function") {
|
|
63
|
-
try {
|
|
64
|
-
const fn = obj;
|
|
65
|
-
return fn.toString();
|
|
66
|
-
}
|
|
67
|
-
catch {
|
|
68
|
-
return '"[Function]"';
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
if (t === "symbol") {
|
|
72
|
-
try {
|
|
73
|
-
return obj.toString();
|
|
74
|
-
}
|
|
75
|
-
catch {
|
|
76
|
-
return '"[Symbol]"';
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
if (Array.isArray(obj)) {
|
|
80
|
-
return `[${obj.map(i => stableStringify(i, seen)).join(",")}]`;
|
|
81
|
-
}
|
|
82
|
-
if (seen.has(obj)) {
|
|
83
|
-
return '"[Circular]"';
|
|
84
|
-
}
|
|
85
|
-
seen.add(obj);
|
|
86
|
-
const keys = Object.keys(obj).sort();
|
|
87
|
-
return `{${keys.map(k => `${JSON.stringify(k)}:${stableStringify(obj[k], seen)}`).join(",")}}`;
|
|
88
|
-
}, defaultKeyer = (args) => stableStringify(args), makeKey = (args) => (keyFn ? keyFn(args) : defaultKeyer(args)), ensureBounds = () => {
|
|
89
|
-
if (typeof maxSize === "number" && maxSize >= minMemoizeSize) {
|
|
90
|
-
while (cache.size > maxSize) {
|
|
91
|
-
const firstKey = cache.keys().next().value;
|
|
92
|
-
if (firstKey === undefined)
|
|
93
|
-
break;
|
|
94
|
-
cache.delete(firstKey);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
return (...args) => {
|
|
99
|
-
const key = makeKey(args), now = Date.now(), entry = cache.get(key);
|
|
100
|
-
if (entry !== undefined) {
|
|
101
|
-
if (ttlMs && now - entry.ts > ttlMs) {
|
|
102
|
-
cache.delete(key);
|
|
103
|
-
}
|
|
104
|
-
else {
|
|
105
|
-
cache.delete(key);
|
|
106
|
-
cache.set(key, { value: entry.value, ts: entry.ts });
|
|
107
|
-
return entry.value;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
const result = fn(...args);
|
|
111
|
-
cache.set(key, { value: result, ts: now });
|
|
112
|
-
ensureBounds();
|
|
113
|
-
return result;
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
function hasMatchMedia() {
|
|
117
|
-
return typeof matchMedia !== "undefined";
|
|
118
|
-
}
|
|
119
|
-
function safeDocument() {
|
|
120
|
-
return globalThis.document;
|
|
121
|
-
}
|
|
122
|
-
function safeMatchMedia(query) {
|
|
123
|
-
if (!hasMatchMedia()) {
|
|
124
|
-
return;
|
|
125
|
-
}
|
|
126
|
-
return matchMedia(query);
|
|
127
|
-
}
|
|
128
|
-
function safeIntersectionObserver(callback) {
|
|
129
|
-
if (typeof IntersectionObserver === "undefined") {
|
|
130
|
-
return;
|
|
131
|
-
}
|
|
132
|
-
return new IntersectionObserver(callback);
|
|
133
|
-
}
|
|
134
|
-
function safeMutationObserver(callback) {
|
|
135
|
-
if (typeof MutationObserver === "undefined") {
|
|
136
|
-
return;
|
|
137
|
-
}
|
|
138
|
-
return new MutationObserver(callback);
|
|
139
|
-
}
|
|
140
|
-
function isInArray(value, array) {
|
|
141
|
-
return value === array || ((0, TypeUtils_js_1.isArray)(array) && array.includes(value));
|
|
142
|
-
}
|
|
143
|
-
function arrayRandomIndex(array) {
|
|
144
|
-
return Math.floor((0, MathUtils_js_1.getRandom)() * array.length);
|
|
145
|
-
}
|
|
146
|
-
function itemFromArray(array, index, useIndex = true) {
|
|
147
|
-
return array[index !== undefined && useIndex ? index % array.length : arrayRandomIndex(array)];
|
|
148
|
-
}
|
|
149
|
-
function isPointInside(point, size, offset, radius, direction) {
|
|
150
|
-
return areBoundsInside(calculateBounds(point, radius ?? minRadius), size, offset, direction);
|
|
151
|
-
}
|
|
152
|
-
function areBoundsInside(bounds, size, offset, direction) {
|
|
153
|
-
let inside = true;
|
|
154
|
-
if (!direction || direction === OutModeDirection_js_1.OutModeDirection.bottom) {
|
|
155
|
-
inside = bounds.top < size.height + offset.x;
|
|
156
|
-
}
|
|
157
|
-
if (inside && (!direction || direction === OutModeDirection_js_1.OutModeDirection.left)) {
|
|
158
|
-
inside = bounds.right > offset.x;
|
|
159
|
-
}
|
|
160
|
-
if (inside && (!direction || direction === OutModeDirection_js_1.OutModeDirection.right)) {
|
|
161
|
-
inside = bounds.left < size.width + offset.y;
|
|
162
|
-
}
|
|
163
|
-
if (inside && (!direction || direction === OutModeDirection_js_1.OutModeDirection.top)) {
|
|
164
|
-
inside = bounds.bottom > offset.y;
|
|
165
|
-
}
|
|
166
|
-
return inside;
|
|
167
|
-
}
|
|
168
|
-
function calculateBounds(point, radius) {
|
|
169
|
-
return {
|
|
170
|
-
bottom: point.y + radius,
|
|
171
|
-
left: point.x - radius,
|
|
172
|
-
right: point.x + radius,
|
|
173
|
-
top: point.y - radius,
|
|
174
|
-
};
|
|
175
|
-
}
|
|
176
|
-
function deepExtend(destination, ...sources) {
|
|
177
|
-
for (const source of sources) {
|
|
178
|
-
if ((0, TypeUtils_js_1.isNull)(source)) {
|
|
179
|
-
continue;
|
|
180
|
-
}
|
|
181
|
-
if (!(0, TypeUtils_js_1.isObject)(source)) {
|
|
182
|
-
destination = source;
|
|
183
|
-
continue;
|
|
184
|
-
}
|
|
185
|
-
if (Array.isArray(source)) {
|
|
186
|
-
if (!Array.isArray(destination)) {
|
|
187
|
-
destination = [];
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
else if (!(0, TypeUtils_js_1.isObject)(destination) || Array.isArray(destination)) {
|
|
191
|
-
destination = {};
|
|
192
|
-
}
|
|
193
|
-
const sourceKeys = Object.keys(source), dangerousKeys = new Set(["__proto__", "constructor", "prototype"]), hasNested = sourceKeys.some(k => {
|
|
194
|
-
const v = source[k];
|
|
195
|
-
return (0, TypeUtils_js_1.isObject)(v) || Array.isArray(v);
|
|
196
|
-
});
|
|
197
|
-
if (!hasNested) {
|
|
198
|
-
const sourceDict = source, destDict = destination;
|
|
199
|
-
for (const key of sourceKeys) {
|
|
200
|
-
if (dangerousKeys.has(key)) {
|
|
201
|
-
continue;
|
|
202
|
-
}
|
|
203
|
-
if (key in sourceDict) {
|
|
204
|
-
const v = sourceDict[key];
|
|
205
|
-
if (v !== undefined) {
|
|
206
|
-
destDict[key] = v;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
continue;
|
|
211
|
-
}
|
|
212
|
-
for (const key of sourceKeys) {
|
|
213
|
-
if (dangerousKeys.has(key)) {
|
|
214
|
-
continue;
|
|
215
|
-
}
|
|
216
|
-
const sourceDict = source, destDict = destination, value = sourceDict[key];
|
|
217
|
-
destDict[key] = Array.isArray(value)
|
|
218
|
-
? value.map(v => deepExtend(undefined, v))
|
|
219
|
-
: deepExtend(destDict[key], value);
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
return destination;
|
|
223
|
-
}
|
|
224
|
-
function circleBounceDataFromParticle(p) {
|
|
225
|
-
return {
|
|
226
|
-
position: p.getPosition(),
|
|
227
|
-
radius: p.getRadius(),
|
|
228
|
-
mass: p.getMass(),
|
|
229
|
-
velocity: p.velocity,
|
|
230
|
-
factor: Vectors_js_1.Vector.create((0, MathUtils_js_1.getRangeValue)(p.options.bounce.horizontal.value), (0, MathUtils_js_1.getRangeValue)(p.options.bounce.vertical.value)),
|
|
231
|
-
};
|
|
232
|
-
}
|
|
233
|
-
function circleBounce(p1, p2) {
|
|
234
|
-
const { x: xVelocityDiff, y: yVelocityDiff } = p1.velocity.sub(p2.velocity), [pos1, pos2] = [p1.position, p2.position], { dx: xDist, dy: yDist } = (0, MathUtils_js_1.getDistances)(pos2, pos1), minimumDistance = 0;
|
|
235
|
-
if (xVelocityDiff * xDist + yVelocityDiff * yDist < minimumDistance) {
|
|
236
|
-
return;
|
|
237
|
-
}
|
|
238
|
-
const angle = -Math.atan2(yDist, xDist), m1 = p1.mass, m2 = p2.mass, u1 = p1.velocity.rotate(angle), u2 = p2.velocity.rotate(angle), v1 = (0, MathUtils_js_1.collisionVelocity)(u1, u2, m1, m2), v2 = (0, MathUtils_js_1.collisionVelocity)(u2, u1, m1, m2), vFinal1 = v1.rotate(-angle), vFinal2 = v2.rotate(-angle);
|
|
239
|
-
p1.velocity.x = vFinal1.x * p1.factor.x;
|
|
240
|
-
p1.velocity.y = vFinal1.y * p1.factor.y;
|
|
241
|
-
p2.velocity.x = vFinal2.x * p2.factor.x;
|
|
242
|
-
p2.velocity.y = vFinal2.y * p2.factor.y;
|
|
243
|
-
}
|
|
244
|
-
function executeOnSingleOrMultiple(obj, callback) {
|
|
245
|
-
const defaultIndex = 0;
|
|
246
|
-
return (0, TypeUtils_js_1.isArray)(obj) ? obj.map((item, index) => callback(item, index)) : callback(obj, defaultIndex);
|
|
247
|
-
}
|
|
248
|
-
function itemFromSingleOrMultiple(obj, index, useIndex) {
|
|
249
|
-
return (0, TypeUtils_js_1.isArray)(obj) ? itemFromArray(obj, index, useIndex) : obj;
|
|
250
|
-
}
|
|
251
|
-
function findItemFromSingleOrMultiple(obj, callback) {
|
|
252
|
-
if ((0, TypeUtils_js_1.isArray)(obj)) {
|
|
253
|
-
return obj.find((t, index) => callback(t, index));
|
|
254
|
-
}
|
|
255
|
-
const defaultIndex = 0;
|
|
256
|
-
return callback(obj, defaultIndex) ? obj : undefined;
|
|
257
|
-
}
|
|
258
|
-
function initParticleNumericAnimationValue(options, pxRatio) {
|
|
259
|
-
const valueRange = options.value, animationOptions = options.animation, res = {
|
|
260
|
-
delayTime: (0, MathUtils_js_1.getRangeValue)(animationOptions.delay) * Constants_js_1.millisecondsToSeconds,
|
|
261
|
-
enable: animationOptions.enable,
|
|
262
|
-
value: (0, MathUtils_js_1.getRangeValue)(options.value) * pxRatio,
|
|
263
|
-
max: (0, MathUtils_js_1.getRangeMax)(valueRange) * pxRatio,
|
|
264
|
-
min: (0, MathUtils_js_1.getRangeMin)(valueRange) * pxRatio,
|
|
265
|
-
loops: 0,
|
|
266
|
-
maxLoops: (0, MathUtils_js_1.getRangeValue)(animationOptions.count),
|
|
267
|
-
time: 0,
|
|
268
|
-
}, decayOffset = 1;
|
|
269
|
-
if (animationOptions.enable) {
|
|
270
|
-
res.decay = decayOffset - (0, MathUtils_js_1.getRangeValue)(animationOptions.decay);
|
|
271
|
-
switch (animationOptions.mode) {
|
|
272
|
-
case AnimationMode_js_1.AnimationMode.increase:
|
|
273
|
-
res.status = AnimationStatus_js_1.AnimationStatus.increasing;
|
|
274
|
-
break;
|
|
275
|
-
case AnimationMode_js_1.AnimationMode.decrease:
|
|
276
|
-
res.status = AnimationStatus_js_1.AnimationStatus.decreasing;
|
|
277
|
-
break;
|
|
278
|
-
case AnimationMode_js_1.AnimationMode.random:
|
|
279
|
-
res.status = (0, MathUtils_js_1.getRandom)() >= Constants_js_1.half ? AnimationStatus_js_1.AnimationStatus.increasing : AnimationStatus_js_1.AnimationStatus.decreasing;
|
|
280
|
-
break;
|
|
281
|
-
default:
|
|
282
|
-
break;
|
|
283
|
-
}
|
|
284
|
-
const autoStatus = animationOptions.mode === AnimationMode_js_1.AnimationMode.auto;
|
|
285
|
-
switch (animationOptions.startValue) {
|
|
286
|
-
case StartValueType_js_1.StartValueType.min:
|
|
287
|
-
res.value = res.min;
|
|
288
|
-
if (autoStatus) {
|
|
289
|
-
res.status = AnimationStatus_js_1.AnimationStatus.increasing;
|
|
290
|
-
}
|
|
291
|
-
break;
|
|
292
|
-
case StartValueType_js_1.StartValueType.max:
|
|
293
|
-
res.value = res.max;
|
|
294
|
-
if (autoStatus) {
|
|
295
|
-
res.status = AnimationStatus_js_1.AnimationStatus.decreasing;
|
|
296
|
-
}
|
|
297
|
-
break;
|
|
298
|
-
case StartValueType_js_1.StartValueType.random:
|
|
299
|
-
default:
|
|
300
|
-
res.value = (0, MathUtils_js_1.randomInRangeValue)(res);
|
|
301
|
-
if (autoStatus) {
|
|
302
|
-
res.status = (0, MathUtils_js_1.getRandom)() >= Constants_js_1.half ? AnimationStatus_js_1.AnimationStatus.increasing : AnimationStatus_js_1.AnimationStatus.decreasing;
|
|
303
|
-
}
|
|
304
|
-
break;
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
res.initialValue = res.value;
|
|
308
|
-
return res;
|
|
309
|
-
}
|
|
310
|
-
function getPositionOrSize(positionOrSize, canvasSize) {
|
|
311
|
-
const isPercent = positionOrSize.mode === PixelMode_js_1.PixelMode.percent;
|
|
312
|
-
if (!isPercent) {
|
|
313
|
-
const { mode: _, ...rest } = positionOrSize;
|
|
314
|
-
return rest;
|
|
315
|
-
}
|
|
316
|
-
const isPosition = "x" in positionOrSize;
|
|
317
|
-
if (isPosition) {
|
|
318
|
-
return {
|
|
319
|
-
x: (positionOrSize.x / Constants_js_1.percentDenominator) * canvasSize.width,
|
|
320
|
-
y: (positionOrSize.y / Constants_js_1.percentDenominator) * canvasSize.height,
|
|
321
|
-
};
|
|
322
|
-
}
|
|
323
|
-
else {
|
|
324
|
-
return {
|
|
325
|
-
width: (positionOrSize.width / Constants_js_1.percentDenominator) * canvasSize.width,
|
|
326
|
-
height: (positionOrSize.height / Constants_js_1.percentDenominator) * canvasSize.height,
|
|
327
|
-
};
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
function getPosition(position, canvasSize) {
|
|
331
|
-
return getPositionOrSize(position, canvasSize);
|
|
332
|
-
}
|
|
333
|
-
function getSize(size, canvasSize) {
|
|
334
|
-
return getPositionOrSize(size, canvasSize);
|
|
335
|
-
}
|
|
336
|
-
function checkDestroy(particle, destroyType, value, minValue, maxValue) {
|
|
337
|
-
switch (destroyType) {
|
|
338
|
-
case DestroyType_js_1.DestroyType.max:
|
|
339
|
-
if (value >= maxValue) {
|
|
340
|
-
particle.destroy();
|
|
341
|
-
}
|
|
342
|
-
break;
|
|
343
|
-
case DestroyType_js_1.DestroyType.min:
|
|
344
|
-
if (value <= minValue) {
|
|
345
|
-
particle.destroy();
|
|
346
|
-
}
|
|
347
|
-
break;
|
|
348
|
-
default:
|
|
349
|
-
break;
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
function updateAnimation(particle, data, changeDirection, destroyType, delta) {
|
|
353
|
-
const minLoops = 0, minDelay = 0, identity = 1, minVelocity = 0, minDecay = 1;
|
|
354
|
-
if (particle.destroyed ||
|
|
355
|
-
!data.enable ||
|
|
356
|
-
((data.maxLoops ?? minLoops) > minLoops && (data.loops ?? minLoops) > (data.maxLoops ?? minLoops))) {
|
|
357
|
-
return;
|
|
358
|
-
}
|
|
359
|
-
const velocity = (data.velocity ?? minVelocity) * delta.factor, minValue = data.min, maxValue = data.max, decay = data.decay ?? minDecay;
|
|
360
|
-
data.time ??= 0;
|
|
361
|
-
if ((data.delayTime ?? minDelay) > minDelay && data.time < (data.delayTime ?? minDelay)) {
|
|
362
|
-
data.time += delta.value;
|
|
363
|
-
}
|
|
364
|
-
if ((data.delayTime ?? minDelay) > minDelay && data.time < (data.delayTime ?? minDelay)) {
|
|
365
|
-
return;
|
|
366
|
-
}
|
|
367
|
-
switch (data.status) {
|
|
368
|
-
case AnimationStatus_js_1.AnimationStatus.increasing:
|
|
369
|
-
if (data.value >= maxValue) {
|
|
370
|
-
if (changeDirection) {
|
|
371
|
-
data.status = AnimationStatus_js_1.AnimationStatus.decreasing;
|
|
372
|
-
}
|
|
373
|
-
else {
|
|
374
|
-
data.value -= maxValue;
|
|
375
|
-
}
|
|
376
|
-
data.loops ??= minLoops;
|
|
377
|
-
data.loops++;
|
|
378
|
-
}
|
|
379
|
-
else {
|
|
380
|
-
data.value += velocity;
|
|
381
|
-
}
|
|
382
|
-
break;
|
|
383
|
-
case AnimationStatus_js_1.AnimationStatus.decreasing:
|
|
384
|
-
if (data.value <= minValue) {
|
|
385
|
-
if (changeDirection) {
|
|
386
|
-
data.status = AnimationStatus_js_1.AnimationStatus.increasing;
|
|
387
|
-
}
|
|
388
|
-
else {
|
|
389
|
-
data.value += maxValue;
|
|
390
|
-
}
|
|
391
|
-
data.loops ??= minLoops;
|
|
392
|
-
data.loops++;
|
|
393
|
-
}
|
|
394
|
-
else {
|
|
395
|
-
data.value -= velocity;
|
|
396
|
-
}
|
|
397
|
-
break;
|
|
398
|
-
default:
|
|
399
|
-
break;
|
|
400
|
-
}
|
|
401
|
-
if (data.velocity && decay !== identity) {
|
|
402
|
-
data.velocity *= decay;
|
|
403
|
-
}
|
|
404
|
-
checkDestroy(particle, destroyType, data.value, minValue, maxValue);
|
|
405
|
-
data.value = (0, MathUtils_js_1.clamp)(data.value, minValue, maxValue);
|
|
406
|
-
}
|
|
407
|
-
function cloneStyle(style) {
|
|
408
|
-
const clonedStyle = safeDocument().createElement("div").style;
|
|
409
|
-
for (const key in style) {
|
|
410
|
-
const styleKey = style[key];
|
|
411
|
-
if (!(key in style) || (0, TypeUtils_js_1.isNull)(styleKey)) {
|
|
412
|
-
continue;
|
|
413
|
-
}
|
|
414
|
-
const styleValue = style.getPropertyValue?.(styleKey);
|
|
415
|
-
if (!styleValue) {
|
|
416
|
-
continue;
|
|
417
|
-
}
|
|
418
|
-
const stylePriority = style.getPropertyPriority?.(styleKey);
|
|
419
|
-
if (stylePriority) {
|
|
420
|
-
clonedStyle.setProperty(styleKey, styleValue, stylePriority);
|
|
421
|
-
}
|
|
422
|
-
else {
|
|
423
|
-
clonedStyle.setProperty(styleKey, styleValue);
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
return clonedStyle;
|
|
427
|
-
}
|
|
428
|
-
function computeFullScreenStyle(zIndex) {
|
|
429
|
-
const fullScreenStyle = safeDocument().createElement("div").style, radix = 10, style = {
|
|
430
|
-
width: "100%",
|
|
431
|
-
height: "100%",
|
|
432
|
-
margin: "0",
|
|
433
|
-
padding: "0",
|
|
434
|
-
borderWidth: "0",
|
|
435
|
-
position: "fixed",
|
|
436
|
-
zIndex: zIndex.toString(radix),
|
|
437
|
-
"z-index": zIndex.toString(radix),
|
|
438
|
-
top: "0",
|
|
439
|
-
left: "0",
|
|
440
|
-
};
|
|
441
|
-
for (const key in style) {
|
|
442
|
-
const value = style[key];
|
|
443
|
-
if (value === undefined) {
|
|
444
|
-
continue;
|
|
445
|
-
}
|
|
446
|
-
fullScreenStyle.setProperty(key, value);
|
|
447
|
-
}
|
|
448
|
-
return fullScreenStyle;
|
|
449
|
-
}
|
|
450
|
-
exports.getFullScreenStyle = memoize(computeFullScreenStyle);
|
|
451
|
-
function manageListener(element, event, handler, add, options) {
|
|
452
|
-
if (add) {
|
|
453
|
-
let addOptions = { passive: true };
|
|
454
|
-
if ((0, TypeUtils_js_1.isBoolean)(options)) {
|
|
455
|
-
addOptions.capture = options;
|
|
456
|
-
}
|
|
457
|
-
else if (options !== undefined) {
|
|
458
|
-
addOptions = options;
|
|
459
|
-
}
|
|
460
|
-
element.addEventListener(event, handler, addOptions);
|
|
461
|
-
}
|
|
462
|
-
else {
|
|
463
|
-
const removeOptions = options;
|
|
464
|
-
element.removeEventListener(event, handler, removeOptions);
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
async function getItemsFromInitializer(container, map, initializers, force = false) {
|
|
468
|
-
let res = map.get(container);
|
|
469
|
-
if (!res || force) {
|
|
470
|
-
res = await Promise.all([...initializers.values()].map(t => t(container)));
|
|
471
|
-
map.set(container, res);
|
|
472
|
-
}
|
|
473
|
-
return res;
|
|
474
|
-
}
|
|
475
|
-
async function getItemMapFromInitializer(container, map, initializers, force = false) {
|
|
476
|
-
let res = map.get(container);
|
|
477
|
-
if (!res || force) {
|
|
478
|
-
const entries = await Promise.all([...initializers.entries()].map(([key, initializer]) => initializer(container).then(item => [key, item])));
|
|
479
|
-
res = new Map(entries);
|
|
480
|
-
map.set(container, res);
|
|
481
|
-
}
|
|
482
|
-
return res;
|
|
483
|
-
}
|
|
484
|
-
});
|
package/umd/bundle.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
2
|
-
if (k2 === undefined) k2 = k;
|
|
3
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
4
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
5
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
6
|
-
}
|
|
7
|
-
Object.defineProperty(o, k2, desc);
|
|
8
|
-
}) : (function(o, m, k, k2) {
|
|
9
|
-
if (k2 === undefined) k2 = k;
|
|
10
|
-
o[k2] = m[k];
|
|
11
|
-
}));
|
|
12
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
13
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
14
|
-
};
|
|
15
|
-
(function (factory) {
|
|
16
|
-
if (typeof module === "object" && typeof module.exports === "object") {
|
|
17
|
-
var v = factory(require, exports);
|
|
18
|
-
if (v !== undefined) module.exports = v;
|
|
19
|
-
}
|
|
20
|
-
else if (typeof define === "function" && define.amd) {
|
|
21
|
-
define(["require", "exports", "./initEngine.js", "./exports.js"], factory);
|
|
22
|
-
}
|
|
23
|
-
})(function (require, exports) {
|
|
24
|
-
"use strict";
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.tsParticles = void 0;
|
|
27
|
-
const initEngine_js_1 = require("./initEngine.js");
|
|
28
|
-
const tsParticles = (0, initEngine_js_1.initEngine)();
|
|
29
|
-
exports.tsParticles = tsParticles;
|
|
30
|
-
globalThis.tsParticles = tsParticles;
|
|
31
|
-
__exportStar(require("./exports.js"), exports);
|
|
32
|
-
});
|
package/umd/export-types.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
(function (factory) {
|
|
2
|
-
if (typeof module === "object" && typeof module.exports === "object") {
|
|
3
|
-
var v = factory(require, exports);
|
|
4
|
-
if (v !== undefined) module.exports = v;
|
|
5
|
-
}
|
|
6
|
-
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports"], factory);
|
|
8
|
-
}
|
|
9
|
-
})(function (require, exports) {
|
|
10
|
-
"use strict";
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
});
|
package/umd/exports.js
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
2
|
-
if (k2 === undefined) k2 = k;
|
|
3
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
4
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
5
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
6
|
-
}
|
|
7
|
-
Object.defineProperty(o, k2, desc);
|
|
8
|
-
}) : (function(o, m, k, k2) {
|
|
9
|
-
if (k2 === undefined) k2 = k;
|
|
10
|
-
o[k2] = m[k];
|
|
11
|
-
}));
|
|
12
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
13
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
14
|
-
};
|
|
15
|
-
(function (factory) {
|
|
16
|
-
if (typeof module === "object" && typeof module.exports === "object") {
|
|
17
|
-
var v = factory(require, exports);
|
|
18
|
-
if (v !== undefined) module.exports = v;
|
|
19
|
-
}
|
|
20
|
-
else if (typeof define === "function" && define.amd) {
|
|
21
|
-
define(["require", "exports", "./Core/Utils/Constants.js", "./Core/Utils/Ranges.js", "./Core/Utils/Vectors.js", "./Enums/Directions/MoveDirection.js", "./Enums/Directions/RotateDirection.js", "./Enums/Directions/OutModeDirection.js", "./Enums/Modes/AnimationMode.js", "./Enums/Modes/LimitMode.js", "./Enums/Modes/OutMode.js", "./Enums/Modes/PixelMode.js", "./Enums/Types/AlterType.js", "./Enums/Types/DestroyType.js", "./Enums/Types/GradientType.js", "./Enums/Types/ParticleOutType.js", "./Enums/Types/StartValueType.js", "./Enums/Types/EasingType.js", "./Enums/Types/EventType.js", "./Enums/AnimationStatus.js", "./Options/Classes/AnimatableColor.js", "./Options/Classes/AnimationOptions.js", "./Options/Classes/Background/Background.js", "./Options/Classes/ColorAnimation.js", "./Options/Classes/FullScreen/FullScreen.js", "./Options/Classes/HslAnimation.js", "./Options/Classes/Options.js", "./Options/Classes/OptionsColor.js", "./Options/Classes/Particles/Bounce/ParticlesBounce.js", "./Options/Classes/Particles/Bounce/ParticlesBounceFactor.js", "./Options/Classes/Particles/ParticlesOptions.js", "./Options/Classes/Particles/Fill.js", "./Options/Classes/Particles/Stroke.js", "./Options/Classes/Particles/Move/Move.js", "./Options/Classes/Particles/Move/MoveAngle.js", "./Options/Classes/Particles/Move/MoveCenter.js", "./Options/Classes/Particles/Move/MoveGravity.js", "./Options/Classes/Particles/Move/OutModes.js", "./Options/Classes/Particles/Move/Path/MovePath.js", "./Options/Classes/Particles/Move/Spin.js", "./Options/Classes/Particles/Number/ParticlesNumber.js", "./Options/Classes/Particles/Number/ParticlesNumberLimit.js", "./Options/Classes/Particles/Number/ParticlesDensity.js", "./Options/Classes/Particles/Opacity/Opacity.js", "./Options/Classes/Particles/Opacity/OpacityAnimation.js", "./Options/Classes/Particles/Shape/Shape.js", "./Options/Classes/Particles/Size/Size.js", "./Options/Classes/Particles/Size/SizeAnimation.js", "./Options/Classes/Particles/ZIndex/ZIndex.js", "./Options/Classes/ResizeEvent.js", "./Options/Classes/ValueWithRandom.js", "./Utils/CanvasUtils.js", "./Utils/ColorUtils.js", "./Utils/LogUtils.js", "./Utils/MathUtils.js", "./Utils/OptionsUtils.js", "./Utils/Utils.js", "./Utils/TypeUtils.js"], factory);
|
|
22
|
-
}
|
|
23
|
-
})(function (require, exports) {
|
|
24
|
-
"use strict";
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
__exportStar(require("./Core/Utils/Constants.js"), exports);
|
|
27
|
-
__exportStar(require("./Core/Utils/Ranges.js"), exports);
|
|
28
|
-
__exportStar(require("./Core/Utils/Vectors.js"), exports);
|
|
29
|
-
__exportStar(require("./Enums/Directions/MoveDirection.js"), exports);
|
|
30
|
-
__exportStar(require("./Enums/Directions/RotateDirection.js"), exports);
|
|
31
|
-
__exportStar(require("./Enums/Directions/OutModeDirection.js"), exports);
|
|
32
|
-
__exportStar(require("./Enums/Modes/AnimationMode.js"), exports);
|
|
33
|
-
__exportStar(require("./Enums/Modes/LimitMode.js"), exports);
|
|
34
|
-
__exportStar(require("./Enums/Modes/OutMode.js"), exports);
|
|
35
|
-
__exportStar(require("./Enums/Modes/PixelMode.js"), exports);
|
|
36
|
-
__exportStar(require("./Enums/Types/AlterType.js"), exports);
|
|
37
|
-
__exportStar(require("./Enums/Types/DestroyType.js"), exports);
|
|
38
|
-
__exportStar(require("./Enums/Types/GradientType.js"), exports);
|
|
39
|
-
__exportStar(require("./Enums/Types/ParticleOutType.js"), exports);
|
|
40
|
-
__exportStar(require("./Enums/Types/StartValueType.js"), exports);
|
|
41
|
-
__exportStar(require("./Enums/Types/EasingType.js"), exports);
|
|
42
|
-
__exportStar(require("./Enums/Types/EventType.js"), exports);
|
|
43
|
-
__exportStar(require("./Enums/AnimationStatus.js"), exports);
|
|
44
|
-
__exportStar(require("./Options/Classes/AnimatableColor.js"), exports);
|
|
45
|
-
__exportStar(require("./Options/Classes/AnimationOptions.js"), exports);
|
|
46
|
-
__exportStar(require("./Options/Classes/Background/Background.js"), exports);
|
|
47
|
-
__exportStar(require("./Options/Classes/ColorAnimation.js"), exports);
|
|
48
|
-
__exportStar(require("./Options/Classes/FullScreen/FullScreen.js"), exports);
|
|
49
|
-
__exportStar(require("./Options/Classes/HslAnimation.js"), exports);
|
|
50
|
-
__exportStar(require("./Options/Classes/Options.js"), exports);
|
|
51
|
-
__exportStar(require("./Options/Classes/OptionsColor.js"), exports);
|
|
52
|
-
__exportStar(require("./Options/Classes/Particles/Bounce/ParticlesBounce.js"), exports);
|
|
53
|
-
__exportStar(require("./Options/Classes/Particles/Bounce/ParticlesBounceFactor.js"), exports);
|
|
54
|
-
__exportStar(require("./Options/Classes/Particles/ParticlesOptions.js"), exports);
|
|
55
|
-
__exportStar(require("./Options/Classes/Particles/Fill.js"), exports);
|
|
56
|
-
__exportStar(require("./Options/Classes/Particles/Stroke.js"), exports);
|
|
57
|
-
__exportStar(require("./Options/Classes/Particles/Move/Move.js"), exports);
|
|
58
|
-
__exportStar(require("./Options/Classes/Particles/Move/MoveAngle.js"), exports);
|
|
59
|
-
__exportStar(require("./Options/Classes/Particles/Move/MoveCenter.js"), exports);
|
|
60
|
-
__exportStar(require("./Options/Classes/Particles/Move/MoveGravity.js"), exports);
|
|
61
|
-
__exportStar(require("./Options/Classes/Particles/Move/OutModes.js"), exports);
|
|
62
|
-
__exportStar(require("./Options/Classes/Particles/Move/Path/MovePath.js"), exports);
|
|
63
|
-
__exportStar(require("./Options/Classes/Particles/Move/Spin.js"), exports);
|
|
64
|
-
__exportStar(require("./Options/Classes/Particles/Number/ParticlesNumber.js"), exports);
|
|
65
|
-
__exportStar(require("./Options/Classes/Particles/Number/ParticlesNumberLimit.js"), exports);
|
|
66
|
-
__exportStar(require("./Options/Classes/Particles/Number/ParticlesDensity.js"), exports);
|
|
67
|
-
__exportStar(require("./Options/Classes/Particles/Opacity/Opacity.js"), exports);
|
|
68
|
-
__exportStar(require("./Options/Classes/Particles/Opacity/OpacityAnimation.js"), exports);
|
|
69
|
-
__exportStar(require("./Options/Classes/Particles/Shape/Shape.js"), exports);
|
|
70
|
-
__exportStar(require("./Options/Classes/Particles/Size/Size.js"), exports);
|
|
71
|
-
__exportStar(require("./Options/Classes/Particles/Size/SizeAnimation.js"), exports);
|
|
72
|
-
__exportStar(require("./Options/Classes/Particles/ZIndex/ZIndex.js"), exports);
|
|
73
|
-
__exportStar(require("./Options/Classes/ResizeEvent.js"), exports);
|
|
74
|
-
__exportStar(require("./Options/Classes/ValueWithRandom.js"), exports);
|
|
75
|
-
__exportStar(require("./Utils/CanvasUtils.js"), exports);
|
|
76
|
-
__exportStar(require("./Utils/ColorUtils.js"), exports);
|
|
77
|
-
__exportStar(require("./Utils/LogUtils.js"), exports);
|
|
78
|
-
__exportStar(require("./Utils/MathUtils.js"), exports);
|
|
79
|
-
__exportStar(require("./Utils/OptionsUtils.js"), exports);
|
|
80
|
-
__exportStar(require("./Utils/Utils.js"), exports);
|
|
81
|
-
__exportStar(require("./Utils/TypeUtils.js"), exports);
|
|
82
|
-
});
|
package/umd/index.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
2
|
-
if (k2 === undefined) k2 = k;
|
|
3
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
4
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
5
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
6
|
-
}
|
|
7
|
-
Object.defineProperty(o, k2, desc);
|
|
8
|
-
}) : (function(o, m, k, k2) {
|
|
9
|
-
if (k2 === undefined) k2 = k;
|
|
10
|
-
o[k2] = m[k];
|
|
11
|
-
}));
|
|
12
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
13
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
14
|
-
};
|
|
15
|
-
(function (factory) {
|
|
16
|
-
if (typeof module === "object" && typeof module.exports === "object") {
|
|
17
|
-
var v = factory(require, exports);
|
|
18
|
-
if (v !== undefined) module.exports = v;
|
|
19
|
-
}
|
|
20
|
-
else if (typeof define === "function" && define.amd) {
|
|
21
|
-
define(["require", "exports", "./initEngine.js", "./exports.js"], factory);
|
|
22
|
-
}
|
|
23
|
-
})(function (require, exports) {
|
|
24
|
-
"use strict";
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.tsParticles = void 0;
|
|
27
|
-
const initEngine_js_1 = require("./initEngine.js");
|
|
28
|
-
const tsParticles = (0, initEngine_js_1.initEngine)();
|
|
29
|
-
exports.tsParticles = tsParticles;
|
|
30
|
-
globalThis.tsParticles = tsParticles;
|
|
31
|
-
__exportStar(require("./exports.js"), exports);
|
|
32
|
-
});
|
package/umd/initEngine.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
(function (factory) {
|
|
2
|
-
if (typeof module === "object" && typeof module.exports === "object") {
|
|
3
|
-
var v = factory(require, exports);
|
|
4
|
-
if (v !== undefined) module.exports = v;
|
|
5
|
-
}
|
|
6
|
-
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports", "./Core/Engine.js"], factory);
|
|
8
|
-
}
|
|
9
|
-
})(function (require, exports) {
|
|
10
|
-
"use strict";
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.initEngine = initEngine;
|
|
13
|
-
const Engine_js_1 = require("./Core/Engine.js");
|
|
14
|
-
function initEngine() {
|
|
15
|
-
return new Engine_js_1.Engine();
|
|
16
|
-
}
|
|
17
|
-
});
|