@tsparticles/engine 3.0.0-beta.2 → 3.0.0-beta.4
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/Canvas.js +2 -2
- package/browser/Core/Container.js +39 -24
- package/browser/Core/Engine.js +26 -53
- package/browser/Core/Particle.js +88 -53
- package/browser/Core/Particles.js +51 -26
- package/browser/Core/Retina.js +0 -2
- package/browser/Core/Utils/QuadTree.js +1 -1
- package/browser/Options/Classes/BackgroundMask/BackgroundMask.js +1 -2
- package/browser/Options/Classes/ColorAnimation.js +4 -24
- package/browser/Options/Classes/Particles/Bounce/ParticlesBounceFactor.js +0 -1
- package/browser/Options/Classes/Particles/Effect/Effect.js +32 -0
- package/browser/Options/Classes/Particles/Number/ParticlesNumber.js +3 -5
- package/browser/Options/Classes/Particles/Number/ParticlesNumberLimit.js +17 -0
- package/browser/Options/Classes/Particles/Opacity/Opacity.js +2 -3
- package/browser/Options/Classes/Particles/ParticlesOptions.js +3 -0
- package/browser/Options/Classes/Particles/Size/Size.js +2 -3
- package/browser/Options/Classes/ValueWithRandom.js +1 -10
- package/browser/Utils/CanvasUtils.js +29 -21
- package/browser/Utils/ColorUtils.js +24 -38
- package/browser/Utils/NumberUtils.js +7 -16
- package/browser/Utils/Utils.js +13 -7
- package/browser/export-types.js +4 -2
- package/browser/exports.js +2 -3
- package/cjs/Core/Canvas.js +2 -2
- package/cjs/Core/Container.js +39 -24
- package/cjs/Core/Engine.js +25 -52
- package/cjs/Core/Particle.js +87 -52
- package/cjs/Core/Particles.js +51 -26
- package/cjs/Core/Retina.js +0 -2
- package/cjs/Core/Utils/QuadTree.js +1 -1
- package/cjs/Options/Classes/BackgroundMask/BackgroundMask.js +1 -2
- package/cjs/Options/Classes/ColorAnimation.js +4 -24
- package/cjs/Options/Classes/Particles/Bounce/ParticlesBounceFactor.js +0 -1
- package/cjs/Options/Classes/Particles/Effect/Effect.js +36 -0
- package/cjs/Options/Classes/Particles/Number/ParticlesNumber.js +3 -5
- package/cjs/Options/Classes/Particles/Number/ParticlesNumberLimit.js +21 -0
- package/cjs/Options/Classes/Particles/Opacity/Opacity.js +1 -2
- package/cjs/Options/Classes/Particles/ParticlesOptions.js +3 -0
- package/cjs/Options/Classes/Particles/Size/Size.js +2 -3
- package/cjs/Options/Classes/ValueWithRandom.js +1 -10
- package/cjs/Utils/CanvasUtils.js +32 -24
- package/cjs/Utils/ColorUtils.js +24 -38
- package/cjs/Utils/NumberUtils.js +8 -18
- package/cjs/Utils/Utils.js +14 -7
- package/cjs/export-types.js +4 -2
- package/cjs/exports.js +2 -3
- package/esm/Core/Canvas.js +2 -2
- package/esm/Core/Container.js +39 -24
- package/esm/Core/Engine.js +26 -53
- package/esm/Core/Particle.js +88 -53
- package/esm/Core/Particles.js +51 -26
- package/esm/Core/Retina.js +0 -2
- package/esm/Core/Utils/QuadTree.js +1 -1
- package/esm/Options/Classes/BackgroundMask/BackgroundMask.js +1 -2
- package/esm/Options/Classes/ColorAnimation.js +4 -24
- package/esm/Options/Classes/Particles/Bounce/ParticlesBounceFactor.js +0 -1
- package/esm/Options/Classes/Particles/Effect/Effect.js +32 -0
- package/esm/Options/Classes/Particles/Number/ParticlesNumber.js +3 -5
- package/esm/Options/Classes/Particles/Number/ParticlesNumberLimit.js +17 -0
- package/esm/Options/Classes/Particles/Opacity/Opacity.js +2 -3
- package/esm/Options/Classes/Particles/ParticlesOptions.js +3 -0
- package/esm/Options/Classes/Particles/Size/Size.js +2 -3
- package/esm/Options/Classes/ValueWithRandom.js +1 -10
- package/esm/Utils/CanvasUtils.js +29 -21
- package/esm/Utils/ColorUtils.js +24 -38
- package/esm/Utils/NumberUtils.js +7 -16
- package/esm/Utils/Utils.js +13 -7
- package/esm/export-types.js +4 -2
- package/esm/exports.js +2 -3
- package/package.json +1 -1
- package/report.html +4 -22
- package/tsparticles.engine.js +461 -347
- package/tsparticles.engine.min.js +1 -1
- package/tsparticles.engine.min.js.LICENSE.txt +1 -1
- package/types/Core/Canvas.d.ts +0 -1
- package/types/Core/Container.d.ts +9 -8
- package/types/Core/Engine.d.ts +9 -5
- package/types/Core/Interfaces/IContainerPlugin.d.ts +2 -3
- package/types/Core/Interfaces/IEffectDrawer.d.ts +10 -0
- package/types/Core/Interfaces/IExternalInteractor.d.ts +3 -4
- package/types/Core/Interfaces/IInteractor.d.ts +3 -3
- package/types/Core/Interfaces/IParticleRetinaProps.d.ts +0 -1
- package/types/Core/Interfaces/IParticlesInteractor.d.ts +3 -3
- package/types/Core/Interfaces/IShapeDrawData.d.ts +10 -0
- package/types/Core/Interfaces/IShapeDrawer.d.ts +11 -9
- package/types/Core/Particle.d.ts +7 -5
- package/types/Core/Particles.d.ts +10 -7
- package/types/Core/Retina.d.ts +0 -1
- package/types/Core/Utils/ExternalInteractorBase.d.ts +4 -4
- package/types/Core/Utils/InteractionManager.d.ts +1 -2
- package/types/Core/Utils/ParticlesInteractorBase.d.ts +5 -5
- package/types/Enums/Modes/LimitMode.d.ts +4 -0
- package/types/Enums/Types/EasingType.d.ts +3 -0
- package/types/Enums/Types/EventType.d.ts +1 -0
- package/types/Options/Classes/BackgroundMask/BackgroundMask.d.ts +1 -1
- package/types/Options/Classes/ColorAnimation.d.ts +2 -7
- package/types/Options/Classes/Interactivity/Events/ClickEvent.d.ts +1 -2
- package/types/Options/Classes/Interactivity/Events/DivEvent.d.ts +1 -2
- package/types/Options/Classes/Interactivity/Events/Events.d.ts +3 -3
- package/types/Options/Classes/Interactivity/Events/HoverEvent.d.ts +2 -3
- package/types/Options/Classes/Interactivity/Interactivity.d.ts +2 -2
- package/types/Options/Classes/Options.d.ts +6 -6
- package/types/Options/Classes/Particles/Bounce/ParticlesBounce.d.ts +2 -2
- package/types/Options/Classes/Particles/Collisions/Collisions.d.ts +3 -3
- package/types/Options/Classes/Particles/Effect/Effect.d.ts +13 -0
- package/types/Options/Classes/Particles/Move/Move.d.ts +8 -8
- package/types/Options/Classes/Particles/Move/MoveTrail.d.ts +1 -1
- package/types/Options/Classes/Particles/Number/ParticlesNumber.d.ts +3 -2
- package/types/Options/Classes/Particles/Number/ParticlesNumberLimit.d.ts +10 -0
- package/types/Options/Classes/Particles/Opacity/Opacity.d.ts +3 -3
- package/types/Options/Classes/Particles/ParticlesOptions.d.ts +12 -10
- package/types/Options/Classes/Particles/Size/Size.d.ts +3 -3
- package/types/Options/Classes/Theme/Theme.d.ts +1 -1
- package/types/Options/Classes/ValueWithRandom.d.ts +2 -4
- package/types/Options/Interfaces/IValueWithRandom.d.ts +0 -2
- package/types/Options/Interfaces/Interactivity/Events/IClickEvent.d.ts +1 -2
- package/types/Options/Interfaces/Interactivity/Events/IDivEvent.d.ts +1 -2
- package/types/Options/Interfaces/Interactivity/Events/IHoverEvent.d.ts +1 -2
- package/types/Options/Interfaces/Particles/Effect/IEffect.d.ts +8 -0
- package/types/Options/Interfaces/Particles/IParticlesOptions.d.ts +2 -0
- package/types/Options/Interfaces/Particles/Number/IParticlesNumber.d.ts +2 -1
- package/types/Options/Interfaces/Particles/Number/IParticlesNumberLimit.d.ts +5 -0
- package/types/Types/CustomEventArgs.d.ts +1 -1
- package/types/Utils/CanvasUtils.d.ts +12 -3
- package/types/Utils/ColorUtils.d.ts +2 -2
- package/types/Utils/NumberUtils.d.ts +0 -2
- package/types/Utils/Utils.d.ts +6 -6
- package/types/export-types.d.ts +5 -2
- package/types/exports.d.ts +2 -3
- package/umd/Core/Canvas.js +2 -2
- package/umd/Core/Container.js +40 -25
- package/umd/Core/Engine.js +25 -52
- package/umd/Core/Particle.js +87 -52
- package/umd/Core/Particles.js +51 -26
- package/umd/Core/Retina.js +0 -2
- package/umd/Core/Utils/QuadTree.js +1 -1
- package/umd/Options/Classes/BackgroundMask/BackgroundMask.js +1 -2
- package/umd/Options/Classes/ColorAnimation.js +5 -25
- package/umd/Options/Classes/Particles/Bounce/ParticlesBounceFactor.js +0 -1
- package/umd/Options/Classes/Particles/Effect/Effect.js +46 -0
- package/umd/Options/Classes/Particles/Number/ParticlesNumber.js +4 -6
- package/umd/Options/Classes/{Random.js → Particles/Number/ParticlesNumberLimit.js} +9 -9
- package/umd/Options/Classes/Particles/Opacity/Opacity.js +1 -2
- package/umd/Options/Classes/Particles/ParticlesOptions.js +4 -1
- package/umd/Options/Classes/Particles/Size/Size.js +3 -4
- package/umd/Options/Classes/ValueWithRandom.js +2 -11
- package/umd/Utils/CanvasUtils.js +32 -24
- package/umd/Utils/ColorUtils.js +24 -38
- package/umd/Utils/NumberUtils.js +9 -19
- package/umd/Utils/Utils.js +14 -7
- package/umd/export-types.js +5 -3
- package/umd/exports.js +3 -4
- package/browser/Options/Classes/Random.js +0 -17
- package/cjs/Options/Classes/Random.js +0 -21
- package/cjs/Types/ShapeDrawerFunctions.js +0 -2
- package/esm/Options/Classes/Random.js +0 -17
- package/esm/Options/Interfaces/IRandom.js +0 -1
- package/esm/Types/ShapeDrawerFunctions.js +0 -1
- package/types/Core/Interfaces/IParticle.d.ts +0 -48
- package/types/Enums/Modes/ClickMode.d.ts +0 -9
- package/types/Enums/Modes/DivMode.d.ts +0 -5
- package/types/Enums/Modes/HoverMode.d.ts +0 -11
- package/types/Options/Classes/Random.d.ts +0 -9
- package/types/Options/Interfaces/IRandom.d.ts +0 -4
- package/types/Types/ShapeDrawerFunctions.d.ts +0 -10
- package/umd/Types/ShapeDrawerFunctions.js +0 -12
- /package/browser/Core/Interfaces/{IParticle.js → IEffectDrawer.js} +0 -0
- /package/browser/{Enums/Modes/ClickMode.js → Core/Interfaces/IShapeDrawData.js} +0 -0
- /package/browser/Enums/Modes/{DivMode.js → LimitMode.js} +0 -0
- /package/browser/{Enums/Modes/HoverMode.js → Options/Interfaces/Particles/Effect/IEffect.js} +0 -0
- /package/browser/Options/Interfaces/{IRandom.js → Particles/Number/IParticlesNumberLimit.js} +0 -0
- /package/cjs/Core/Interfaces/{IParticle.js → IEffectDrawer.js} +0 -0
- /package/cjs/{Enums/Modes/ClickMode.js → Core/Interfaces/IShapeDrawData.js} +0 -0
- /package/cjs/Enums/Modes/{DivMode.js → LimitMode.js} +0 -0
- /package/cjs/{Enums/Modes/HoverMode.js → Options/Interfaces/Particles/Effect/IEffect.js} +0 -0
- /package/cjs/Options/Interfaces/{IRandom.js → Particles/Number/IParticlesNumberLimit.js} +0 -0
- /package/{browser/Types/ShapeDrawerFunctions.js → esm/Core/Interfaces/IEffectDrawer.js} +0 -0
- /package/esm/Core/Interfaces/{IParticle.js → IShapeDrawData.js} +0 -0
- /package/esm/Enums/Modes/{ClickMode.js → LimitMode.js} +0 -0
- /package/esm/{Enums/Modes/DivMode.js → Options/Interfaces/Particles/Effect/IEffect.js} +0 -0
- /package/esm/{Enums/Modes/HoverMode.js → Options/Interfaces/Particles/Number/IParticlesNumberLimit.js} +0 -0
- /package/umd/Core/Interfaces/{IParticle.js → IEffectDrawer.js} +0 -0
- /package/umd/{Enums/Modes/ClickMode.js → Core/Interfaces/IShapeDrawData.js} +0 -0
- /package/umd/Enums/Modes/{DivMode.js → LimitMode.js} +0 -0
- /package/umd/{Enums/Modes/HoverMode.js → Options/Interfaces/Particles/Effect/IEffect.js} +0 -0
- /package/umd/Options/Interfaces/{IRandom.js → Particles/Number/IParticlesNumberLimit.js} +0 -0
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import type { IHsl, IRgb } from "./Colors.js";
|
|
2
|
-
import type { IBubbleParticleData } from "./IBubbleParticleData.js";
|
|
3
|
-
import type { ICoordinates3d } from "./ICoordinates.js";
|
|
4
|
-
import type { IParticleHslAnimation } from "./IParticleHslAnimation.js";
|
|
5
|
-
import type { IParticleNumericValueAnimation } from "./IParticleValueAnimation.js";
|
|
6
|
-
import type { IParticleRetinaProps } from "./IParticleRetinaProps.js";
|
|
7
|
-
import type { IParticleRoll } from "./IParticleRoll.js";
|
|
8
|
-
import type { IParticlesOptions } from "../../Options/Interfaces/Particles/IParticlesOptions.js";
|
|
9
|
-
import type { IShapeValues } from "./IShapeValues.js";
|
|
10
|
-
import type { Interactivity } from "../../Options/Classes/Interactivity/Interactivity.js";
|
|
11
|
-
import type { Vector } from "../Utils/Vector.js";
|
|
12
|
-
export interface IParticle {
|
|
13
|
-
readonly backColor?: IHsl;
|
|
14
|
-
readonly bubble: IBubbleParticleData;
|
|
15
|
-
readonly close: boolean;
|
|
16
|
-
readonly color?: IParticleHslAnimation;
|
|
17
|
-
readonly destroyed: boolean;
|
|
18
|
-
readonly direction: number;
|
|
19
|
-
readonly fill: boolean;
|
|
20
|
-
readonly id: number;
|
|
21
|
-
readonly initialVelocity: Vector;
|
|
22
|
-
readonly interactivity: Interactivity;
|
|
23
|
-
misplaced: boolean;
|
|
24
|
-
readonly offset: Vector;
|
|
25
|
-
readonly opacity?: IParticleNumericValueAnimation;
|
|
26
|
-
readonly options: IParticlesOptions;
|
|
27
|
-
readonly position: Vector;
|
|
28
|
-
randomIndexData?: number;
|
|
29
|
-
readonly retina: IParticleRetinaProps;
|
|
30
|
-
readonly roll?: IParticleRoll;
|
|
31
|
-
readonly rotation: number;
|
|
32
|
-
readonly shadowColor?: IRgb;
|
|
33
|
-
readonly shape?: string;
|
|
34
|
-
readonly shapeData?: IShapeValues;
|
|
35
|
-
readonly sides: number;
|
|
36
|
-
readonly size: IParticleNumericValueAnimation;
|
|
37
|
-
readonly strokeColor?: IParticleHslAnimation;
|
|
38
|
-
readonly strokeOpacity?: number;
|
|
39
|
-
readonly strokeWidth?: number;
|
|
40
|
-
readonly velocity: Vector;
|
|
41
|
-
getFillColor(): IHsl | undefined;
|
|
42
|
-
getMass(): number;
|
|
43
|
-
getPosition(): ICoordinates3d;
|
|
44
|
-
getRadius(): number;
|
|
45
|
-
getStrokeColor(): IHsl | undefined;
|
|
46
|
-
isInsideCanvas(): boolean;
|
|
47
|
-
isVisible(): boolean;
|
|
48
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { IOptionLoader } from "../Interfaces/IOptionLoader.js";
|
|
2
|
-
import type { IRandom } from "../Interfaces/IRandom.js";
|
|
3
|
-
import type { RecursivePartial } from "../../Types/RecursivePartial.js";
|
|
4
|
-
export declare class Random implements IRandom, IOptionLoader<IRandom> {
|
|
5
|
-
enable: boolean;
|
|
6
|
-
minimumValue: number;
|
|
7
|
-
constructor();
|
|
8
|
-
load(data?: RecursivePartial<IRandom>): void;
|
|
9
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Container } from "../Core/Container.js";
|
|
2
|
-
import type { IDelta } from "../Core/Interfaces/IDelta.js";
|
|
3
|
-
import type { Particle } from "../Core/Particle.js";
|
|
4
|
-
export type ShapeDrawerDrawFunction = (context: CanvasRenderingContext2D, particle: Particle, radius: number, opacity: number, delta: IDelta, pixelRatio: number) => void;
|
|
5
|
-
export type ShapeDrawerInitFunction = (container: Container) => Promise<void>;
|
|
6
|
-
export type ShapeDrawerParticleInitFunction = (container: Container, particle: Particle) => void;
|
|
7
|
-
export type ShapeDrawerAfterEffectFunction = (context: CanvasRenderingContext2D, particle: Particle, radius: number, opacity: number, delta: IDelta, pixelRatio: number) => void;
|
|
8
|
-
export type ShapeDrawerDestroyFunction = (container: Container) => void;
|
|
9
|
-
export type ShapeDrawerSidesCountFunction = (particle: Particle) => number;
|
|
10
|
-
export type ShapeDrawerLoadFunction = (particle: Particle) => void;
|
|
@@ -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
|
-
});
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/browser/{Enums/Modes/HoverMode.js → Options/Interfaces/Particles/Effect/IEffect.js}
RENAMED
|
File without changes
|
/package/browser/Options/Interfaces/{IRandom.js → Particles/Number/IParticlesNumberLimit.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|