@tsparticles/interaction-external-push 3.0.0-beta.3 → 3.0.0-beta.5
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/Options/Classes/Push.js +1 -7
- package/browser/Pusher.js +2 -1
- package/cjs/Options/Classes/Push.js +1 -7
- package/cjs/Pusher.js +2 -1
- package/esm/Options/Classes/Push.js +1 -7
- package/esm/Pusher.js +2 -1
- package/package.json +3 -3
- package/report.html +4 -22
- package/tsparticles.interaction.external.push.js +4 -9
- package/tsparticles.interaction.external.push.min.js +1 -1
- package/tsparticles.interaction.external.push.min.js.LICENSE.txt +1 -1
- package/types/Options/Classes/Push.d.ts +0 -2
- package/types/Options/Interfaces/IPush.d.ts +0 -1
- package/umd/Options/Classes/Push.js +1 -7
- package/umd/Pusher.js +2 -1
|
@@ -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
|
-
* v3.0.0-beta.
|
|
7
|
+
* v3.0.0-beta.5
|
|
8
8
|
*/
|
|
9
9
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
10
10
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
@@ -105,12 +105,6 @@ class Push {
|
|
|
105
105
|
this.groups = [];
|
|
106
106
|
this.quantity = 4;
|
|
107
107
|
}
|
|
108
|
-
get particles_nb() {
|
|
109
|
-
return this.quantity;
|
|
110
|
-
}
|
|
111
|
-
set particles_nb(value) {
|
|
112
|
-
this.quantity = (0,engine_root_window_.setRangeValue)(value);
|
|
113
|
-
}
|
|
114
108
|
load(data) {
|
|
115
109
|
if (!data) {
|
|
116
110
|
return;
|
|
@@ -124,7 +118,7 @@ class Push {
|
|
|
124
118
|
if (!this.groups.length) {
|
|
125
119
|
this.default = true;
|
|
126
120
|
}
|
|
127
|
-
const quantity = data.quantity
|
|
121
|
+
const quantity = data.quantity;
|
|
128
122
|
if (quantity !== undefined) {
|
|
129
123
|
this.quantity = (0,engine_root_window_.setRangeValue)(quantity);
|
|
130
124
|
}
|
|
@@ -133,11 +127,12 @@ class Push {
|
|
|
133
127
|
;// CONCATENATED MODULE: ./dist/browser/Pusher.js
|
|
134
128
|
|
|
135
129
|
|
|
130
|
+
const pushMode = "push";
|
|
136
131
|
class Pusher extends engine_root_window_.ExternalInteractorBase {
|
|
137
132
|
constructor(container) {
|
|
138
133
|
super(container);
|
|
139
134
|
this.handleClickMode = mode => {
|
|
140
|
-
if (mode !==
|
|
135
|
+
if (mode !== pushMode) {
|
|
141
136
|
return;
|
|
142
137
|
}
|
|
143
138
|
const container = this.container,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see tsparticles.interaction.external.push.min.js.LICENSE.txt */
|
|
2
|
-
!function(t
|
|
2
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/engine"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine"],t);else{var r="object"==typeof exports?t(require("@tsparticles/engine")):t(e.window);for(var o in r)("object"==typeof exports?exports:e)[o]=r[o]}}(this,(e=>(()=>{"use strict";var t={533:t=>{t.exports=e}},r={};function o(e){var s=r[e];if(void 0!==s)return s.exports;var i=r[e]={exports:{}};return t[e](i,i.exports,o),i.exports}o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};return(()=>{o.r(s),o.d(s,{Push:()=>t,loadExternalPushInteraction:()=>i});var e=o(533);class t{constructor(){this.default=!0,this.groups=[],this.quantity=4}load(t){if(!t)return;void 0!==t.default&&(this.default=t.default),void 0!==t.groups&&(this.groups=t.groups.map((e=>e))),this.groups.length||(this.default=!0);const r=t.quantity;void 0!==r&&(this.quantity=(0,e.setRangeValue)(r))}}class r extends e.ExternalInteractorBase{constructor(t){super(t),this.handleClickMode=t=>{if("push"!==t)return;const r=this.container,o=r.actualOptions.interactivity.modes.push;if(!o)return;const s=(0,e.getRangeValue)(o.quantity);if(s<=0)return;const i=(0,e.itemFromArray)([void 0,...o.groups]),n=void 0!==i?r.actualOptions.particles.groups[i]:void 0;r.particles.push(s,r.interactivity.mouse,n,i)}}clear(){}init(){}async interact(){}isEnabled(){return!0}loadModeOptions(e,...r){e.push||(e.push=new t);for(const t of r)e.push.load(t?.push)}reset(){}}async function i(e,t=!0){await e.addInteractor("externalPush",(e=>new r(e)),t)}})(),s})()));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! tsParticles Push External Interaction v3.0.0-beta.
|
|
1
|
+
/*! tsParticles Push External Interaction v3.0.0-beta.5 by Matteo Bruni */
|
|
@@ -17,12 +17,6 @@
|
|
|
17
17
|
this.groups = [];
|
|
18
18
|
this.quantity = 4;
|
|
19
19
|
}
|
|
20
|
-
get particles_nb() {
|
|
21
|
-
return this.quantity;
|
|
22
|
-
}
|
|
23
|
-
set particles_nb(value) {
|
|
24
|
-
this.quantity = (0, engine_1.setRangeValue)(value);
|
|
25
|
-
}
|
|
26
20
|
load(data) {
|
|
27
21
|
if (!data) {
|
|
28
22
|
return;
|
|
@@ -36,7 +30,7 @@
|
|
|
36
30
|
if (!this.groups.length) {
|
|
37
31
|
this.default = true;
|
|
38
32
|
}
|
|
39
|
-
const quantity = data.quantity
|
|
33
|
+
const quantity = data.quantity;
|
|
40
34
|
if (quantity !== undefined) {
|
|
41
35
|
this.quantity = (0, engine_1.setRangeValue)(quantity);
|
|
42
36
|
}
|
package/umd/Pusher.js
CHANGED
|
@@ -12,11 +12,12 @@
|
|
|
12
12
|
exports.Pusher = void 0;
|
|
13
13
|
const engine_1 = require("@tsparticles/engine");
|
|
14
14
|
const Push_js_1 = require("./Options/Classes/Push.js");
|
|
15
|
+
const pushMode = "push";
|
|
15
16
|
class Pusher extends engine_1.ExternalInteractorBase {
|
|
16
17
|
constructor(container) {
|
|
17
18
|
super(container);
|
|
18
19
|
this.handleClickMode = (mode) => {
|
|
19
|
-
if (mode !==
|
|
20
|
+
if (mode !== pushMode) {
|
|
20
21
|
return;
|
|
21
22
|
}
|
|
22
23
|
const container = this.container, options = container.actualOptions, pushOptions = options.interactivity.modes.push;
|