@tsparticles/engine 4.0.0-alpha.3 → 4.0.0-alpha.5
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/794.min.js +2 -0
- package/794.min.js.LICENSE.txt +1 -0
- package/README.md +2 -5
- package/browser/Core/Canvas.js +3 -3
- package/browser/Core/Container.js +35 -155
- package/browser/Core/Engine.js +32 -78
- package/browser/Core/Particle.js +5 -10
- package/browser/Core/Particles.js +36 -25
- package/browser/Core/Utils/Constants.js +2 -2
- package/browser/Core/Utils/EventListeners.js +5 -250
- package/browser/Options/Classes/Options.js +7 -75
- package/browser/Options/Classes/Particles/ParticlesOptions.js +5 -11
- package/{esm/Options/Classes/Interactivity/Events → browser/Options/Classes}/ResizeEvent.js +1 -1
- package/browser/Utils/ColorUtils.js +7 -5
- package/browser/Utils/Utils.js +33 -36
- package/browser/exports.js +1 -21
- package/cjs/Core/Canvas.js +3 -3
- package/cjs/Core/Container.js +35 -155
- package/cjs/Core/Engine.js +32 -78
- package/cjs/Core/Particle.js +5 -10
- package/cjs/Core/Particles.js +36 -25
- package/cjs/Core/Utils/Constants.js +2 -2
- package/cjs/Core/Utils/EventListeners.js +5 -250
- package/cjs/Options/Classes/Options.js +7 -75
- package/cjs/Options/Classes/Particles/ParticlesOptions.js +5 -11
- package/cjs/Options/Classes/{Interactivity/Events/ResizeEvent.js → ResizeEvent.js} +1 -1
- package/cjs/Utils/ColorUtils.js +7 -5
- package/cjs/Utils/Utils.js +33 -36
- package/cjs/exports.js +1 -21
- package/dist_browser_Core_Container_js.js +6 -16
- package/esm/Core/Canvas.js +3 -3
- package/esm/Core/Container.js +35 -155
- package/esm/Core/Engine.js +32 -78
- package/esm/Core/Particle.js +5 -10
- package/esm/Core/Particles.js +36 -25
- package/esm/Core/Utils/Constants.js +2 -2
- package/esm/Core/Utils/EventListeners.js +5 -250
- package/esm/Options/Classes/Options.js +7 -75
- package/esm/Options/Classes/Particles/ParticlesOptions.js +5 -11
- package/{browser/Options/Classes/Interactivity/Events → esm/Options/Classes}/ResizeEvent.js +1 -1
- package/esm/Utils/ColorUtils.js +7 -5
- package/esm/Utils/Utils.js +33 -36
- package/esm/exports.js +1 -21
- package/package.json +1 -1
- package/report.html +1 -1
- package/tsparticles.engine.js +14 -206
- package/tsparticles.engine.min.js +1 -1
- package/tsparticles.engine.min.js.LICENSE.txt +1 -1
- package/types/Core/Container.d.ts +3 -15
- package/types/Core/Engine.d.ts +8 -19
- package/types/Core/Interfaces/IContainerPlugin.d.ts +8 -1
- package/types/Core/Interfaces/IPlugin.d.ts +5 -1
- package/types/Core/Particle.d.ts +0 -2
- package/types/Core/Particles.d.ts +1 -5
- package/types/Core/Utils/Constants.d.ts +2 -2
- package/types/Core/Utils/EventListeners.d.ts +0 -14
- package/types/Options/Classes/Options.d.ts +2 -11
- package/types/Options/Classes/Particles/ParticlesOptions.d.ts +0 -2
- package/types/Options/Classes/ResizeEvent.d.ts +9 -0
- package/types/Options/Interfaces/IOptions.d.ts +2 -8
- package/types/Options/Interfaces/Particles/IParticlesOptions.d.ts +0 -3
- package/types/Types/EngineInitializers.d.ts +10 -0
- package/types/Utils/Utils.d.ts +4 -6
- package/types/export-types.d.ts +3 -19
- package/types/exports.d.ts +1 -21
- package/umd/Core/Canvas.js +3 -3
- package/umd/Core/Container.js +35 -155
- package/umd/Core/Engine.js +33 -79
- package/umd/Core/Particle.js +6 -11
- package/umd/Core/Particles.js +37 -26
- package/umd/Core/Utils/Constants.js +3 -3
- package/umd/Core/Utils/EventListeners.js +7 -252
- package/umd/Options/Classes/Options.js +7 -75
- package/umd/Options/Classes/Particles/ParticlesOptions.js +5 -11
- package/umd/Options/Classes/{Interactivity/Events/ResizeEvent.js → ResizeEvent.js} +2 -2
- package/umd/Utils/ColorUtils.js +7 -5
- package/umd/Utils/Utils.js +34 -39
- package/umd/exports.js +2 -22
- package/638.min.js +0 -2
- package/638.min.js.LICENSE.txt +0 -1
- package/browser/Core/Interfaces/IMouseData.js +0 -1
- package/browser/Core/Interfaces/IParticlesInteractor.js +0 -1
- package/browser/Core/Utils/ExternalInteractorBase.js +0 -7
- package/browser/Core/Utils/InteractionManager.js +0 -60
- package/browser/Core/Utils/ParticlesInteractorBase.js +0 -7
- package/browser/Enums/InteractivityDetect.js +0 -6
- package/browser/Enums/Modes/ResponsiveMode.js +0 -5
- package/browser/Enums/Modes/ThemeMode.js +0 -6
- package/browser/Enums/Types/DivType.js +0 -5
- package/browser/Enums/Types/InteractorType.js +0 -5
- package/browser/Options/Classes/Interactivity/Events/ClickEvent.js +0 -18
- package/browser/Options/Classes/Interactivity/Events/DivEvent.js +0 -27
- package/browser/Options/Classes/Interactivity/Events/Events.js +0 -30
- package/browser/Options/Classes/Interactivity/Events/HoverEvent.js +0 -21
- package/browser/Options/Classes/Interactivity/Events/Parallax.js +0 -22
- package/browser/Options/Classes/Interactivity/Interactivity.js +0 -22
- package/browser/Options/Classes/Interactivity/Modes/Modes.js +0 -25
- package/browser/Options/Classes/ManualParticle.js +0 -21
- package/browser/Options/Classes/Responsive.js +0 -29
- package/browser/Options/Classes/Theme/Theme.js +0 -21
- package/browser/Options/Classes/Theme/ThemeDefault.js +0 -23
- package/browser/Options/Interfaces/IManualParticle.js +0 -1
- package/browser/Options/Interfaces/IResponsive.js +0 -1
- package/browser/Options/Interfaces/Interactivity/Events/IClickEvent.js +0 -1
- package/browser/Options/Interfaces/Interactivity/Events/IDivEvent.js +0 -1
- package/browser/Options/Interfaces/Interactivity/Events/IEvents.js +0 -1
- package/browser/Options/Interfaces/Interactivity/Events/IHoverEvent.js +0 -1
- package/browser/Options/Interfaces/Interactivity/Events/IParallax.js +0 -1
- package/browser/Options/Interfaces/Interactivity/IInteractivity.js +0 -1
- package/browser/Options/Interfaces/Interactivity/Modes/IModeDiv.js +0 -1
- package/browser/Options/Interfaces/Interactivity/Modes/IModes.js +0 -1
- package/browser/Options/Interfaces/Theme/ITheme.js +0 -1
- package/browser/Options/Interfaces/Theme/IThemeDefault.js +0 -1
- package/cjs/Core/Interfaces/IContainerInteractivity.js +0 -1
- package/cjs/Core/Interfaces/IExternalInteractor.js +0 -1
- package/cjs/Core/Interfaces/IInteractor.js +0 -1
- package/cjs/Core/Interfaces/IMouseData.js +0 -1
- package/cjs/Core/Interfaces/IParticlesInteractor.js +0 -1
- package/cjs/Core/Utils/ExternalInteractorBase.js +0 -7
- package/cjs/Core/Utils/InteractionManager.js +0 -60
- package/cjs/Core/Utils/ParticlesInteractorBase.js +0 -7
- package/cjs/Enums/InteractivityDetect.js +0 -6
- package/cjs/Enums/Modes/ResponsiveMode.js +0 -5
- package/cjs/Enums/Modes/ThemeMode.js +0 -6
- package/cjs/Enums/Types/DivType.js +0 -5
- package/cjs/Enums/Types/InteractorType.js +0 -5
- package/cjs/Options/Classes/Interactivity/Events/ClickEvent.js +0 -18
- package/cjs/Options/Classes/Interactivity/Events/DivEvent.js +0 -27
- package/cjs/Options/Classes/Interactivity/Events/Events.js +0 -30
- package/cjs/Options/Classes/Interactivity/Events/HoverEvent.js +0 -21
- package/cjs/Options/Classes/Interactivity/Events/Parallax.js +0 -22
- package/cjs/Options/Classes/Interactivity/Interactivity.js +0 -22
- package/cjs/Options/Classes/Interactivity/Modes/Modes.js +0 -25
- package/cjs/Options/Classes/ManualParticle.js +0 -21
- package/cjs/Options/Classes/Responsive.js +0 -29
- package/cjs/Options/Classes/Theme/Theme.js +0 -21
- package/cjs/Options/Classes/Theme/ThemeDefault.js +0 -23
- package/cjs/Options/Interfaces/IManualParticle.js +0 -1
- package/cjs/Options/Interfaces/IResponsive.js +0 -1
- package/cjs/Options/Interfaces/Interactivity/Events/IClickEvent.js +0 -1
- package/cjs/Options/Interfaces/Interactivity/Events/IDivEvent.js +0 -1
- package/cjs/Options/Interfaces/Interactivity/Events/IEvents.js +0 -1
- package/cjs/Options/Interfaces/Interactivity/Events/IHoverEvent.js +0 -1
- package/cjs/Options/Interfaces/Interactivity/Events/IParallax.js +0 -1
- package/cjs/Options/Interfaces/Interactivity/IInteractivity.js +0 -1
- package/cjs/Options/Interfaces/Interactivity/Modes/IModeDiv.js +0 -1
- package/cjs/Options/Interfaces/Interactivity/Modes/IModes.js +0 -1
- package/cjs/Options/Interfaces/Theme/ITheme.js +0 -1
- package/cjs/Options/Interfaces/Theme/IThemeDefault.js +0 -1
- package/esm/Core/Interfaces/IContainerInteractivity.js +0 -1
- package/esm/Core/Interfaces/IExternalInteractor.js +0 -1
- package/esm/Core/Interfaces/IInteractor.js +0 -1
- package/esm/Core/Interfaces/IMouseData.js +0 -1
- package/esm/Core/Interfaces/IParticlesInteractor.js +0 -1
- package/esm/Core/Utils/ExternalInteractorBase.js +0 -7
- package/esm/Core/Utils/InteractionManager.js +0 -60
- package/esm/Core/Utils/ParticlesInteractorBase.js +0 -7
- package/esm/Enums/InteractivityDetect.js +0 -6
- package/esm/Enums/Modes/ResponsiveMode.js +0 -5
- package/esm/Enums/Modes/ThemeMode.js +0 -6
- package/esm/Enums/Types/DivType.js +0 -5
- package/esm/Enums/Types/InteractorType.js +0 -5
- package/esm/Options/Classes/Interactivity/Events/ClickEvent.js +0 -18
- package/esm/Options/Classes/Interactivity/Events/DivEvent.js +0 -27
- package/esm/Options/Classes/Interactivity/Events/Events.js +0 -30
- package/esm/Options/Classes/Interactivity/Events/HoverEvent.js +0 -21
- package/esm/Options/Classes/Interactivity/Events/Parallax.js +0 -22
- package/esm/Options/Classes/Interactivity/Interactivity.js +0 -22
- package/esm/Options/Classes/Interactivity/Modes/Modes.js +0 -25
- package/esm/Options/Classes/ManualParticle.js +0 -21
- package/esm/Options/Classes/Responsive.js +0 -29
- package/esm/Options/Classes/Theme/Theme.js +0 -21
- package/esm/Options/Classes/Theme/ThemeDefault.js +0 -23
- package/esm/Options/Interfaces/IManualParticle.js +0 -1
- package/esm/Options/Interfaces/IResponsive.js +0 -1
- package/esm/Options/Interfaces/Interactivity/Events/IClickEvent.js +0 -1
- package/esm/Options/Interfaces/Interactivity/Events/IDivEvent.js +0 -1
- package/esm/Options/Interfaces/Interactivity/Events/IEvents.js +0 -1
- package/esm/Options/Interfaces/Interactivity/Events/IHoverEvent.js +0 -1
- package/esm/Options/Interfaces/Interactivity/Events/IParallax.js +0 -1
- package/esm/Options/Interfaces/Interactivity/IInteractivity.js +0 -1
- package/esm/Options/Interfaces/Interactivity/Modes/IModeDiv.js +0 -1
- package/esm/Options/Interfaces/Interactivity/Modes/IModes.js +0 -1
- package/esm/Options/Interfaces/Theme/ITheme.js +0 -1
- package/esm/Options/Interfaces/Theme/IThemeDefault.js +0 -1
- package/types/Core/Interfaces/IContainerInteractivity.d.ts +0 -6
- package/types/Core/Interfaces/IExternalInteractor.d.ts +0 -12
- package/types/Core/Interfaces/IInteractor.d.ts +0 -16
- package/types/Core/Interfaces/IMouseData.d.ts +0 -9
- package/types/Core/Interfaces/IParticlesInteractor.d.ts +0 -7
- package/types/Core/Utils/ExternalInteractorBase.d.ts +0 -15
- package/types/Core/Utils/InteractionManager.d.ts +0 -17
- package/types/Core/Utils/ParticlesInteractorBase.d.ts +0 -15
- package/types/Enums/InteractivityDetect.d.ts +0 -5
- package/types/Enums/Modes/ResponsiveMode.d.ts +0 -4
- package/types/Enums/Modes/ThemeMode.d.ts +0 -5
- package/types/Enums/Types/DivType.d.ts +0 -4
- package/types/Enums/Types/InteractorType.d.ts +0 -4
- package/types/Options/Classes/Interactivity/Events/ClickEvent.d.ts +0 -10
- package/types/Options/Classes/Interactivity/Events/DivEvent.d.ts +0 -13
- package/types/Options/Classes/Interactivity/Events/Events.d.ts +0 -16
- package/types/Options/Classes/Interactivity/Events/HoverEvent.d.ts +0 -12
- package/types/Options/Classes/Interactivity/Events/Parallax.d.ts +0 -10
- package/types/Options/Classes/Interactivity/Events/ResizeEvent.d.ts +0 -9
- package/types/Options/Classes/Interactivity/Interactivity.d.ts +0 -16
- package/types/Options/Classes/Interactivity/Modes/Modes.d.ts +0 -12
- package/types/Options/Classes/ManualParticle.d.ts +0 -10
- package/types/Options/Classes/Responsive.d.ts +0 -12
- package/types/Options/Classes/Theme/Theme.d.ts +0 -12
- package/types/Options/Classes/Theme/ThemeDefault.d.ts +0 -11
- package/types/Options/Interfaces/IManualParticle.d.ts +0 -7
- package/types/Options/Interfaces/IResponsive.d.ts +0 -7
- package/types/Options/Interfaces/Interactivity/Events/IClickEvent.d.ts +0 -5
- package/types/Options/Interfaces/Interactivity/Events/IDivEvent.d.ts +0 -8
- package/types/Options/Interfaces/Interactivity/Events/IEvents.d.ts +0 -11
- package/types/Options/Interfaces/Interactivity/Events/IHoverEvent.d.ts +0 -7
- package/types/Options/Interfaces/Interactivity/Events/IParallax.d.ts +0 -5
- package/types/Options/Interfaces/Interactivity/IInteractivity.d.ts +0 -9
- package/types/Options/Interfaces/Interactivity/Modes/IModeDiv.d.ts +0 -4
- package/types/Options/Interfaces/Interactivity/Modes/IModes.d.ts +0 -1
- package/types/Options/Interfaces/Theme/ITheme.d.ts +0 -7
- package/types/Options/Interfaces/Theme/IThemeDefault.d.ts +0 -6
- package/umd/Core/Interfaces/IExternalInteractor.js +0 -12
- package/umd/Core/Interfaces/IInteractor.js +0 -12
- package/umd/Core/Interfaces/IMouseData.js +0 -12
- package/umd/Core/Interfaces/IParticlesInteractor.js +0 -12
- package/umd/Core/Utils/ExternalInteractorBase.js +0 -21
- package/umd/Core/Utils/InteractionManager.js +0 -74
- package/umd/Core/Utils/ParticlesInteractorBase.js +0 -21
- package/umd/Enums/InteractivityDetect.js +0 -19
- package/umd/Enums/Modes/ResponsiveMode.js +0 -18
- package/umd/Enums/Modes/ThemeMode.js +0 -19
- package/umd/Enums/Types/DivType.js +0 -18
- package/umd/Enums/Types/InteractorType.js +0 -18
- package/umd/Options/Classes/Interactivity/Events/ClickEvent.js +0 -32
- package/umd/Options/Classes/Interactivity/Events/DivEvent.js +0 -41
- package/umd/Options/Classes/Interactivity/Events/Events.js +0 -44
- package/umd/Options/Classes/Interactivity/Events/HoverEvent.js +0 -35
- package/umd/Options/Classes/Interactivity/Events/Parallax.js +0 -36
- package/umd/Options/Classes/Interactivity/Interactivity.js +0 -36
- package/umd/Options/Classes/Interactivity/Modes/Modes.js +0 -39
- package/umd/Options/Classes/ManualParticle.js +0 -35
- package/umd/Options/Classes/Responsive.js +0 -43
- package/umd/Options/Classes/Theme/Theme.js +0 -35
- package/umd/Options/Classes/Theme/ThemeDefault.js +0 -37
- package/umd/Options/Interfaces/IManualParticle.js +0 -12
- package/umd/Options/Interfaces/IResponsive.js +0 -12
- package/umd/Options/Interfaces/Interactivity/Events/IClickEvent.js +0 -12
- package/umd/Options/Interfaces/Interactivity/Events/IDivEvent.js +0 -12
- package/umd/Options/Interfaces/Interactivity/Events/IEvents.js +0 -12
- package/umd/Options/Interfaces/Interactivity/Events/IHoverEvent.js +0 -12
- package/umd/Options/Interfaces/Interactivity/Events/IParallax.js +0 -12
- package/umd/Options/Interfaces/Interactivity/IInteractivity.js +0 -12
- package/umd/Options/Interfaces/Interactivity/Modes/IModeDiv.js +0 -12
- package/umd/Options/Interfaces/Interactivity/Modes/IModes.js +0 -12
- package/umd/Options/Interfaces/Theme/ITheme.js +0 -12
- package/umd/Options/Interfaces/Theme/IThemeDefault.js +0 -12
- /package/browser/Options/Interfaces/{Interactivity/Events/IResizeEvent.js → IResizeEvent.js} +0 -0
- /package/browser/{Core/Interfaces/IContainerInteractivity.js → Types/EngineInitializers.js} +0 -0
- /package/cjs/Options/Interfaces/{Interactivity/Events/IResizeEvent.js → IResizeEvent.js} +0 -0
- /package/{browser/Core/Interfaces/IExternalInteractor.js → cjs/Types/EngineInitializers.js} +0 -0
- /package/esm/Options/Interfaces/{Interactivity/Events/IResizeEvent.js → IResizeEvent.js} +0 -0
- /package/{browser/Core/Interfaces/IInteractor.js → esm/Types/EngineInitializers.js} +0 -0
- /package/types/Options/Interfaces/{Interactivity/Events/IResizeEvent.d.ts → IResizeEvent.d.ts} +0 -0
- /package/umd/Options/Interfaces/{Interactivity/Events/IResizeEvent.js → IResizeEvent.js} +0 -0
- /package/umd/{Core/Interfaces/IContainerInteractivity.js → Types/EngineInitializers.js} +0 -0
package/umd/Core/Engine.js
CHANGED
|
@@ -51,14 +51,6 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
51
51
|
const LogUtils_js_1 = require("../Utils/LogUtils.js");
|
|
52
52
|
const MathUtils_js_1 = require("../Utils/MathUtils.js");
|
|
53
53
|
const fullPercent = "100%";
|
|
54
|
-
async function getItemsFromInitializer(container, map, initializers, force = false) {
|
|
55
|
-
let res = map.get(container);
|
|
56
|
-
if (!res || force) {
|
|
57
|
-
res = await Promise.all([...initializers.values()].map(t => t(container)));
|
|
58
|
-
map.set(container, res);
|
|
59
|
-
}
|
|
60
|
-
return res;
|
|
61
|
-
}
|
|
62
54
|
async function getDataFromUrl(data) {
|
|
63
55
|
const url = (0, Utils_js_1.itemFromSingleOrMultiple)(data.url, data.index);
|
|
64
56
|
if (!url) {
|
|
@@ -95,7 +87,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
95
87
|
return canvasEl;
|
|
96
88
|
}, getDomContainer = (id, source) => {
|
|
97
89
|
const documentSafe = (0, Utils_js_1.safeDocument)();
|
|
98
|
-
let domContainer = source ??
|
|
90
|
+
let domContainer = source ?? documentSafe.getElementById(id);
|
|
99
91
|
if (domContainer) {
|
|
100
92
|
return domContainer;
|
|
101
93
|
}
|
|
@@ -111,16 +103,17 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
111
103
|
this._domArray = [];
|
|
112
104
|
this._eventDispatcher = new EventDispatcher_js_1.EventDispatcher();
|
|
113
105
|
this._initialized = false;
|
|
106
|
+
this._isRunningLoaders = false;
|
|
114
107
|
this._loadPromises = new Set();
|
|
108
|
+
this._allLoadersSet = new Set();
|
|
109
|
+
this._executedSet = new Set();
|
|
115
110
|
this.plugins = [];
|
|
116
111
|
this.colorManagers = new Map();
|
|
117
112
|
this.easingFunctions = new Map();
|
|
118
113
|
this._initializers = {
|
|
119
|
-
interactors: new Map(),
|
|
120
114
|
movers: new Map(),
|
|
121
115
|
updaters: new Map(),
|
|
122
116
|
};
|
|
123
|
-
this.interactors = new Map();
|
|
124
117
|
this.movers = new Map();
|
|
125
118
|
this.updaters = new Map();
|
|
126
119
|
this.presets = new Map();
|
|
@@ -139,7 +132,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
139
132
|
return this._domArray;
|
|
140
133
|
}
|
|
141
134
|
get version() {
|
|
142
|
-
return "4.0.0-alpha.
|
|
135
|
+
return "4.0.0-alpha.5";
|
|
143
136
|
}
|
|
144
137
|
addColorManager(manager) {
|
|
145
138
|
this.colorManagers.set(manager.key, manager);
|
|
@@ -164,9 +157,6 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
164
157
|
addEventListener(type, listener) {
|
|
165
158
|
this._eventDispatcher.addEventListener(type, listener);
|
|
166
159
|
}
|
|
167
|
-
addInteractor(name, interactorInitializer) {
|
|
168
|
-
this._initializers.interactors.set(name, interactorInitializer);
|
|
169
|
-
}
|
|
170
160
|
addMover(name, moverInitializer) {
|
|
171
161
|
this._initializers.movers.set(name, moverInitializer);
|
|
172
162
|
}
|
|
@@ -208,37 +198,18 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
208
198
|
clearPlugins(container) {
|
|
209
199
|
this.updaters.delete(container);
|
|
210
200
|
this.movers.delete(container);
|
|
211
|
-
this.interactors.delete(container);
|
|
212
201
|
}
|
|
213
202
|
dispatchEvent(type, args) {
|
|
214
203
|
this._eventDispatcher.dispatchEvent(type, args);
|
|
215
204
|
}
|
|
216
|
-
dom() {
|
|
217
|
-
return this.items;
|
|
218
|
-
}
|
|
219
|
-
domItem(index) {
|
|
220
|
-
return this.item(index);
|
|
221
|
-
}
|
|
222
|
-
async getAvailablePlugins(container) {
|
|
223
|
-
const res = new Map();
|
|
224
|
-
for (const plugin of this.plugins) {
|
|
225
|
-
if (plugin.needsPlugin(container.actualOptions)) {
|
|
226
|
-
res.set(plugin.id, await plugin.getPlugin(container));
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
return res;
|
|
230
|
-
}
|
|
231
205
|
getEasing(name) {
|
|
232
206
|
return this.easingFunctions.get(name) ?? ((value) => value);
|
|
233
207
|
}
|
|
234
208
|
getEffectDrawer(type) {
|
|
235
209
|
return this.effectDrawers.get(type);
|
|
236
210
|
}
|
|
237
|
-
async getInteractors(container, force = false) {
|
|
238
|
-
return getItemsFromInitializer(container, this.interactors, this._initializers.interactors, force);
|
|
239
|
-
}
|
|
240
211
|
async getMovers(container, force = false) {
|
|
241
|
-
return getItemsFromInitializer(container, this.movers, this._initializers.movers, force);
|
|
212
|
+
return (0, Utils_js_1.getItemsFromInitializer)(container, this.movers, this._initializers.movers, force);
|
|
242
213
|
}
|
|
243
214
|
getPathGenerator(type) {
|
|
244
215
|
return this.pathGenerators.get(type);
|
|
@@ -259,39 +230,24 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
259
230
|
return this.shapeDrawers.keys();
|
|
260
231
|
}
|
|
261
232
|
async getUpdaters(container, force = false) {
|
|
262
|
-
return getItemsFromInitializer(container, this.updaters, this._initializers.updaters, force);
|
|
233
|
+
return (0, Utils_js_1.getItemsFromInitializer)(container, this.updaters, this._initializers.updaters, force);
|
|
263
234
|
}
|
|
264
235
|
async init() {
|
|
265
|
-
if (this._initialized)
|
|
236
|
+
if (this._initialized || this._isRunningLoaders)
|
|
266
237
|
return;
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
}
|
|
274
|
-
if (executed.has(loader)) {
|
|
275
|
-
continue;
|
|
238
|
+
this._isRunningLoaders = true;
|
|
239
|
+
this._executedSet = new Set();
|
|
240
|
+
this._allLoadersSet = new Set(this._loadPromises);
|
|
241
|
+
try {
|
|
242
|
+
for (const loader of this._allLoadersSet) {
|
|
243
|
+
await this._runLoader(loader, this._executedSet, this._allLoadersSet);
|
|
276
244
|
}
|
|
277
|
-
executed.add(loader);
|
|
278
|
-
const inner = [], origRegister = this.register.bind(this);
|
|
279
|
-
this.register = (...loaders) => {
|
|
280
|
-
inner.push(...loaders);
|
|
281
|
-
for (const loader of loaders) {
|
|
282
|
-
allLoaders.add(loader);
|
|
283
|
-
}
|
|
284
|
-
};
|
|
285
|
-
await loader(this);
|
|
286
|
-
this.register = origRegister;
|
|
287
|
-
stack.unshift(...inner);
|
|
288
|
-
this._loadPromises.delete(loader);
|
|
289
245
|
}
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
this.
|
|
246
|
+
finally {
|
|
247
|
+
this._loadPromises.clear();
|
|
248
|
+
this._isRunningLoaders = false;
|
|
249
|
+
this._initialized = true;
|
|
293
250
|
}
|
|
294
|
-
this._initialized = true;
|
|
295
251
|
}
|
|
296
252
|
item(index) {
|
|
297
253
|
const { items } = this, item = items[index];
|
|
@@ -321,11 +277,6 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
321
277
|
await newItem.start();
|
|
322
278
|
return newItem;
|
|
323
279
|
}
|
|
324
|
-
loadOptions(options, sourceOptions) {
|
|
325
|
-
this.plugins.forEach(plugin => {
|
|
326
|
-
plugin.loadOptions(options, sourceOptions);
|
|
327
|
-
});
|
|
328
|
-
}
|
|
329
280
|
loadParticlesOptions(container, options, ...sourceOptions) {
|
|
330
281
|
const updaters = this.updaters.get(container);
|
|
331
282
|
if (!updaters) {
|
|
@@ -339,25 +290,28 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
339
290
|
}
|
|
340
291
|
await Promise.all(this.items.map(t => t.refresh()));
|
|
341
292
|
}
|
|
342
|
-
register(...
|
|
293
|
+
async register(...loaders) {
|
|
343
294
|
if (this._initialized) {
|
|
344
|
-
throw new Error(
|
|
295
|
+
throw new Error("Register plugins can only be done before calling tsParticles.load()");
|
|
345
296
|
}
|
|
346
|
-
for (const
|
|
347
|
-
this.
|
|
297
|
+
for (const loader of loaders) {
|
|
298
|
+
if (this._isRunningLoaders) {
|
|
299
|
+
await this._runLoader(loader, this._executedSet, this._allLoadersSet);
|
|
300
|
+
}
|
|
301
|
+
else {
|
|
302
|
+
this._loadPromises.add(loader);
|
|
303
|
+
}
|
|
348
304
|
}
|
|
349
305
|
}
|
|
350
306
|
removeEventListener(type, listener) {
|
|
351
307
|
this._eventDispatcher.removeEventListener(type, listener);
|
|
352
308
|
}
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
item.addClickHandler(callback);
|
|
360
|
-
});
|
|
309
|
+
async _runLoader(loader, executed, allLoaders) {
|
|
310
|
+
if (executed.has(loader))
|
|
311
|
+
return;
|
|
312
|
+
executed.add(loader);
|
|
313
|
+
allLoaders.add(loader);
|
|
314
|
+
await loader(this);
|
|
361
315
|
}
|
|
362
316
|
}
|
|
363
317
|
exports.Engine = Engine;
|
package/umd/Core/Particle.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
if (v !== undefined) module.exports = v;
|
|
5
5
|
}
|
|
6
6
|
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports", "./Utils/Vectors.js", "../Utils/MathUtils.js", "./Utils/Constants.js", "../Utils/Utils.js", "../Enums/Types/EventType.js", "../
|
|
7
|
+
define(["require", "exports", "./Utils/Vectors.js", "../Utils/MathUtils.js", "./Utils/Constants.js", "../Utils/Utils.js", "../Enums/Types/EventType.js", "../Enums/Directions/MoveDirection.js", "../Enums/Modes/OutMode.js", "../Enums/Types/ParticleOutType.js", "../Utils/CanvasUtils.js", "../Utils/ColorUtils.js", "../Utils/OptionsUtils.js"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
const Constants_js_1 = require("./Utils/Constants.js");
|
|
16
16
|
const Utils_js_1 = require("../Utils/Utils.js");
|
|
17
17
|
const EventType_js_1 = require("../Enums/Types/EventType.js");
|
|
18
|
-
const Interactivity_js_1 = require("../Options/Classes/Interactivity/Interactivity.js");
|
|
19
18
|
const MoveDirection_js_1 = require("../Enums/Directions/MoveDirection.js");
|
|
20
19
|
const OutMode_js_1 = require("../Enums/Modes/OutMode.js");
|
|
21
20
|
const ParticleOutType_js_1 = require("../Enums/Types/ParticleOutType.js");
|
|
@@ -65,7 +64,7 @@
|
|
|
65
64
|
};
|
|
66
65
|
this._calcPosition = (position, zIndex) => {
|
|
67
66
|
let tryCount = Constants_js_1.defaultRetryCount, posVec = position ? Vectors_js_1.Vector3d.create(position.x, position.y, zIndex) : undefined;
|
|
68
|
-
const container = this.container, plugins = Array.from(container.plugins
|
|
67
|
+
const container = this.container, plugins = Array.from(container.plugins), outModes = this.options.move.outModes, radius = this.getRadius(), canvasSize = container.canvas.size, abortController = new AbortController(), { signal } = abortController;
|
|
69
68
|
while (!signal.aborted) {
|
|
70
69
|
for (const plugin of plugins) {
|
|
71
70
|
const pluginPos = plugin.particlePosition?.(posVec, this);
|
|
@@ -185,7 +184,7 @@
|
|
|
185
184
|
this.slow.inRange = false;
|
|
186
185
|
const container = this.container, pathGenerator = this.pathGenerator, shapeDrawer = this.shape ? container.shapeDrawers.get(this.shape) : undefined;
|
|
187
186
|
shapeDrawer?.particleDestroy?.(this);
|
|
188
|
-
for (const plugin of container.plugins
|
|
187
|
+
for (const plugin of container.plugins) {
|
|
189
188
|
plugin.particleDestroyed?.(this, override);
|
|
190
189
|
}
|
|
191
190
|
for (const updater of container.particles.updaters) {
|
|
@@ -201,7 +200,7 @@
|
|
|
201
200
|
}
|
|
202
201
|
draw(delta) {
|
|
203
202
|
const container = this.container, canvas = container.canvas;
|
|
204
|
-
for (const plugin of container.plugins
|
|
203
|
+
for (const plugin of container.plugins) {
|
|
205
204
|
canvas.drawParticlePlugin(plugin, this, delta);
|
|
206
205
|
}
|
|
207
206
|
canvas.drawParticle(this, delta);
|
|
@@ -252,7 +251,7 @@
|
|
|
252
251
|
return this._cachedTransform;
|
|
253
252
|
}
|
|
254
253
|
init(id, position, overrideOptions, group) {
|
|
255
|
-
const container = this.container
|
|
254
|
+
const container = this.container;
|
|
256
255
|
this.id = id;
|
|
257
256
|
this.group = group;
|
|
258
257
|
this.effectClose = true;
|
|
@@ -312,10 +311,6 @@
|
|
|
312
311
|
if (shapeData) {
|
|
313
312
|
particlesOptions.load(shapeData.particles);
|
|
314
313
|
}
|
|
315
|
-
const interactivity = new Interactivity_js_1.Interactivity(engine, container);
|
|
316
|
-
interactivity.load(container.actualOptions.interactivity);
|
|
317
|
-
interactivity.load(particlesOptions.interactivity);
|
|
318
|
-
this.interactivity = interactivity;
|
|
319
314
|
this.effectFill = effectData?.fill ?? particlesOptions.effect.fill;
|
|
320
315
|
this.effectClose = effectData?.close ?? particlesOptions.effect.close;
|
|
321
316
|
this.shapeFill = shapeData?.fill ?? particlesOptions.shape.fill;
|
|
@@ -384,7 +379,7 @@
|
|
|
384
379
|
}
|
|
385
380
|
effectDrawer?.particleInit?.(container, this);
|
|
386
381
|
shapeDrawer?.particleInit?.(container, this);
|
|
387
|
-
for (const plugin of container.plugins
|
|
382
|
+
for (const plugin of container.plugins) {
|
|
388
383
|
plugin.particleCreated?.(this);
|
|
389
384
|
}
|
|
390
385
|
}
|
package/umd/Core/Particles.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
if (v !== undefined) module.exports = v;
|
|
5
5
|
}
|
|
6
6
|
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports", "./Utils/Constants.js", "../Enums/Types/EventType.js", "
|
|
7
|
+
define(["require", "exports", "./Utils/Constants.js", "../Enums/Types/EventType.js", "../Enums/Modes/LimitMode.js", "./Particle.js", "./Utils/Point.js", "./Utils/QuadTree.js", "./Utils/Ranges.js", "../Utils/LogUtils.js", "../Utils/OptionsUtils.js"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
@@ -12,14 +12,12 @@
|
|
|
12
12
|
exports.Particles = void 0;
|
|
13
13
|
const Constants_js_1 = require("./Utils/Constants.js");
|
|
14
14
|
const EventType_js_1 = require("../Enums/Types/EventType.js");
|
|
15
|
-
const InteractionManager_js_1 = require("./Utils/InteractionManager.js");
|
|
16
15
|
const LimitMode_js_1 = require("../Enums/Modes/LimitMode.js");
|
|
17
16
|
const Particle_js_1 = require("./Particle.js");
|
|
18
17
|
const Point_js_1 = require("./Utils/Point.js");
|
|
19
18
|
const QuadTree_js_1 = require("./Utils/QuadTree.js");
|
|
20
19
|
const Ranges_js_1 = require("./Utils/Ranges.js");
|
|
21
20
|
const LogUtils_js_1 = require("../Utils/LogUtils.js");
|
|
22
|
-
const Utils_js_1 = require("../Utils/Utils.js");
|
|
23
21
|
const OptionsUtils_js_1 = require("../Utils/OptionsUtils.js");
|
|
24
22
|
const qTreeRectangle = (canvasSize) => {
|
|
25
23
|
const { height, width } = canvasSize;
|
|
@@ -30,7 +28,7 @@
|
|
|
30
28
|
this._addToPool = (...particles) => {
|
|
31
29
|
this._pool.push(...particles);
|
|
32
30
|
};
|
|
33
|
-
this._applyDensity = (options,
|
|
31
|
+
this._applyDensity = (options, pluginsCount, group, groupOptions) => {
|
|
34
32
|
const numberOptions = options.number;
|
|
35
33
|
if (!numberOptions.density.enable) {
|
|
36
34
|
if (group === undefined) {
|
|
@@ -41,7 +39,7 @@
|
|
|
41
39
|
}
|
|
42
40
|
return;
|
|
43
41
|
}
|
|
44
|
-
const densityFactor = this._initDensityFactor(numberOptions.density), optParticlesNumber = numberOptions.value, optParticlesLimit = numberOptions.limit.value > Constants_js_1.minLimit ? numberOptions.limit.value : optParticlesNumber, particlesNumber = Math.min(optParticlesNumber, optParticlesLimit) * densityFactor +
|
|
42
|
+
const densityFactor = this._initDensityFactor(numberOptions.density), optParticlesNumber = numberOptions.value, optParticlesLimit = numberOptions.limit.value > Constants_js_1.minLimit ? numberOptions.limit.value : optParticlesNumber, particlesNumber = Math.min(optParticlesNumber, optParticlesLimit) * densityFactor + pluginsCount, particlesCount = Math.min(this.count, this.filter(t => t.group === group).length);
|
|
45
43
|
if (group === undefined) {
|
|
46
44
|
this._limit = numberOptions.limit.value * densityFactor;
|
|
47
45
|
}
|
|
@@ -121,7 +119,6 @@
|
|
|
121
119
|
this._groupLimits = new Map();
|
|
122
120
|
this._needsSort = false;
|
|
123
121
|
this._lastZIndex = 0;
|
|
124
|
-
this._interactionManager = new InteractionManager_js_1.InteractionManager(engine, container);
|
|
125
122
|
this._pluginsInitialized = false;
|
|
126
123
|
const canvasSize = container.canvas.size;
|
|
127
124
|
this.quadTree = new QuadTree_js_1.QuadTree(qTreeRectangle(canvasSize), Constants_js_1.qTreeCapacity);
|
|
@@ -131,10 +128,6 @@
|
|
|
131
128
|
get count() {
|
|
132
129
|
return this._array.length;
|
|
133
130
|
}
|
|
134
|
-
addManualParticles() {
|
|
135
|
-
const container = this._container, options = container.actualOptions;
|
|
136
|
-
options.manualParticles.forEach(p => this.addParticle(p.position ? (0, Utils_js_1.getPosition)(p.position, container.canvas.size) : undefined, p.options));
|
|
137
|
-
}
|
|
138
131
|
addParticle(position, overrideOptions, group, initializer) {
|
|
139
132
|
const limitMode = this._container.actualOptions.particles.number.limit.mode, limit = group === undefined ? this._limit : (this._groupLimits.get(group) ?? this._limit), currentCount = this.count;
|
|
140
133
|
if (limit > Constants_js_1.minLimit) {
|
|
@@ -180,22 +173,23 @@
|
|
|
180
173
|
get(index) {
|
|
181
174
|
return this._array[index];
|
|
182
175
|
}
|
|
183
|
-
handleClickMode(mode) {
|
|
184
|
-
this._interactionManager.handleClickMode(mode);
|
|
185
|
-
}
|
|
186
176
|
async init() {
|
|
187
177
|
const container = this._container, options = container.actualOptions;
|
|
188
178
|
this._lastZIndex = 0;
|
|
189
179
|
this._needsSort = false;
|
|
180
|
+
for (const plugin of container.plugins) {
|
|
181
|
+
if (plugin.redrawInit) {
|
|
182
|
+
await plugin.redrawInit();
|
|
183
|
+
}
|
|
184
|
+
}
|
|
190
185
|
await this.initPlugins();
|
|
191
186
|
let handled = false;
|
|
192
|
-
for (const plugin of container.plugins
|
|
187
|
+
for (const plugin of container.plugins) {
|
|
193
188
|
handled = plugin.particlesInitialization?.() ?? handled;
|
|
194
189
|
if (handled) {
|
|
195
190
|
break;
|
|
196
191
|
}
|
|
197
192
|
}
|
|
198
|
-
this.addManualParticles();
|
|
199
193
|
if (!handled) {
|
|
200
194
|
const particlesOptions = options.particles, groups = particlesOptions.groups;
|
|
201
195
|
for (const group in groups) {
|
|
@@ -219,14 +213,13 @@
|
|
|
219
213
|
const container = this._container;
|
|
220
214
|
this.movers = await this._engine.getMovers(container, true);
|
|
221
215
|
this.updaters = await this._engine.getUpdaters(container, true);
|
|
222
|
-
await this._interactionManager.init();
|
|
223
216
|
for (const pathGenerator of container.pathGenerators.values()) {
|
|
224
217
|
pathGenerator.init(container);
|
|
225
218
|
}
|
|
226
219
|
}
|
|
227
|
-
push(nb,
|
|
220
|
+
push(nb, position, overrideOptions, group) {
|
|
228
221
|
for (let i = 0; i < nb; i++) {
|
|
229
|
-
this.addParticle(
|
|
222
|
+
this.addParticle(position, overrideOptions, group);
|
|
230
223
|
}
|
|
231
224
|
}
|
|
232
225
|
async redraw() {
|
|
@@ -253,16 +246,22 @@
|
|
|
253
246
|
this.removeAt(Constants_js_1.minIndex, quantity, group);
|
|
254
247
|
}
|
|
255
248
|
setDensity() {
|
|
256
|
-
const options = this._container.actualOptions, groups = options.particles.groups
|
|
249
|
+
const options = this._container.actualOptions, groups = options.particles.groups;
|
|
250
|
+
let pluginsCount = 0;
|
|
251
|
+
for (const plugin of this._container.plugins) {
|
|
252
|
+
if (plugin.particlesDensityCount) {
|
|
253
|
+
pluginsCount += plugin.particlesDensityCount();
|
|
254
|
+
}
|
|
255
|
+
}
|
|
257
256
|
for (const group in groups) {
|
|
258
257
|
const groupData = groups[group];
|
|
259
258
|
if (!groupData) {
|
|
260
259
|
continue;
|
|
261
260
|
}
|
|
262
261
|
const groupDataOptions = (0, OptionsUtils_js_1.loadParticlesOptions)(this._engine, this._container, groupData);
|
|
263
|
-
this._applyDensity(groupDataOptions,
|
|
262
|
+
this._applyDensity(groupDataOptions, pluginsCount, group);
|
|
264
263
|
}
|
|
265
|
-
this._applyDensity(options.particles,
|
|
264
|
+
this._applyDensity(options.particles, pluginsCount);
|
|
266
265
|
}
|
|
267
266
|
setLastZIndex(zIndex) {
|
|
268
267
|
this._lastZIndex = zIndex;
|
|
@@ -277,7 +276,7 @@
|
|
|
277
276
|
for (const pathGenerator of container.pathGenerators.values()) {
|
|
278
277
|
pathGenerator.update();
|
|
279
278
|
}
|
|
280
|
-
for (const plugin of container.plugins
|
|
279
|
+
for (const plugin of container.plugins) {
|
|
281
280
|
plugin.update?.(delta);
|
|
282
281
|
}
|
|
283
282
|
const resizeFactor = this._resizeFactor;
|
|
@@ -289,8 +288,12 @@
|
|
|
289
288
|
particle.initialPosition.y *= resizeFactor.height;
|
|
290
289
|
}
|
|
291
290
|
particle.ignoresResizeRatio = false;
|
|
292
|
-
this.
|
|
293
|
-
|
|
291
|
+
for (const plugin of this._container.plugins) {
|
|
292
|
+
if (plugin.particleReset) {
|
|
293
|
+
plugin.particleReset(particle);
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
for (const plugin of this._container.plugins) {
|
|
294
297
|
if (particle.destroyed) {
|
|
295
298
|
break;
|
|
296
299
|
}
|
|
@@ -321,13 +324,21 @@
|
|
|
321
324
|
}
|
|
322
325
|
this._addToPool(...particlesToDelete);
|
|
323
326
|
}
|
|
324
|
-
|
|
327
|
+
for (const plugin of container.plugins) {
|
|
328
|
+
if (plugin.postUpdate) {
|
|
329
|
+
plugin.postUpdate(delta);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
325
332
|
for (const particle of this._array) {
|
|
326
333
|
for (const updater of this.updaters) {
|
|
327
334
|
updater.update(particle, delta);
|
|
328
335
|
}
|
|
329
336
|
if (!particle.destroyed && !particle.spawning) {
|
|
330
|
-
|
|
337
|
+
for (const plugin of container.plugins) {
|
|
338
|
+
if (plugin.postParticleUpdate) {
|
|
339
|
+
plugin.postParticleUpdate(particle, delta);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
331
342
|
}
|
|
332
343
|
}
|
|
333
344
|
delete this._resizeFactor;
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.defaultTime = exports.defaultLoops = exports.defaultVelocity = exports.defaultRgbMin = exports.phaseNumerator = exports.sNormalizedOffset = exports.sextuple = exports.triple = exports.lMin = exports.lFactor = exports.minStrokeWidth = exports.identity = exports.defaultAngle = exports.manualDefaultPosition = exports.touchDelay = exports.deleteCount = exports.defaultDensityFactor = exports.lengthOffset = exports.
|
|
13
|
-
exports.generatedAttribute = "generated", exports.
|
|
12
|
+
exports.defaultTime = exports.defaultLoops = exports.defaultVelocity = exports.defaultRgbMin = exports.phaseNumerator = exports.sNormalizedOffset = exports.sextuple = exports.triple = exports.lMin = exports.lFactor = exports.minStrokeWidth = exports.identity = exports.defaultAngle = exports.manualDefaultPosition = exports.touchDelay = exports.deleteCount = exports.defaultDensityFactor = exports.lengthOffset = exports.minIndex = exports.minCount = exports.countOffset = exports.minLimit = exports.sizeFactor = exports.posOffset = exports.defaultRadius = exports.minZ = exports.rollFactor = exports.minRetries = exports.tryCountIncrement = exports.decayOffset = exports.none = exports.one = exports.loadMinIndex = exports.loadRandomFactor = exports.canvasFirstIndex = exports.minFpsLimit = exports.defaultFpsLimit = exports.removeMinIndex = exports.removeDeleteCount = exports.minCoordinate = exports.touchEndLengthOffset = exports.clickRadius = exports.defaultOpacity = exports.zIndexFactorOffset = exports.minimumLength = exports.minimumSize = exports.defaultTransformValue = exports.minVelocity = exports.threeQuarter = exports.quarter = exports.empty = exports.hPhase = exports.sMin = exports.hMin = exports.lMax = exports.sMax = exports.hMax = exports.rgbMax = exports.inverseFactorNumerator = exports.subdivideCount = exports.defaultReduceFactor = exports.defaultRatio = exports.defaultRemoveQuantity = exports.qTreeCapacity = exports.squareExp = exports.defaultRetryCount = exports.canvasTag = exports.generatedFalse = exports.generatedTrue = exports.defaultAlpha = exports.defaultFps = exports.doublePI = exports.double = exports.midColorValue = exports.randomColorValue = exports.defaultTransform = exports.originPoint = exports.millisecondsToSeconds = exports.half = exports.percentDenominator = exports.visibilityChangeEvent = exports.resizeEvent = exports.generatedAttribute = void 0;
|
|
13
|
+
exports.generatedAttribute = "generated", exports.resizeEvent = "resize", exports.visibilityChangeEvent = "visibilitychange", exports.percentDenominator = 100, exports.half = 0.5, exports.millisecondsToSeconds = 1000, exports.originPoint = {
|
|
14
14
|
x: 0,
|
|
15
15
|
y: 0,
|
|
16
16
|
z: 0,
|
|
@@ -19,5 +19,5 @@
|
|
|
19
19
|
b: 0,
|
|
20
20
|
c: 0,
|
|
21
21
|
d: 1,
|
|
22
|
-
}, exports.randomColorValue = "random", exports.midColorValue = "mid", exports.double = 2, exports.doublePI = Math.PI * exports.double, exports.defaultFps = 60, exports.defaultAlpha = 1, exports.generatedTrue = "true", exports.generatedFalse = "false", exports.canvasTag = "canvas", exports.defaultRetryCount = 0, exports.squareExp = 2, exports.qTreeCapacity = 4, exports.defaultRemoveQuantity = 1, exports.defaultRatio = 1, exports.defaultReduceFactor = 1, exports.subdivideCount = 4, exports.inverseFactorNumerator = 1.0, exports.rgbMax = 255, exports.hMax = 360, exports.sMax = 100, exports.lMax = 100, exports.hMin = 0, exports.sMin = 0, exports.hPhase = 60, exports.empty = 0, exports.quarter = 0.25, exports.threeQuarter = exports.half + exports.quarter, exports.minVelocity = 0, exports.defaultTransformValue = 1, exports.minimumSize = 0, exports.minimumLength = 0, exports.zIndexFactorOffset = 1, exports.defaultOpacity = 1, exports.clickRadius = 1, exports.touchEndLengthOffset = 1, exports.minCoordinate = 0, exports.removeDeleteCount = 1, exports.removeMinIndex = 0, exports.defaultFpsLimit = 120, exports.minFpsLimit = 0, exports.canvasFirstIndex = 0, exports.loadRandomFactor = 10000, exports.loadMinIndex = 0, exports.one = 1, exports.none = 0, exports.decayOffset = 1, exports.tryCountIncrement = 1, exports.minRetries = 0, exports.rollFactor = 1, exports.minZ = 0, exports.defaultRadius = 0, exports.posOffset = -exports.quarter, exports.sizeFactor = 1.5, exports.minLimit = 0, exports.countOffset = 1, exports.minCount = 0, exports.minIndex = 0, exports.
|
|
22
|
+
}, exports.randomColorValue = "random", exports.midColorValue = "mid", exports.double = 2, exports.doublePI = Math.PI * exports.double, exports.defaultFps = 60, exports.defaultAlpha = 1, exports.generatedTrue = "true", exports.generatedFalse = "false", exports.canvasTag = "canvas", exports.defaultRetryCount = 0, exports.squareExp = 2, exports.qTreeCapacity = 4, exports.defaultRemoveQuantity = 1, exports.defaultRatio = 1, exports.defaultReduceFactor = 1, exports.subdivideCount = 4, exports.inverseFactorNumerator = 1.0, exports.rgbMax = 255, exports.hMax = 360, exports.sMax = 100, exports.lMax = 100, exports.hMin = 0, exports.sMin = 0, exports.hPhase = 60, exports.empty = 0, exports.quarter = 0.25, exports.threeQuarter = exports.half + exports.quarter, exports.minVelocity = 0, exports.defaultTransformValue = 1, exports.minimumSize = 0, exports.minimumLength = 0, exports.zIndexFactorOffset = 1, exports.defaultOpacity = 1, exports.clickRadius = 1, exports.touchEndLengthOffset = 1, exports.minCoordinate = 0, exports.removeDeleteCount = 1, exports.removeMinIndex = 0, exports.defaultFpsLimit = 120, exports.minFpsLimit = 0, exports.canvasFirstIndex = 0, exports.loadRandomFactor = 10000, exports.loadMinIndex = 0, exports.one = 1, exports.none = 0, exports.decayOffset = 1, exports.tryCountIncrement = 1, exports.minRetries = 0, exports.rollFactor = 1, exports.minZ = 0, exports.defaultRadius = 0, exports.posOffset = -exports.quarter, exports.sizeFactor = 1.5, exports.minLimit = 0, exports.countOffset = 1, exports.minCount = 0, exports.minIndex = 0, exports.lengthOffset = 1, exports.defaultDensityFactor = 1, exports.deleteCount = 1, exports.touchDelay = 500, exports.manualDefaultPosition = 50, exports.defaultAngle = 0, exports.identity = 1, exports.minStrokeWidth = 0, exports.lFactor = 1, exports.lMin = 0, exports.triple = 3, exports.sextuple = 6, exports.sNormalizedOffset = 1, exports.phaseNumerator = 1, exports.defaultRgbMin = 0, exports.defaultVelocity = 0, exports.defaultLoops = 0, exports.defaultTime = 0;
|
|
23
23
|
});
|