@tsparticles/engine 4.0.0-beta.0 → 4.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/155.min.js +1 -0
  2. package/README.md +0 -21
  3. package/browser/Core/CanvasManager.js +303 -0
  4. package/browser/Core/Container.js +61 -34
  5. package/browser/Core/Engine.js +26 -138
  6. package/browser/Core/Particle.js +29 -28
  7. package/{cjs/Core/Particles.js → browser/Core/ParticlesManager.js} +27 -57
  8. package/browser/Core/RenderManager.js +303 -0
  9. package/browser/Core/Retina.js +3 -8
  10. package/browser/Core/Utils/PluginManager.js +145 -0
  11. package/browser/Options/Classes/Options.js +7 -7
  12. package/browser/Options/Classes/Particles/ParticlesOptions.js +5 -5
  13. package/browser/Types/CanvasContextType.js +1 -0
  14. package/browser/Utils/CanvasUtils.js +1 -1
  15. package/browser/Utils/ColorUtils.js +21 -21
  16. package/browser/Utils/LogUtils.js +1 -0
  17. package/browser/Utils/OptionsUtils.js +2 -2
  18. package/cjs/Core/CanvasManager.js +303 -0
  19. package/cjs/Core/Container.js +61 -34
  20. package/cjs/Core/Engine.js +26 -138
  21. package/cjs/Core/Particle.js +29 -28
  22. package/{esm/Core/Particles.js → cjs/Core/ParticlesManager.js} +27 -57
  23. package/cjs/Core/RenderManager.js +303 -0
  24. package/cjs/Core/Retina.js +3 -8
  25. package/cjs/Core/Utils/PluginManager.js +145 -0
  26. package/cjs/Options/Classes/Options.js +7 -7
  27. package/cjs/Options/Classes/Particles/ParticlesOptions.js +5 -5
  28. package/cjs/Types/CanvasContextType.js +1 -0
  29. package/cjs/Utils/CanvasUtils.js +1 -1
  30. package/cjs/Utils/ColorUtils.js +21 -21
  31. package/cjs/Utils/LogUtils.js +1 -0
  32. package/cjs/Utils/OptionsUtils.js +2 -2
  33. package/dist_browser_Core_Container_js.js +24 -14
  34. package/esm/Core/CanvasManager.js +303 -0
  35. package/esm/Core/Container.js +61 -34
  36. package/esm/Core/Engine.js +26 -138
  37. package/esm/Core/Particle.js +29 -28
  38. package/{browser/Core/Particles.js → esm/Core/ParticlesManager.js} +27 -57
  39. package/esm/Core/RenderManager.js +303 -0
  40. package/esm/Core/Retina.js +3 -8
  41. package/esm/Core/Utils/PluginManager.js +145 -0
  42. package/esm/Options/Classes/Options.js +7 -7
  43. package/esm/Options/Classes/Particles/ParticlesOptions.js +5 -5
  44. package/esm/Types/CanvasContextType.js +1 -0
  45. package/esm/Utils/CanvasUtils.js +1 -1
  46. package/esm/Utils/ColorUtils.js +21 -21
  47. package/esm/Utils/LogUtils.js +1 -0
  48. package/esm/Utils/OptionsUtils.js +2 -2
  49. package/package.json +1 -1
  50. package/report.html +84 -29
  51. package/tsparticles.engine.js +18 -8
  52. package/tsparticles.engine.min.js +2 -2
  53. package/types/Core/CanvasManager.d.ts +39 -0
  54. package/types/Core/Container.d.ts +26 -7
  55. package/types/Core/Engine.d.ts +2 -54
  56. package/types/Core/Interfaces/IContainerPlugin.d.ts +8 -7
  57. package/types/Core/Interfaces/IDrawParticleParams.d.ts +2 -1
  58. package/types/Core/Interfaces/IParticleRetinaProps.d.ts +4 -4
  59. package/types/Core/Interfaces/IParticleUpdater.d.ts +2 -1
  60. package/types/Core/Interfaces/IShapeDrawData.d.ts +2 -1
  61. package/types/Core/Particle.d.ts +4 -4
  62. package/types/Core/{Particles.d.ts → ParticlesManager.d.ts} +4 -11
  63. package/types/Core/{Canvas.d.ts → RenderManager.d.ts} +12 -33
  64. package/types/Core/Retina.d.ts +0 -2
  65. package/types/Core/Utils/PluginManager.d.ts +62 -0
  66. package/types/Options/Classes/Options.d.ts +3 -3
  67. package/types/Options/Classes/Particles/ParticlesOptions.d.ts +3 -3
  68. package/types/Types/CanvasContextType.d.ts +1 -0
  69. package/types/Utils/CanvasUtils.d.ts +8 -5
  70. package/types/Utils/ColorUtils.d.ts +8 -8
  71. package/types/Utils/LogUtils.d.ts +1 -0
  72. package/types/Utils/OptionsUtils.d.ts +2 -2
  73. package/types/export-types.d.ts +4 -2
  74. package/umd/Core/CanvasManager.js +317 -0
  75. package/umd/Core/Container.js +61 -34
  76. package/umd/Core/Engine.js +25 -137
  77. package/umd/Core/Particle.js +29 -28
  78. package/umd/Core/{Particles.js → ParticlesManager.js} +29 -59
  79. package/umd/Core/RenderManager.js +317 -0
  80. package/umd/Core/Retina.js +3 -8
  81. package/umd/Core/Utils/PluginManager.js +159 -0
  82. package/umd/Options/Classes/Options.js +7 -7
  83. package/umd/Options/Classes/Particles/ParticlesOptions.js +5 -5
  84. package/umd/Types/CanvasContextType.js +12 -0
  85. package/umd/Utils/CanvasUtils.js +1 -1
  86. package/umd/Utils/ColorUtils.js +21 -21
  87. package/umd/Utils/LogUtils.js +1 -0
  88. package/umd/Utils/OptionsUtils.js +2 -2
  89. package/164.min.js +0 -1
  90. package/browser/Core/Canvas.js +0 -570
  91. package/cjs/Core/Canvas.js +0 -570
  92. package/esm/Core/Canvas.js +0 -570
  93. package/umd/Core/Canvas.js +0 -584
