@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.
- package/622.min.js +1 -0
- package/README.md +2 -2
- package/browser/Core/Engine.js +1 -18
- package/browser/Core/Particle.js +2 -23
- package/browser/Core/Particles.js +0 -23
- package/browser/Core/Utils/Ranges.js +2 -2
- package/browser/Core/Utils/Vectors.js +10 -7
- package/browser/Options/Classes/Particles/Move/Move.js +0 -4
- package/browser/Utils/CanvasUtils.js +29 -32
- package/browser/Utils/MathUtils.js +8 -1
- package/browser/Utils/Utils.js +10 -14
- package/browser/exports.js +0 -1
- package/cjs/Core/Engine.js +1 -18
- package/cjs/Core/Particle.js +2 -23
- package/cjs/Core/Particles.js +0 -23
- package/cjs/Core/Utils/Ranges.js +2 -2
- package/cjs/Core/Utils/Vectors.js +10 -7
- package/cjs/Options/Classes/Particles/Move/Move.js +0 -4
- package/cjs/Utils/CanvasUtils.js +29 -32
- package/cjs/Utils/MathUtils.js +8 -1
- package/cjs/Utils/Utils.js +10 -14
- package/cjs/exports.js +0 -1
- package/dist_browser_Core_Container_js.js +3 -3
- package/esm/Core/Engine.js +1 -18
- package/esm/Core/Particle.js +2 -23
- package/esm/Core/Particles.js +0 -23
- package/esm/Core/Utils/Ranges.js +2 -2
- package/esm/Core/Utils/Vectors.js +10 -7
- package/esm/Options/Classes/Particles/Move/Move.js +0 -4
- package/esm/Utils/CanvasUtils.js +29 -32
- package/esm/Utils/MathUtils.js +8 -1
- package/esm/Utils/Utils.js +10 -14
- package/esm/exports.js +0 -1
- package/package.json +1 -1
- package/report.html +1 -1
- package/scripts/install.js +2 -2
- package/tsparticles.engine.js +10 -20
- package/tsparticles.engine.min.js +2 -2
- package/types/Core/Engine.d.ts +1 -9
- package/types/Core/Particle.d.ts +0 -4
- package/types/Core/Particles.d.ts +0 -5
- package/types/Core/Utils/Vectors.d.ts +6 -6
- package/types/Options/Classes/Particles/Move/Move.d.ts +0 -2
- package/types/Options/Interfaces/Particles/Move/IMove.d.ts +0 -2
- package/types/Types/EngineInitializers.d.ts +0 -6
- package/types/Utils/CanvasUtils.d.ts +6 -7
- package/types/Utils/MathUtils.d.ts +2 -0
- package/types/export-types.d.ts +0 -3
- package/types/exports.d.ts +0 -1
- package/umd/Core/Engine.js +1 -18
- package/umd/Core/Particle.js +3 -24
- package/umd/Core/Particles.js +0 -23
- package/umd/Core/Utils/Ranges.js +1 -1
- package/umd/Core/Utils/Vectors.js +10 -7
- package/umd/Options/Classes/Particles/Move/Move.js +1 -5
- package/umd/Utils/CanvasUtils.js +29 -32
- package/umd/Utils/MathUtils.js +10 -1
- package/umd/Utils/Utils.js +10 -14
- package/umd/exports.js +1 -2
- package/152.min.js +0 -1
- package/browser/Core/Interfaces/IMovePathGenerator.js +0 -1
- package/browser/Core/Interfaces/IParticleMover.js +0 -1
- package/browser/Options/Classes/Particles/Move/MoveAttract.js +0 -36
- package/browser/Options/Interfaces/Particles/Move/IMoveAttract.js +0 -1
- package/cjs/Core/Interfaces/IMovePathGenerator.js +0 -1
- package/cjs/Core/Interfaces/IParticleMover.js +0 -1
- package/cjs/Options/Classes/Particles/Move/MoveAttract.js +0 -36
- package/cjs/Options/Interfaces/Particles/Move/IMoveAttract.js +0 -1
- package/esm/Core/Interfaces/IMovePathGenerator.js +0 -1
- package/esm/Core/Interfaces/IParticleMover.js +0 -1
- package/esm/Options/Classes/Particles/Move/MoveAttract.js +0 -36
- package/esm/Options/Interfaces/Particles/Move/IMoveAttract.js +0 -1
- package/types/Core/Interfaces/IMovePathGenerator.d.ts +0 -9
- package/types/Core/Interfaces/IParticleMover.d.ts +0 -7
- package/types/Options/Classes/Particles/Move/MoveAttract.d.ts +0 -12
- package/types/Options/Interfaces/Particles/Move/IMoveAttract.d.ts +0 -7
- package/umd/Core/Interfaces/IMovePathGenerator.js +0 -12
- package/umd/Core/Interfaces/IParticleMover.js +0 -12
- package/umd/Options/Classes/Particles/Move/MoveAttract.js +0 -50
- 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,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,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
|
-
});
|