@tsparticles/pjs 3.9.1 → 4.0.0-alpha.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.
- package/571.min.js +2 -0
- package/571.min.js.LICENSE.txt +1 -0
- package/browser/bundle.js +1 -1
- package/browser/index.js +6 -6
- package/browser/marcbruederlin/Particles.js +4 -4
- package/cjs/VincentGarreau/IParticlesJS.js +1 -2
- package/cjs/VincentGarreau/particles.js +3 -6
- package/cjs/bundle.js +5 -24
- package/cjs/index.js +9 -12
- package/cjs/marcbruederlin/Particles.js +5 -9
- package/engine_dist_browser_Core_Container_js.js +100 -0
- package/esm/bundle.js +1 -1
- package/esm/index.js +6 -6
- package/esm/marcbruederlin/Particles.js +4 -4
- package/package.json +4 -3
- package/report.html +5 -4
- package/tsparticles.pjs.bundle.js +507 -1466
- package/tsparticles.pjs.bundle.min.js +1 -1
- package/tsparticles.pjs.bundle.min.js.LICENSE.txt +1 -1
- package/tsparticles.pjs.js +22 -28
- package/tsparticles.pjs.min.js +1 -1
- package/tsparticles.pjs.min.js.LICENSE.txt +1 -1
- package/types/bundle.d.ts +1 -1
- package/types/index.d.ts +5 -7
- package/types/marcbruederlin/Particles.d.ts +2 -2
- package/umd/bundle.js +3 -3
- package/umd/index.js +5 -5
- package/umd/marcbruederlin/Particles.js +5 -5
package/types/index.d.ts
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { type Container, type Engine } from "@tsparticles/engine";
|
|
2
2
|
import type { IParticlesJS } from "./VincentGarreau/IParticlesJS.js";
|
|
3
|
-
import {
|
|
3
|
+
import { MBParticles } from "./marcbruederlin/Particles.js";
|
|
4
4
|
declare global {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
particlesJS: IParticlesJS;
|
|
9
|
-
}
|
|
5
|
+
var Particles: typeof MBParticles;
|
|
6
|
+
var pJSDom: Container[];
|
|
7
|
+
var particlesJS: IParticlesJS;
|
|
10
8
|
}
|
|
11
9
|
declare const initPjs: (engine: Engine) => {
|
|
12
|
-
Particles: typeof
|
|
10
|
+
Particles: typeof MBParticles;
|
|
13
11
|
pJSDom: Container[];
|
|
14
12
|
particlesJS: IParticlesJS;
|
|
15
13
|
};
|
|
@@ -13,9 +13,9 @@ interface ParticlesOptions {
|
|
|
13
13
|
sizeVariations: number;
|
|
14
14
|
speed: number;
|
|
15
15
|
}
|
|
16
|
-
export declare class
|
|
16
|
+
export declare class MBParticles {
|
|
17
17
|
private _container?;
|
|
18
|
-
static init(options: RecursivePartial<ParticlesOptions>):
|
|
18
|
+
static init(options: RecursivePartial<ParticlesOptions>): MBParticles;
|
|
19
19
|
destroy(): void;
|
|
20
20
|
pauseAnimation(): void;
|
|
21
21
|
resumeAnimation(): void;
|
package/umd/bundle.js
CHANGED
|
@@ -18,15 +18,15 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
18
18
|
if (v !== undefined) module.exports = v;
|
|
19
19
|
}
|
|
20
20
|
else if (typeof define === "function" && define.amd) {
|
|
21
|
-
define(["require", "exports", ".", "@tsparticles/engine", "@tsparticles/engine"], factory);
|
|
21
|
+
define(["require", "exports", "./index.js", "@tsparticles/engine", "@tsparticles/engine"], factory);
|
|
22
22
|
}
|
|
23
23
|
})(function (require, exports) {
|
|
24
24
|
"use strict";
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.Particles = exports.pJSDom = exports.particlesJS = void 0;
|
|
27
|
-
const
|
|
27
|
+
const index_js_1 = require("./index.js");
|
|
28
28
|
const engine_1 = require("@tsparticles/engine");
|
|
29
|
-
const { particlesJS, pJSDom, Particles } = (0,
|
|
29
|
+
const { particlesJS, pJSDom, Particles } = (0, index_js_1.initPjs)(engine_1.tsParticles);
|
|
30
30
|
exports.particlesJS = particlesJS;
|
|
31
31
|
exports.pJSDom = pJSDom;
|
|
32
32
|
exports.Particles = Particles;
|
package/umd/index.js
CHANGED
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
const Particles_js_1 = require("./marcbruederlin/Particles.js");
|
|
14
14
|
const particles_js_1 = require("./VincentGarreau/particles.js");
|
|
15
15
|
const initPjs = (engine) => {
|
|
16
|
-
engine.checkVersion("
|
|
16
|
+
engine.checkVersion("4.0.0-alpha.1");
|
|
17
17
|
const { particlesJS, pJSDom } = (0, particles_js_1.initParticlesJS)(engine);
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
return { particlesJS, pJSDom, Particles: Particles_js_1.
|
|
18
|
+
globalThis.particlesJS = particlesJS;
|
|
19
|
+
globalThis.pJSDom = pJSDom;
|
|
20
|
+
globalThis.Particles = Particles_js_1.MBParticles;
|
|
21
|
+
return { particlesJS, pJSDom, Particles: Particles_js_1.MBParticles };
|
|
22
22
|
};
|
|
23
23
|
exports.initPjs = initPjs;
|
|
24
24
|
});
|
|
@@ -9,16 +9,16 @@
|
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.MBParticles = void 0;
|
|
13
13
|
const engine_1 = require("@tsparticles/engine");
|
|
14
14
|
const linksMinDistance = 120, moveMinSpeed = 0.5, particlesMinCount = 100, sizeMinValue = 3;
|
|
15
|
-
class
|
|
15
|
+
class MBParticles {
|
|
16
16
|
static init(options) {
|
|
17
|
-
const particles = new
|
|
17
|
+
const particles = new MBParticles(), selector = options.selector;
|
|
18
18
|
if (!selector) {
|
|
19
19
|
throw new Error("No selector provided");
|
|
20
20
|
}
|
|
21
|
-
const el =
|
|
21
|
+
const el = (0, engine_1.safeDocument)().querySelector(selector);
|
|
22
22
|
if (!el) {
|
|
23
23
|
throw new Error("No element found for selector");
|
|
24
24
|
}
|
|
@@ -94,5 +94,5 @@
|
|
|
94
94
|
container?.play();
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
|
-
exports.
|
|
97
|
+
exports.MBParticles = MBParticles;
|
|
98
98
|
});
|