@tsparticles/engine 4.0.0-beta.16 → 4.0.0-beta.17
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/CanvasManager.js +73 -36
- package/browser/Core/Engine.js +11 -5
- package/browser/Core/Particle.js +1 -3
- package/browser/Core/ParticlesManager.js +157 -78
- package/browser/Core/Retina.js +2 -3
- package/browser/Core/Utils/EventListeners.js +1 -1
- package/cjs/Core/CanvasManager.js +73 -36
- package/cjs/Core/Engine.js +11 -5
- package/cjs/Core/Particle.js +1 -3
- package/cjs/Core/ParticlesManager.js +157 -78
- package/cjs/Core/Retina.js +2 -3
- package/cjs/Core/Utils/EventListeners.js +1 -1
- package/esm/Core/CanvasManager.js +73 -36
- package/esm/Core/Engine.js +11 -5
- package/esm/Core/Particle.js +1 -3
- package/esm/Core/ParticlesManager.js +157 -78
- package/esm/Core/Retina.js +2 -3
- package/esm/Core/Utils/EventListeners.js +1 -1
- package/package.json +1 -1
- package/report.html +1 -1
- package/scripts/install.js +321 -220
- package/tsparticles.engine.js +245 -126
- package/tsparticles.engine.min.js +1 -1
- package/types/Core/CanvasManager.d.ts +3 -2
- package/types/Core/Container.d.ts +1 -2
- package/types/Core/Interfaces/IContainerPlugin.d.ts +7 -8
- package/types/Core/Interfaces/IDrawParticleParams.d.ts +1 -2
- package/types/Core/Interfaces/ILoadParams.d.ts +1 -1
- package/types/Core/Interfaces/IParticleUpdater.d.ts +1 -2
- package/types/Core/Interfaces/IShapeDrawData.d.ts +1 -2
- package/types/Core/ParticlesManager.d.ts +11 -5
- package/types/Core/RenderManager.d.ts +2 -3
- package/types/Core/Utils/PluginManager.d.ts +5 -6
- package/types/Options/Classes/Options.d.ts +1 -2
- package/types/Utils/CanvasUtils.d.ts +4 -5
- package/types/Utils/LogUtils.d.ts +1 -2
- package/types/Utils/Utils.d.ts +1 -2
- package/types/export-types.d.ts +0 -1
- package/browser/Types/CanvasContextType.js +0 -1
- package/cjs/Types/CanvasContextType.js +0 -1
- package/esm/Types/CanvasContextType.js +0 -1
- package/types/Types/CanvasContextType.d.ts +0 -1
|
@@ -9,7 +9,7 @@ import type { RangeValue } from "../../Types/RangeValue.js";
|
|
|
9
9
|
import type { RecursivePartial } from "../../Types/RecursivePartial.js";
|
|
10
10
|
import { ResizeEvent } from "./ResizeEvent.js";
|
|
11
11
|
import type { SingleOrMultiple } from "../../Types/SingleOrMultiple.js";
|
|
12
|
-
interface DefaultThemes {
|
|
12
|
+
export interface DefaultThemes {
|
|
13
13
|
dark?: string;
|
|
14
14
|
light?: string;
|
|
15
15
|
}
|
|
@@ -43,4 +43,3 @@ export declare class Options implements IOptions, IOptionLoader<IOptions> {
|
|
|
43
43
|
private readonly _importPalette;
|
|
44
44
|
private readonly _importPreset;
|
|
45
45
|
}
|
|
46
|
-
export {};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { CanvasContextType } from "../Types/CanvasContextType.js";
|
|
2
1
|
import type { IContainerPlugin } from "../Core/Interfaces/IContainerPlugin.js";
|
|
3
2
|
import type { IDelta } from "../Core/Interfaces/IDelta.js";
|
|
4
3
|
import type { IDimension } from "../Core/Interfaces/IDimension.js";
|
|
@@ -7,13 +6,13 @@ import type { IEffectDrawer } from "../Core/Interfaces/IEffectDrawer.js";
|
|
|
7
6
|
import type { IShapeDrawData } from "../Core/Interfaces/IShapeDrawData.js";
|
|
8
7
|
import type { IShapeDrawer } from "../Core/Interfaces/IShapeDrawer.js";
|
|
9
8
|
import type { Particle } from "../Core/Particle.js";
|
|
10
|
-
export declare function paintBase(context:
|
|
11
|
-
export declare function paintImage(context:
|
|
12
|
-
export declare function clear(context:
|
|
9
|
+
export declare function paintBase(context: OffscreenCanvasRenderingContext2D, dimension: IDimension, baseColor?: string): void;
|
|
10
|
+
export declare function paintImage(context: OffscreenCanvasRenderingContext2D, dimension: IDimension, image: HTMLImageElement | undefined, opacity: number): void;
|
|
11
|
+
export declare function clear(context: OffscreenCanvasRenderingContext2D, dimension: IDimension): void;
|
|
13
12
|
export declare function drawParticle(data: IDrawParticleParams): void;
|
|
14
13
|
export declare function drawAfterEffect(drawer: IEffectDrawer | undefined, data: IShapeDrawData): void;
|
|
15
14
|
export declare function drawBeforeEffect(drawer: IEffectDrawer | undefined, data: IShapeDrawData): void;
|
|
16
15
|
export declare function drawShape(drawer: IShapeDrawer | undefined, data: IShapeDrawData): void;
|
|
17
16
|
export declare function drawShapeAfterDraw(drawer: IShapeDrawer | undefined, data: IShapeDrawData): void;
|
|
18
17
|
export declare function drawShapeBeforeDraw(drawer: IShapeDrawer | undefined, data: IShapeDrawData): void;
|
|
19
|
-
export declare function drawParticlePlugin(context:
|
|
18
|
+
export declare function drawParticlePlugin(context: OffscreenCanvasRenderingContext2D, plugin: IContainerPlugin, particle: Particle, delta: IDelta): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
interface ILogger {
|
|
1
|
+
export interface ILogger {
|
|
2
2
|
debug(this: void, message?: unknown, ...optionalParams: unknown[]): void;
|
|
3
3
|
error(this: void, message?: unknown, ...optionalParams: unknown[]): void;
|
|
4
4
|
info(this: void, message?: unknown, ...optionalParams: unknown[]): void;
|
|
@@ -9,4 +9,3 @@ interface ILogger {
|
|
|
9
9
|
}
|
|
10
10
|
export declare function setLogger(logger: Partial<ILogger>): void;
|
|
11
11
|
export declare function getLogger(): ILogger;
|
|
12
|
-
export {};
|
package/types/Utils/Utils.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { OutModeDirection } from "../Enums/Directions/OutModeDirection.js";
|
|
|
11
11
|
import type { Particle } from "../Core/Particle.js";
|
|
12
12
|
import type { RangedAnimationValueWithRandom } from "../Options/Classes/ValueWithRandom.js";
|
|
13
13
|
import type { SingleOrMultiple } from "../Types/SingleOrMultiple.js";
|
|
14
|
-
interface MemoizeOptions<TArgs> {
|
|
14
|
+
export interface MemoizeOptions<TArgs> {
|
|
15
15
|
keyFn?: (args: TArgs) => string;
|
|
16
16
|
maxSize?: number;
|
|
17
17
|
ttlMs?: number;
|
|
@@ -43,4 +43,3 @@ export declare const getFullScreenStyle: (zIndex: number) => CSSStyleDeclaration
|
|
|
43
43
|
export declare function manageListener(element: HTMLElement | Node | Window | MediaQueryList | typeof globalThis, event: string, handler: EventListenerOrEventListenerObject, add: boolean, options?: boolean | AddEventListenerOptions | EventListenerObject): void;
|
|
44
44
|
export declare function getItemsFromInitializer<TItem, TInitializer extends GenericInitializer<TItem>>(container: Container, map: Map<Container, TItem[]>, initializers: Map<string, TInitializer>, force?: boolean): Promise<TItem[]>;
|
|
45
45
|
export declare function getItemMapFromInitializer<TItem, TInitializer extends GenericInitializer<TItem>>(container: Container, map: Map<Container, Map<string, TItem>>, initializers: Map<string, TInitializer>, force?: boolean): Promise<Map<string, TItem>>;
|
|
46
|
-
export {};
|
package/types/export-types.d.ts
CHANGED
|
@@ -61,7 +61,6 @@ export type * from "./Options/Interfaces/Particles/Shape/IShape.js";
|
|
|
61
61
|
export type * from "./Options/Interfaces/Particles/Size/ISize.js";
|
|
62
62
|
export type * from "./Options/Interfaces/Particles/Size/ISizeAnimation.js";
|
|
63
63
|
export type * from "./Options/Interfaces/Particles/ZIndex/IZIndex.js";
|
|
64
|
-
export type * from "./Types/CanvasContextType.js";
|
|
65
64
|
export type * from "./Types/CustomEventArgs.js";
|
|
66
65
|
export type * from "./Types/CustomEventListener.js";
|
|
67
66
|
export type * from "./Types/EasingFunction.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type CanvasContextType = CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D;
|