@tsparticles/engine 4.0.0-alpha.25 → 4.0.0-alpha.26

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 (80) hide show
  1. package/622.min.js +1 -0
  2. package/README.md +2 -2
  3. package/browser/Core/Engine.js +1 -18
  4. package/browser/Core/Particle.js +2 -23
  5. package/browser/Core/Particles.js +0 -23
  6. package/browser/Core/Utils/Ranges.js +2 -2
  7. package/browser/Core/Utils/Vectors.js +10 -7
  8. package/browser/Options/Classes/Particles/Move/Move.js +0 -4
  9. package/browser/Utils/CanvasUtils.js +29 -32
  10. package/browser/Utils/MathUtils.js +8 -1
  11. package/browser/Utils/Utils.js +10 -14
  12. package/browser/exports.js +0 -1
  13. package/cjs/Core/Engine.js +1 -18
  14. package/cjs/Core/Particle.js +2 -23
  15. package/cjs/Core/Particles.js +0 -23
  16. package/cjs/Core/Utils/Ranges.js +2 -2
  17. package/cjs/Core/Utils/Vectors.js +10 -7
  18. package/cjs/Options/Classes/Particles/Move/Move.js +0 -4
  19. package/cjs/Utils/CanvasUtils.js +29 -32
  20. package/cjs/Utils/MathUtils.js +8 -1
  21. package/cjs/Utils/Utils.js +10 -14
  22. package/cjs/exports.js +0 -1
  23. package/dist_browser_Core_Container_js.js +3 -3
  24. package/esm/Core/Engine.js +1 -18
  25. package/esm/Core/Particle.js +2 -23
  26. package/esm/Core/Particles.js +0 -23
  27. package/esm/Core/Utils/Ranges.js +2 -2
  28. package/esm/Core/Utils/Vectors.js +10 -7
  29. package/esm/Options/Classes/Particles/Move/Move.js +0 -4
  30. package/esm/Utils/CanvasUtils.js +29 -32
  31. package/esm/Utils/MathUtils.js +8 -1
  32. package/esm/Utils/Utils.js +10 -14
  33. package/esm/exports.js +0 -1
  34. package/package.json +1 -1
  35. package/report.html +1 -1
  36. package/scripts/install.js +2 -2
  37. package/tsparticles.engine.js +10 -20
  38. package/tsparticles.engine.min.js +2 -2
  39. package/types/Core/Engine.d.ts +1 -9
  40. package/types/Core/Particle.d.ts +0 -4
  41. package/types/Core/Particles.d.ts +0 -5
  42. package/types/Core/Utils/Vectors.d.ts +6 -6
  43. package/types/Options/Classes/Particles/Move/Move.d.ts +0 -2
  44. package/types/Options/Interfaces/Particles/Move/IMove.d.ts +0 -2
  45. package/types/Types/EngineInitializers.d.ts +0 -6
  46. package/types/Utils/CanvasUtils.d.ts +6 -7
  47. package/types/Utils/MathUtils.d.ts +2 -0
  48. package/types/export-types.d.ts +0 -3
  49. package/types/exports.d.ts +0 -1
  50. package/umd/Core/Engine.js +1 -18
  51. package/umd/Core/Particle.js +3 -24
  52. package/umd/Core/Particles.js +0 -23
  53. package/umd/Core/Utils/Ranges.js +1 -1
  54. package/umd/Core/Utils/Vectors.js +10 -7
  55. package/umd/Options/Classes/Particles/Move/Move.js +1 -5
  56. package/umd/Utils/CanvasUtils.js +29 -32
  57. package/umd/Utils/MathUtils.js +10 -1
  58. package/umd/Utils/Utils.js +10 -14
  59. package/umd/exports.js +1 -2
  60. package/152.min.js +0 -1
  61. package/browser/Core/Interfaces/IMovePathGenerator.js +0 -1
  62. package/browser/Core/Interfaces/IParticleMover.js +0 -1
  63. package/browser/Options/Classes/Particles/Move/MoveAttract.js +0 -36
  64. package/browser/Options/Interfaces/Particles/Move/IMoveAttract.js +0 -1
  65. package/cjs/Core/Interfaces/IMovePathGenerator.js +0 -1
  66. package/cjs/Core/Interfaces/IParticleMover.js +0 -1
  67. package/cjs/Options/Classes/Particles/Move/MoveAttract.js +0 -36
  68. package/cjs/Options/Interfaces/Particles/Move/IMoveAttract.js +0 -1
  69. package/esm/Core/Interfaces/IMovePathGenerator.js +0 -1
  70. package/esm/Core/Interfaces/IParticleMover.js +0 -1
  71. package/esm/Options/Classes/Particles/Move/MoveAttract.js +0 -36
  72. package/esm/Options/Interfaces/Particles/Move/IMoveAttract.js +0 -1
  73. package/types/Core/Interfaces/IMovePathGenerator.d.ts +0 -9
  74. package/types/Core/Interfaces/IParticleMover.d.ts +0 -7
  75. package/types/Options/Classes/Particles/Move/MoveAttract.d.ts +0 -12
  76. package/types/Options/Interfaces/Particles/Move/IMoveAttract.d.ts +0 -7
  77. package/umd/Core/Interfaces/IMovePathGenerator.js +0 -12
  78. package/umd/Core/Interfaces/IParticleMover.js +0 -12
  79. package/umd/Options/Classes/Particles/Move/MoveAttract.js +0 -50
  80. package/umd/Options/Interfaces/Particles/Move/IMoveAttract.js +0 -12