@@ -1,25 +1,18 @@
1
1
  import type { Container } from "./Container.js";
2
- import type { Engine } from "./Engine.js";
3
2
  import type { IContainerPlugin } from "./Interfaces/IContainerPlugin.js";
4
3
  import type { ICoordinates } from "./Interfaces/ICoordinates.js";
5
4
  import type { IDelta } from "./Interfaces/IDelta.js";
6
5
  import type { IDimension } from "./Interfaces/IDimension.js";
7
- import type { IEffectDrawer } from "./Interfaces/IEffectDrawer.js";
8
- import type { IParticleUpdater } from "./Interfaces/IParticleUpdater.js";
9
6
  import type { IParticlesOptions } from "../Options/Interfaces/Particles/IParticlesOptions.js";
10
- import type { IShapeDrawer } from "./Interfaces/IShapeDrawer.js";
11
7
  import { Particle } from "./Particle.js";
8
+ import type { PluginManager } from "./Utils/PluginManager.js";
12
9
  import type { RecursivePartial } from "../Types/RecursivePartial.js";
13
10
  import { SpatialHashGrid } from "./Utils/SpatialHashGrid.js";
14
- export declare class Particles {
11
+ export declare class ParticlesManager {
15
12
  checkParticlePositionPlugins: IContainerPlugin[];
16
- effectDrawers: Map<string, IEffectDrawer>;
17
13
  grid: SpatialHashGrid;
18
- shapeDrawers: Map<string, IShapeDrawer>;
19
- updaters: IParticleUpdater[];
20
14
  private _array;
21
15
  private readonly _container;
22
- private readonly _engine;
23
16
  private readonly _groupLimits;
24
17
  private _limit;
25
18
  private _maxZIndex;
@@ -28,13 +21,14 @@ export declare class Particles {
28
21
  private _nextId;
29
22
  private _particleResetPlugins;
30
23
  private _particleUpdatePlugins;
24
+ private readonly _pluginManager;
31
25
  private readonly _pool;
32
26
  private _postParticleUpdatePlugins;
33
27
  private _postUpdatePlugins;
34
28
  private _resizeFactor?;
35
29
  private _updatePlugins;
36
30
  private _zArray;
37
- constructor(engine: Engine, container: Container);
31
+ constructor(pluginManager: PluginManager, container: Container);
38
32
  get count(): number;
39
33
  addParticle(position?: ICoordinates, overrideOptions?: RecursivePartial<IParticlesOptions>, group?: string, initializer?: (particle: Particle) => boolean): Particle | undefined;
40
34
  clear(): void;
@@ -44,7 +38,6 @@ export declare class Particles {
44
38
  find(condition: (particle: Particle) => boolean): Particle | undefined;
45
39
  get(index: number): Particle | undefined;
46
40
  init(): Promise<void>;
47
- initPlugins(): Promise<void>;
48
41
  push(nb: number, position?: ICoordinates, overrideOptions?: RecursivePartial<IParticlesOptions>, group?: string): void;
49
42
  redraw(): Promise<void>;
50
43
  remove(particle: Particle, group?: string, override?: boolean): void;
@@ -1,70 +1,49 @@
1
+ import type { CanvasContextType } from "../Types/CanvasContextType.js";
2
+ import type { CanvasManager } from "./CanvasManager.js";
1
3
  import type { Container } from "./Container.js";
2
- import type { Engine } from "./Engine.js";
3
- import type { ICoordinates } from "./Interfaces/ICoordinates.js";
4
4
  import type { IDelta } from "./Interfaces/IDelta.js";
5
- import type { IDimension } from "./Interfaces/IDimension.js";
6
5
  import type { Particle } from "./Particle.js";
7
- export declare class Canvas {
8
- private readonly container;
9
- element?: HTMLCanvasElement;
10
- readonly size: IDimension;
11
- zoom: number;
6
+ import type { PluginManager } from "./Utils/PluginManager.js";
7
+ export declare class RenderManager {
12
8
  private _canvasClearPlugins;
9
+ private readonly _canvasManager;
13
10
  private _canvasPaintPlugins;
14
- private _canvasSettings?;
15
11
  private _clearDrawPlugins;
16
12
  private _colorPlugins;
13
+ private readonly _container;
17
14
  private _context;
15
+ private _contextSettings?;
18
16
  private _drawParticlePlugins;
19
17
  private _drawParticlesCleanupPlugins;
20
18
  private _drawParticlesSetupPlugins;
21
19
  private _drawPlugins;
22
20
  private _drawSettingsCleanupPlugins;
23
21
  private _drawSettingsSetupPlugins;
24
- private readonly _engine;
25
- private _generated;
26
- private _mutationObserver?;
27
- private _originalStyle?;
28
- private _pointerEvents;
22
+ private readonly _pluginManager;
29
23
  private _postDrawUpdaters;
30
24
  private _preDrawUpdaters;
31
- private _resizePlugins;
32
25
  private readonly _reusableColorStyles;
33
26
  private readonly _reusablePluginColors;
34
27
  private readonly _reusableTransform;
35
- private readonly _standardSize;
36
- private _zoomCenter?;
37
- constructor(container: Container, engine: Engine);
28
+ constructor(pluginManager: PluginManager, container: Container, canvasManager: CanvasManager);
38
29
  get settings(): CanvasRenderingContext2DSettings | undefined;
39
- private get _fullScreen();
40
30
  canvasClear(): void;
41
31
  clear(): void;
42
32
  destroy(): void;
43
- draw<T>(cb: (context: CanvasRenderingContext2D) => T): T | undefined;
33
+ draw<T>(cb: (context: CanvasContextType) => T): T | undefined;
44
34
  drawParticle(particle: Particle, delta: IDelta): void;
45
35
  drawParticlePlugins(particle: Particle, delta: IDelta): void;
46
36
  drawParticles(delta: IDelta): void;
47
- getZoomCenter(): ICoordinates;
48
37
  init(): void;
49
- initBackground(): void;
50
38
  initPlugins(): void;
51
39
  initUpdaters(): void;
52
- loadCanvas(canvas: HTMLCanvasElement): void;
53
40
  paint(): void;
54
41
  paintBase(baseColor?: string): void;
55
42
  paintImage(image: HTMLImageElement, opacity: number): void;
56
- resize(): boolean;
57
- setPointerEvents(type: string): void;
58
- setZoom(zoomLevel: number, center?: ICoordinates): void;
43
+ setContext(context: CanvasContextType | null): void;
44
+ setContextSettings(settings: CanvasRenderingContext2DSettings): void;
59
45
  stop(): void;
60
- windowResize(): Promise<void>;
61
46
  private readonly _applyPostDrawUpdaters;
62
47
  private readonly _applyPreDrawUpdaters;
63
- private readonly _applyResizePlugins;
64
48
  private readonly _getPluginParticleColors;
65
- private readonly _initStyle;
66
- private readonly _repairStyle;
67
- private readonly _resetOriginalStyle;
68
- private readonly _safeMutationObserver;
69
- private readonly _setFullScreenStyle;
70
49
  }
@@ -2,10 +2,8 @@ import type { Container } from "./Container.js";
2
2
  import type { Particle } from "./Particle.js";
3
3
  export declare class Retina {
4
4
  private readonly container;
5
- maxSpeed: number;
6
5
  pixelRatio: number;
7
6
  reduceFactor: number;
8
- sizeAnimationSpeed: number;
9
7
  constructor(container: Container);
10
8
  init(): void;
11
9
  initParticle(particle: Particle): void;
@@ -0,0 +1,62 @@
1
+ import type { EasingType, EasingTypeAlt } from "../../Enums/Types/EasingType.js";
2
+ import type { EffectInitializer, Initializers, ShapeInitializer, UpdaterInitializer } from "../../Types/EngineInitializers.js";
3
+ import type { Container } from "../Container.js";
4
+ import type { EasingFunction } from "../../Types/EasingFunction.js";
5
+ import type { Engine } from "../Engine.js";
6
+ import type { IColorManager } from "../Interfaces/IColorManager.js";
7
+ import type { IEffectDrawer } from "../Interfaces/IEffectDrawer.js";
8
+ import type { IPalette } from "../Interfaces/IPalette.js";
9
+ import type { IParticleUpdater } from "../Interfaces/IParticleUpdater.js";
10
+ import type { IParticlesOptions } from "../../Options/Interfaces/Particles/IParticlesOptions.js";
11
+ import type { IPlugin } from "../Interfaces/IPlugin.js";
12
+ import type { IShapeDrawer } from "../Interfaces/IShapeDrawer.js";
13
+ import type { ISourceOptions } from "../../Types/ISourceOptions.js";
14
+ import type { ParticlesOptions } from "../../Options/Classes/Particles/ParticlesOptions.js";
15
+ import type { RecursivePartial } from "../../Types/RecursivePartial.js";
16
+ type AsyncLoadPluginFunction = (engine: Engine) => Promise<void>;
17
+ type SyncLoadPluginFunction = (engine: Engine) => void;
18
+ type AsyncLoadPluginNoEngine = () => Promise<void>;
19
+ type SyncLoadPluginNoEngine = () => void;
20
+ type LoadPluginFunction = AsyncLoadPluginFunction | SyncLoadPluginFunction | AsyncLoadPluginNoEngine | SyncLoadPluginNoEngine;
21
+ export declare class PluginManager {
22
+ readonly colorManagers: Map<string, IColorManager>;
23
+ readonly easingFunctions: Map<EasingTypeAlt | EasingType, EasingFunction>;
24
+ readonly effectDrawers: Map<Container, Map<string, IEffectDrawer<import("../Particle.js").Particle>>>;
25
+ readonly initializers: Initializers;
26
+ readonly palettes: Map<string, IPalette>;
27
+ readonly plugins: IPlugin[];
28
+ readonly presets: Map<string, RecursivePartial<import("../../export-types.js").IOptions>>;
29
+ readonly shapeDrawers: Map<Container, Map<string, IShapeDrawer<import("../Particle.js").Particle>>>;
30
+ readonly updaters: Map<Container, IParticleUpdater[]>;
31
+ private _allLoadersSet;
32
+ private readonly _configs;
33
+ private readonly _engine;
34
+ private _executedSet;
35
+ private _initialized;
36
+ private _isRunningLoaders;
37
+ private readonly _loadPromises;
38
+ constructor(engine: Engine);
39
+ get configs(): Record<string, ISourceOptions>;
40
+ addColorManager(name: string, manager: IColorManager): void;
41
+ addConfig(config: ISourceOptions): void;
42
+ addEasing(name: EasingType | EasingTypeAlt, easing: EasingFunction): void;
43
+ addEffect(effect: string, drawer: EffectInitializer): void;
44
+ addPalette(name: string, palette: IPalette): void;
45
+ addParticleUpdater(name: string, updaterInitializer: UpdaterInitializer): void;
46
+ addPlugin(plugin: IPlugin): void;
47
+ addPreset(preset: string, options: Readonly<ISourceOptions>, override?: boolean): void;
48
+ addShape(shapes: string[], drawer: ShapeInitializer): void;
49
+ clearPlugins(container: Container): void;
50
+ getEasing(name: EasingType | EasingTypeAlt): EasingFunction;
51
+ getEffectDrawers(container: Container, force?: boolean): Promise<Map<string, IEffectDrawer>>;
52
+ getPalette(name: string): IPalette | undefined;
53
+ getPlugin(plugin: string): IPlugin | undefined;
54
+ getPreset(preset: string): ISourceOptions | undefined;
55
+ getShapeDrawers(container: Container, force?: boolean): Promise<Map<string, IShapeDrawer>>;
56
+ getUpdaters(container: Container, force?: boolean): Promise<IParticleUpdater[]>;
57
+ init(): Promise<void>;
58
+ loadParticlesOptions(container: Container, options: ParticlesOptions, ...sourceOptions: (RecursivePartial<IParticlesOptions> | undefined)[]): void;
59
+ register(...loaders: LoadPluginFunction[]): Promise<void>;
60
+ private _runLoader;
61
+ }
62
+ export {};
@@ -1,10 +1,10 @@
1
1
  import { Background } from "./Background/Background.js";
2
2
  import type { Container } from "../../Core/Container.js";
3
- import type { Engine } from "../../Core/Engine.js";
4
3
  import { FullScreen } from "./FullScreen/FullScreen.js";
5
4
  import type { IOptionLoader } from "../Interfaces/IOptionLoader.js";
6
5
  import type { IOptions } from "../Interfaces/IOptions.js";
7
6
  import type { ISourceOptions } from "../../Types/ISourceOptions.js";
7
+ import type { PluginManager } from "../../Core/Utils/PluginManager.js";
8
8
  import type { RangeValue } from "../../Types/RangeValue.js";
9
9
  import type { RecursivePartial } from "../../Types/RecursivePartial.js";
10
10
  import { ResizeEvent } from "./ResizeEvent.js";
@@ -37,8 +37,8 @@ export declare class Options implements IOptions, IOptionLoader<IOptions> {
37
37
  style: RecursivePartial<CSSStyleDeclaration>;
38
38
  zLayers: number;
39
39
  private readonly _container;
40
- private readonly _engine;
41
- constructor(engine: Engine, container: Container);
40
+ private readonly _pluginManager;
41
+ constructor(pluginManager: PluginManager, container: Container);
42
42
  load(data?: ISourceOptions): void;
43
43
  private readonly _importPalette;
44
44
  private readonly _importPreset;
@@ -1,6 +1,5 @@
1
1
  import type { Container } from "../../../Core/Container.js";
2
2
  import { Effect } from "./Effect/Effect.js";
3
- import type { Engine } from "../../../Core/Engine.js";
4
3
  import { Fill } from "./Fill.js";
5
4
  import type { IOptionLoader } from "../../Interfaces/IOptionLoader.js";
6
5
  import type { IParticlesOptions } from "../../Interfaces/Particles/IParticlesOptions.js";
@@ -9,6 +8,7 @@ import { Opacity } from "./Opacity/Opacity.js";
9
8
  import { ParticlesBounce } from "./Bounce/ParticlesBounce.js";
10
9
  import type { ParticlesGroups } from "../../../Types/ParticlesGroups.js";
11
10
  import { ParticlesNumber } from "./Number/ParticlesNumber.js";
11
+ import type { PluginManager } from "../../../Core/Utils/PluginManager.js";
12
12
  import type { RecursivePartial } from "../../../Types/RecursivePartial.js";
13
13
  import { Shape } from "./Shape/Shape.js";
14
14
  import type { SingleOrMultiple } from "../../../Types/SingleOrMultiple.js";
@@ -30,7 +30,7 @@ export declare class ParticlesOptions implements IParticlesOptions, IOptionLoade
30
30
  stroke: SingleOrMultiple<Stroke>;
31
31
  readonly zIndex: ZIndex;
32
32
  private readonly _container;
33
- private readonly _engine;
34
- constructor(engine: Engine, container?: Container);
33
+ private readonly _pluginManager;
34
+ constructor(pluginManager: PluginManager, container?: Container);
35
35
  load(data?: RecursivePartial<IParticlesOptions>): void;
36
36
  }
@@ -0,0 +1 @@
1
+ export type CanvasContextType = CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D;
@@ -1,16 +1,19 @@
1
- import type { IEffectDrawer, IShapeDrawData, IShapeDrawer } from "../export-types.js";
1
+ import type { CanvasContextType } from "../Types/CanvasContextType.js";
2
2
  import type { IContainerPlugin } from "../Core/Interfaces/IContainerPlugin.js";
3
3
  import type { IDelta } from "../Core/Interfaces/IDelta.js";
4
4
  import type { IDimension } from "../Core/Interfaces/IDimension.js";
5
5
  import type { IDrawParticleParams } from "../Core/Interfaces/IDrawParticleParams.js";
6
+ import type { IEffectDrawer } from "../Core/Interfaces/IEffectDrawer.js";
7
+ import type { IShapeDrawData } from "../Core/Interfaces/IShapeDrawData.js";
8
+ import type { IShapeDrawer } from "../Core/Interfaces/IShapeDrawer.js";
6
9
  import type { Particle } from "../Core/Particle.js";
7
- export declare function paintBase(context: CanvasRenderingContext2D, dimension: IDimension, baseColor?: string): void;
8
- export declare function paintImage(context: CanvasRenderingContext2D, dimension: IDimension, image: HTMLImageElement | undefined, opacity: number): void;
9
- export declare function clear(context: CanvasRenderingContext2D, dimension: IDimension): void;
10
+ export declare function paintBase(context: CanvasContextType, dimension: IDimension, baseColor?: string): void;
11
+ export declare function paintImage(context: CanvasContextType, dimension: IDimension, image: HTMLImageElement | undefined, opacity: number): void;
12
+ export declare function clear(context: CanvasContextType, dimension: IDimension): void;
10
13
  export declare function drawParticle(data: IDrawParticleParams): void;
11
14
  export declare function drawAfterEffect(drawer: IEffectDrawer | undefined, data: IShapeDrawData): void;
12
15
  export declare function drawBeforeEffect(drawer: IEffectDrawer | undefined, data: IShapeDrawData): void;
13
16
  export declare function drawShape(drawer: IShapeDrawer | undefined, data: IShapeDrawData): void;
14
17
  export declare function drawShapeAfterDraw(drawer: IShapeDrawer | undefined, data: IShapeDrawData): void;
15
18
  export declare function drawShapeBeforeDraw(drawer: IShapeDrawer | undefined, data: IShapeDrawData): void;
16
- export declare function drawParticlePlugin(context: CanvasRenderingContext2D, plugin: IContainerPlugin, particle: Particle, delta: IDelta): void;
19
+ export declare function drawParticlePlugin(context: CanvasContextType, plugin: IContainerPlugin, particle: Particle, delta: IDelta): void;
@@ -1,19 +1,19 @@
1
1
  import type { IColor, IHsl, IHsla, IRangeColor, IRgb, IRgba } from "../Core/Interfaces/Colors.js";
2
2
  import { AlterType } from "../Enums/Types/AlterType.js";
3
- import type { Engine } from "../Core/Engine.js";
4
3
  import type { HslAnimation } from "../Options/Classes/HslAnimation.js";
5
4
  import type { IDelta } from "../Core/Interfaces/IDelta.js";
6
5
  import type { IOptionsColor } from "../Options/Interfaces/IOptionsColor.js";
7
6
  import type { IParticleColorAnimation } from "../Core/Interfaces/IParticleValueAnimation.js";
8
7
  import type { IParticleHslAnimation } from "../Core/Interfaces/IParticleHslAnimation.js";
9
8
  import type { Particle } from "../Core/Particle.js";
10
- export declare function rangeColorToRgb(engine: Engine, input?: string | IRangeColor, index?: number, useIndex?: boolean): IRgb | undefined;
11
- export declare function colorToRgb(engine: Engine, input?: string | IColor, index?: number, useIndex?: boolean): IRgb | undefined;
12
- export declare function colorToHsl(engine: Engine, color: string | IColor | undefined, index?: number, useIndex?: boolean): IHsl | undefined;
13
- export declare function rangeColorToHsl(engine: Engine, color: string | IRangeColor | undefined, index?: number, useIndex?: boolean): IHsl | undefined;
9
+ import type { PluginManager } from "../Core/Utils/PluginManager.js";
10
+ export declare function rangeColorToRgb(pluginManager: PluginManager, input?: string | IRangeColor, index?: number, useIndex?: boolean): IRgb | undefined;
11
+ export declare function colorToRgb(pluginManager: PluginManager, input?: string | IColor, index?: number, useIndex?: boolean): IRgb | undefined;
12
+ export declare function colorToHsl(pluginManager: PluginManager, color: string | IColor | undefined, index?: number, useIndex?: boolean): IHsl | undefined;
13
+ export declare function rangeColorToHsl(pluginManager: PluginManager, color: string | IRangeColor | undefined, index?: number, useIndex?: boolean): IHsl | undefined;
14
14
  export declare function rgbToHsl(color: IRgb): IHsl;
15
- export declare function stringToAlpha(engine: Engine, input: string): number | undefined;
16
- export declare function stringToRgb(engine: Engine, input: string): IRgb | undefined;
15
+ export declare function stringToAlpha(pluginManager: PluginManager, input: string): number | undefined;
16
+ export declare function stringToRgb(pluginManager: PluginManager, input: string): IRgb | undefined;
17
17
  export declare function hslToRgb(hsl: IHsl): IRgb;
18
18
  export declare function hslaToRgba(hsla: IHsla): IRgba;
19
19
  export declare function getRandomRgbColor(min?: number): IRgb;
@@ -21,7 +21,7 @@ export declare function getStyleFromRgb(color: IRgb, hdr: boolean, opacity?: num
21
21
  export declare function getStyleFromHsl(color: IHsl, hdr: boolean, opacity?: number): string;
22
22
  export declare function colorMix(color1: IRgb | IHsl, color2: IRgb | IHsl, size1: number, size2: number): IRgb;
23
23
  export declare function getLinkColor(p1: Particle, p2?: Particle, linkColor?: string | IRgb): IRgb | undefined;
24
- export declare function getLinkRandomColor(engine: Engine, optColor: string | IOptionsColor, blink: boolean, consent: boolean): IRgb | string | undefined;
24
+ export declare function getLinkRandomColor(pluginManager: PluginManager, optColor: string | IOptionsColor, blink: boolean, consent: boolean): IRgb | string | undefined;
25
25
  export declare function getHslFromAnimation(animation?: IParticleHslAnimation): IHsl | undefined;
26
26
  export declare function getHslAnimationFromHsl(hsl: IHsl, animationOptions: HslAnimation | undefined, reduceFactor: number): IParticleHslAnimation;
27
27
  export declare function updateColorValue(data: IParticleColorAnimation, decrease: boolean, delta: IDelta): void;
@@ -3,6 +3,7 @@ interface ILogger {
3
3
  error(this: void, message?: unknown, ...optionalParams: unknown[]): void;
4
4
  info(this: void, message?: unknown, ...optionalParams: unknown[]): void;
5
5
  log(this: void, message?: unknown, ...optionalParams: unknown[]): void;
6
+ trace(this: void, ...data: unknown[]): void;
6
7
  verbose(this: void, message?: unknown, ...optionalParams: unknown[]): void;
7
8
  warning(this: void, message?: unknown, ...optionalParams: unknown[]): void;
8
9
  }
@@ -1,8 +1,8 @@
1
1
  import type { Container } from "../Core/Container.js";
2
- import type { Engine } from "../Core/Engine.js";
3
2
  import type { IOptionLoader } from "../Options/Interfaces/IOptionLoader.js";
4
3
  import type { IParticlesOptions } from "../Options/Interfaces/Particles/IParticlesOptions.js";
5
4
  import { ParticlesOptions } from "../Options/Classes/Particles/ParticlesOptions.js";
5
+ import type { PluginManager } from "../Core/Utils/PluginManager.js";
6
6
  import type { RecursivePartial } from "../Types/RecursivePartial.js";
7
7
  export declare function loadOptions<T>(options: IOptionLoader<T>, ...sourceOptionsArr: RecursivePartial<T | undefined>[]): void;
8
- export declare function loadParticlesOptions(engine: Engine, container: Container, ...sourceOptionsArr: RecursivePartial<IParticlesOptions | undefined>[]): ParticlesOptions;
8
+ export declare function loadParticlesOptions(pluginManager: PluginManager, container: Container, ...sourceOptionsArr: RecursivePartial<IParticlesOptions | undefined>[]): ParticlesOptions;
@@ -60,6 +60,7 @@ export type * from "./Options/Interfaces/Particles/Shape/IShape.js";
60
60
  export type * from "./Options/Interfaces/Particles/Size/ISize.js";
61
61
  export type * from "./Options/Interfaces/Particles/Size/ISizeAnimation.js";
62
62
  export type * from "./Options/Interfaces/Particles/ZIndex/IZIndex.js";
63
+ export type * from "./Types/CanvasContextType.js";
63
64
  export type * from "./Types/CustomEventArgs.js";
64
65
  export type * from "./Types/CustomEventListener.js";
65
66
  export type * from "./Types/EasingFunction.js";
@@ -74,9 +75,10 @@ export type * from "./Types/ShapeData.js";
74
75
  export type * from "./Types/SingleOrMultiple.js";
75
76
  export type { EventListeners } from "./Core/Utils/EventListeners.js";
76
77
  export type { SpatialHashGrid } from "./Core/Utils/SpatialHashGrid.js";
77
- export type { Canvas } from "./Core/Canvas.js";
78
+ export type { CanvasManager } from "./Core/CanvasManager.js";
78
79
  export type { Container } from "./Core/Container.js";
79
80
  export type { Particle } from "./Core/Particle.js";
80
- export type { Particles } from "./Core/Particles.js";
81
+ export type { ParticlesManager } from "./Core/ParticlesManager.js";
81
82
  export type { Retina } from "./Core/Retina.js";
82
83
  export type { Engine } from "./Core/Engine.js";
84
+ export type { PluginManager } from "./Core/Utils/PluginManager.js";