@tsparticles/plugin-manual-particles 4.0.0-alpha.5 → 4.0.0-beta.0
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/575.min.js +1 -0
- package/999.min.js +1 -0
- package/browser/ManualParticlesPlugin.js +1 -3
- package/browser/ManualParticlesPluginInstance.js +1 -0
- package/browser/Options/Classes/ManualParticle.js +4 -1
- package/browser/index.js +1 -1
- package/cjs/ManualParticlesPlugin.js +1 -3
- package/cjs/ManualParticlesPluginInstance.js +1 -0
- package/cjs/Options/Classes/ManualParticle.js +4 -1
- package/cjs/index.js +1 -1
- package/dist_browser_ManualParticlesPluginInstance_js.js +2 -2
- package/dist_browser_ManualParticlesPlugin_js.js +3 -3
- package/esm/ManualParticlesPlugin.js +1 -3
- package/esm/ManualParticlesPluginInstance.js +1 -0
- package/esm/Options/Classes/ManualParticle.js +4 -1
- package/esm/index.js +1 -1
- package/package.json +2 -2
- package/report.html +3 -3
- package/tsparticles.plugin.manualParticles.js +31 -19
- package/tsparticles.plugin.manualParticles.min.js +2 -2
- package/types/ManualParticlesPlugin.d.ts +1 -2
- package/umd/ManualParticlesPlugin.js +1 -3
- package/umd/ManualParticlesPluginInstance.js +1 -0
- package/umd/Options/Classes/ManualParticle.js +5 -2
- package/umd/index.js +1 -1
- package/187.min.js +0 -2
- package/187.min.js.LICENSE.txt +0 -1
- package/673.min.js +0 -2
- package/673.min.js.LICENSE.txt +0 -1
- package/tsparticles.plugin.manualParticles.min.js.LICENSE.txt +0 -1
package/575.min.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(this.webpackChunk_tsparticles_plugin_manual_particles=this.webpackChunk_tsparticles_plugin_manual_particles||[]).push([[575],{575(t,a,i){i.d(a,{ManualParticlesPluginInstance:()=>s});var n=i(303);class s{_container;constructor(t){this._container=t}particlesDensityCount(){return this._container.actualOptions.manualParticles?.length??0}particlesInitialization(){let t=this._container,a=t.actualOptions;return a.manualParticles?.forEach(a=>t.particles.addParticle(a.position?(0,n.getPosition)(a.position,t.canvas.size):void 0,a.options)),!1}}}}]);
|
package/999.min.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(this.webpackChunk_tsparticles_plugin_manual_particles=this.webpackChunk_tsparticles_plugin_manual_particles||[]).push([[999],{999(i,n,t){t.d(n,{ManualParticlesPlugin:()=>e});var s=t(303);class a{options;position;load(i){!(0,s.isNull)(i)&&(i.position&&(this.position={x:i.position.x??50,y:i.position.y??50,mode:i.position.mode??s.PixelMode.percent}),i.options&&(this.options=(0,s.deepExtend)({},i.options)))}}class e{id="manual-particles";async getPlugin(i){let{ManualParticlesPluginInstance:n}=await t.e(575).then(t.bind(t,575));return new n(i)}loadOptions(i,n,t){(this.needsPlugin(n)||this.needsPlugin(t))&&(n.manualParticles??=[],t?.manualParticles&&(n.manualParticles=t.manualParticles.map(i=>{let n=new a;return n.load(i),n})))}needsPlugin(i){return!!i?.manualParticles?.length}}}}]);
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { ManualParticle } from "./Options/Classes/ManualParticle.js";
|
|
2
2
|
export class ManualParticlesPlugin {
|
|
3
|
-
|
|
4
|
-
this.id = "manual-particles";
|
|
5
|
-
}
|
|
3
|
+
id = "manual-particles";
|
|
6
4
|
async getPlugin(container) {
|
|
7
5
|
const { ManualParticlesPluginInstance } = await import("./ManualParticlesPluginInstance.js");
|
|
8
6
|
return new ManualParticlesPluginInstance(container);
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { PixelMode, deepExtend, isNull,
|
|
1
|
+
import { PixelMode, deepExtend, isNull, } from "@tsparticles/engine";
|
|
2
|
+
const manualDefaultPosition = 50;
|
|
2
3
|
export class ManualParticle {
|
|
4
|
+
options;
|
|
5
|
+
position;
|
|
3
6
|
load(data) {
|
|
4
7
|
if (isNull(data)) {
|
|
5
8
|
return;
|
package/browser/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export async function loadManualParticlesPlugin(engine) {
|
|
2
|
-
engine.checkVersion("4.0.0-
|
|
2
|
+
engine.checkVersion("4.0.0-beta.0");
|
|
3
3
|
await engine.register(async (e) => {
|
|
4
4
|
const { ManualParticlesPlugin } = await import("./ManualParticlesPlugin.js");
|
|
5
5
|
e.addPlugin(new ManualParticlesPlugin());
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { ManualParticle } from "./Options/Classes/ManualParticle.js";
|
|
2
2
|
export class ManualParticlesPlugin {
|
|
3
|
-
|
|
4
|
-
this.id = "manual-particles";
|
|
5
|
-
}
|
|
3
|
+
id = "manual-particles";
|
|
6
4
|
async getPlugin(container) {
|
|
7
5
|
const { ManualParticlesPluginInstance } = await import("./ManualParticlesPluginInstance.js");
|
|
8
6
|
return new ManualParticlesPluginInstance(container);
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { PixelMode, deepExtend, isNull,
|
|
1
|
+
import { PixelMode, deepExtend, isNull, } from "@tsparticles/engine";
|
|
2
|
+
const manualDefaultPosition = 50;
|
|
2
3
|
export class ManualParticle {
|
|
4
|
+
options;
|
|
5
|
+
position;
|
|
3
6
|
load(data) {
|
|
4
7
|
if (isNull(data)) {
|
|
5
8
|
return;
|
package/cjs/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export async function loadManualParticlesPlugin(engine) {
|
|
2
|
-
engine.checkVersion("4.0.0-
|
|
2
|
+
engine.checkVersion("4.0.0-beta.0");
|
|
3
3
|
await engine.register(async (e) => {
|
|
4
4
|
const { ManualParticlesPlugin } = await import("./ManualParticlesPlugin.js");
|
|
5
5
|
e.addPlugin(new ManualParticlesPlugin());
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Demo / Generator : https://particles.js.org/
|
|
5
5
|
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
6
|
* How to use? : Check the GitHub README
|
|
7
|
-
* v4.0.0-
|
|
7
|
+
* v4.0.0-beta.0
|
|
8
8
|
*/
|
|
9
9
|
"use strict";
|
|
10
10
|
/*
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
\*******************************************************/
|
|
24
24
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
25
25
|
|
|
26
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ManualParticlesPluginInstance: () => (/* binding */ ManualParticlesPluginInstance)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n\nconst noParticles = 0;\nclass ManualParticlesPluginInstance {\n
|
|
26
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ManualParticlesPluginInstance: () => (/* binding */ ManualParticlesPluginInstance)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n\nconst noParticles = 0;\nclass ManualParticlesPluginInstance {\n _container;\n constructor(container){\n this._container = container;\n }\n particlesDensityCount() {\n return this._container.actualOptions.manualParticles?.length ?? noParticles;\n }\n particlesInitialization() {\n const container = this._container, options = container.actualOptions;\n options.manualParticles?.forEach((p)=>container.particles.addParticle(p.position ? (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getPosition)(p.position, container.canvas.size) : undefined, p.options));\n return false;\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/plugin-manual-particles/./dist/browser/ManualParticlesPluginInstance.js?\n}");
|
|
27
27
|
|
|
28
28
|
/***/ }
|
|
29
29
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Demo / Generator : https://particles.js.org/
|
|
5
5
|
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
6
|
* How to use? : Check the GitHub README
|
|
7
|
-
* v4.0.0-
|
|
7
|
+
* v4.0.0-beta.0
|
|
8
8
|
*/
|
|
9
9
|
"use strict";
|
|
10
10
|
/*
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
\***********************************************/
|
|
24
24
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
25
25
|
|
|
26
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ManualParticlesPlugin: () => (/* binding */ ManualParticlesPlugin)\n/* harmony export */ });\n/* harmony import */ var _Options_Classes_ManualParticle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Options/Classes/ManualParticle.js */ \"./dist/browser/Options/Classes/ManualParticle.js\");\n\nclass ManualParticlesPlugin {\n
|
|
26
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ManualParticlesPlugin: () => (/* binding */ ManualParticlesPlugin)\n/* harmony export */ });\n/* harmony import */ var _Options_Classes_ManualParticle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Options/Classes/ManualParticle.js */ \"./dist/browser/Options/Classes/ManualParticle.js\");\n\nclass ManualParticlesPlugin {\n id = \"manual-particles\";\n async getPlugin(container) {\n const { ManualParticlesPluginInstance } = await __webpack_require__.e(/*! import() */ \"dist_browser_ManualParticlesPluginInstance_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./ManualParticlesPluginInstance.js */ \"./dist/browser/ManualParticlesPluginInstance.js\"));\n return new ManualParticlesPluginInstance(container);\n }\n loadOptions(_container, options, source) {\n if (!this.needsPlugin(options) && !this.needsPlugin(source)) {\n return;\n }\n options.manualParticles ??= [];\n if (source?.manualParticles) {\n options.manualParticles = source.manualParticles.map((t)=>{\n const tmp = new _Options_Classes_ManualParticle_js__WEBPACK_IMPORTED_MODULE_0__.ManualParticle();\n tmp.load(t);\n return tmp;\n });\n }\n }\n needsPlugin(options) {\n return !!options?.manualParticles?.length;\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/plugin-manual-particles/./dist/browser/ManualParticlesPlugin.js?\n}");
|
|
27
27
|
|
|
28
28
|
/***/ },
|
|
29
29
|
|
|
@@ -33,7 +33,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
33
33
|
\********************************************************/
|
|
34
34
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
35
35
|
|
|
36
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ManualParticle: () => (/* binding */ ManualParticle)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n\nclass ManualParticle {\n
|
|
36
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ManualParticle: () => (/* binding */ ManualParticle)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n\nconst manualDefaultPosition = 50;\nclass ManualParticle {\n options;\n position;\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n if (data.position) {\n this.position = {\n x: data.position.x ?? manualDefaultPosition,\n y: data.position.y ?? manualDefaultPosition,\n mode: data.position.mode ?? _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.PixelMode.percent\n };\n }\n if (data.options) {\n this.options = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.deepExtend)({}, data.options);\n }\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/plugin-manual-particles/./dist/browser/Options/Classes/ManualParticle.js?\n}");
|
|
37
37
|
|
|
38
38
|
/***/ }
|
|
39
39
|
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { ManualParticle } from "./Options/Classes/ManualParticle.js";
|
|
2
2
|
export class ManualParticlesPlugin {
|
|
3
|
-
|
|
4
|
-
this.id = "manual-particles";
|
|
5
|
-
}
|
|
3
|
+
id = "manual-particles";
|
|
6
4
|
async getPlugin(container) {
|
|
7
5
|
const { ManualParticlesPluginInstance } = await import("./ManualParticlesPluginInstance.js");
|
|
8
6
|
return new ManualParticlesPluginInstance(container);
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { PixelMode, deepExtend, isNull,
|
|
1
|
+
import { PixelMode, deepExtend, isNull, } from "@tsparticles/engine";
|
|
2
|
+
const manualDefaultPosition = 50;
|
|
2
3
|
export class ManualParticle {
|
|
4
|
+
options;
|
|
5
|
+
position;
|
|
3
6
|
load(data) {
|
|
4
7
|
if (isNull(data)) {
|
|
5
8
|
return;
|
package/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export async function loadManualParticlesPlugin(engine) {
|
|
2
|
-
engine.checkVersion("4.0.0-
|
|
2
|
+
engine.checkVersion("4.0.0-beta.0");
|
|
3
3
|
await engine.register(async (e) => {
|
|
4
4
|
const { ManualParticlesPlugin } = await import("./ManualParticlesPlugin.js");
|
|
5
5
|
e.addPlugin(new ManualParticlesPlugin());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/plugin-manual-particles",
|
|
3
|
-
"version": "4.0.0-
|
|
3
|
+
"version": "4.0.0-beta.0",
|
|
4
4
|
"description": "tsParticles manual particles plugin",
|
|
5
5
|
"homepage": "https://particles.js.org",
|
|
6
6
|
"repository": {
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"./package.json": "./package.json"
|
|
87
87
|
},
|
|
88
88
|
"dependencies": {
|
|
89
|
-
"@tsparticles/engine": "4.0.0-
|
|
89
|
+
"@tsparticles/engine": "4.0.0-beta.0"
|
|
90
90
|
},
|
|
91
91
|
"publishConfig": {
|
|
92
92
|
"access": "public"
|