@@ -1,36 +0,0 @@
1
- import { isNull } from "../../../../Utils/TypeUtils.js";
2
- import { setRangeValue } from "../../../../Utils/MathUtils.js";
3
- export class MoveAttract {
4
- distance;
5
- enable;
6
- rotate;
7
- constructor() {
8
- this.distance = 200;
9
- this.enable = false;
10
- this.rotate = {
11
- x: 3000,
12
- y: 3000,
13
- };
14
- }
15
- load(data) {
16
- if (isNull(data)) {
17
- return;
18
- }
19
- if (data.distance !== undefined) {
20
- this.distance = setRangeValue(data.distance);
21
- }
22
- if (data.enable !== undefined) {
23
- this.enable = data.enable;
24
- }
25
- if (data.rotate) {
26
- const rotateX = data.rotate.x;
27
- if (rotateX !== undefined) {
28
- this.rotate.x = rotateX;
29
- }
30
- const rotateY = data.rotate.y;
31
- if (rotateY !== undefined) {
32
- this.rotate.y = rotateY;
33
- }
34
- }
35
- }
36
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,36 +0,0 @@
1
- import { isNull } from "../../../../Utils/TypeUtils.js";
2
- import { setRangeValue } from "../../../../Utils/MathUtils.js";
3
- export class MoveAttract {
4
- distance;
5
- enable;
6
- rotate;
7
- constructor() {
8
- this.distance = 200;
9
- this.enable = false;
10
- this.rotate = {
11
- x: 3000,
12
- y: 3000,
13
- };
14
- }
15
- load(data) {
16
- if (isNull(data)) {
17
- return;
18
- }
19
- if (data.distance !== undefined) {
20
- this.distance = setRangeValue(data.distance);
21
- }
22
- if (data.enable !== undefined) {
23
- this.enable = data.enable;
24
- }
25
- if (data.rotate) {
26
- const rotateX = data.rotate.x;
27
- if (rotateX !== undefined) {
28
- this.rotate.x = rotateX;
29
- }
30
- const rotateY = data.rotate.y;
31
- if (rotateY !== undefined) {
32
- this.rotate.y = rotateY;
33
- }
34
- }
35
- }
36
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,9 +0,0 @@
1
- import type { IDelta } from "./IDelta.js";
2
- import type { Particle } from "../Particle.js";
3
- import type { Vector } from "../Utils/Vectors.js";
4
- export interface IMovePathGenerator {
5
- generate: (particle: Particle, delta: IDelta) => Vector;
6
- init: () => void;
7
- reset: (particle: Particle) => void;
8
- update: () => void;
9
- }
@@ -1,7 +0,0 @@
1
- import type { IDelta } from "./IDelta.js";
2
- import type { Particle } from "../Particle.js";
3
- export interface IParticleMover {
4
- init(particle: Particle): void;
5
- isEnabled(particle: Particle): boolean;
6
- move(particle: Particle, delta: IDelta): void;
7
- }
@@ -1,12 +0,0 @@
1
- import type { ICoordinates } from "../../../../Core/Interfaces/ICoordinates.js";
2
- import type { IMoveAttract } from "../../../Interfaces/Particles/Move/IMoveAttract.js";
3
- import type { IOptionLoader } from "../../../Interfaces/IOptionLoader.js";
4
- import type { RangeValue } from "../../../../Types/RangeValue.js";
5
- import type { RecursivePartial } from "../../../../Types/RecursivePartial.js";
6
- export declare class MoveAttract implements IMoveAttract, IOptionLoader<IMoveAttract> {
7
- distance: RangeValue;
8
- enable: boolean;
9
- rotate: ICoordinates;
10
- constructor();
11
- load(data?: RecursivePartial<IMoveAttract>): void;
12
- }
@@ -1,7 +0,0 @@
1
- import type { ICoordinates } from "../../../../Core/Interfaces/ICoordinates.js";
2
- import type { RangeValue } from "../../../../Types/RangeValue.js";
3
- export interface IMoveAttract {
4
- distance: RangeValue;
5
- enable: boolean;
6
- rotate: ICoordinates;
7
- }
@@ -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
- });
@@ -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
- });
@@ -1,50 +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", "../../../../Utils/TypeUtils.js", "../../../../Utils/MathUtils.js"], factory);
8
- }
9
- })(function (require, exports) {
10
- "use strict";
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.MoveAttract = void 0;
13
- const TypeUtils_js_1 = require("../../../../Utils/TypeUtils.js");
14
- const MathUtils_js_1 = require("../../../../Utils/MathUtils.js");
15
- class MoveAttract {
16
- distance;
17
- enable;
18
- rotate;
19
- constructor() {
20
- this.distance = 200;
21
- this.enable = false;
22
- this.rotate = {
23
- x: 3000,
24
- y: 3000,
25
- };
26
- }
27
- load(data) {
28
- if ((0, TypeUtils_js_1.isNull)(data)) {
29
- return;
30
- }
31
- if (data.distance !== undefined) {
32
- this.distance = (0, MathUtils_js_1.setRangeValue)(data.distance);
33
- }
34
- if (data.enable !== undefined) {
35
- this.enable = data.enable;
36
- }
37
- if (data.rotate) {
38
- const rotateX = data.rotate.x;
39
- if (rotateX !== undefined) {
40
- this.rotate.x = rotateX;
41
- }
42
- const rotateY = data.rotate.y;
43
- if (rotateY !== undefined) {
44
- this.rotate.y = rotateY;
45
- }
46
- }
47
- }
48
- }
49
- exports.MoveAttract = MoveAttract;
50
- });
@@ -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
- });