@tsparticles/interaction-external-push
Advanced tools
Comparing version 3.0.0-beta.4 to 3.0.0-beta.5
@@ -8,8 +8,2 @@ import { setRangeValue } from "@tsparticles/engine"; | ||
} | ||
get particles_nb() { | ||
return this.quantity; | ||
} | ||
set particles_nb(value) { | ||
this.quantity = setRangeValue(value); | ||
} | ||
load(data) { | ||
@@ -28,3 +22,3 @@ if (!data) { | ||
} | ||
const quantity = data.quantity ?? data.particles_nb; | ||
const quantity = data.quantity; | ||
if (quantity !== undefined) { | ||
@@ -31,0 +25,0 @@ this.quantity = setRangeValue(quantity); |
@@ -11,8 +11,2 @@ "use strict"; | ||
} | ||
get particles_nb() { | ||
return this.quantity; | ||
} | ||
set particles_nb(value) { | ||
this.quantity = (0, engine_1.setRangeValue)(value); | ||
} | ||
load(data) { | ||
@@ -31,3 +25,3 @@ if (!data) { | ||
} | ||
const quantity = data.quantity ?? data.particles_nb; | ||
const quantity = data.quantity; | ||
if (quantity !== undefined) { | ||
@@ -34,0 +28,0 @@ this.quantity = (0, engine_1.setRangeValue)(quantity); |
@@ -8,8 +8,2 @@ import { setRangeValue } from "@tsparticles/engine"; | ||
} | ||
get particles_nb() { | ||
return this.quantity; | ||
} | ||
set particles_nb(value) { | ||
this.quantity = setRangeValue(value); | ||
} | ||
load(data) { | ||
@@ -28,3 +22,3 @@ if (!data) { | ||
} | ||
const quantity = data.quantity ?? data.particles_nb; | ||
const quantity = data.quantity; | ||
if (quantity !== undefined) { | ||
@@ -31,0 +25,0 @@ this.quantity = setRangeValue(quantity); |
{ | ||
"name": "@tsparticles/interaction-external-push", | ||
"version": "3.0.0-beta.4", | ||
"version": "3.0.0-beta.5", | ||
"description": "tsParticles push external interaction", | ||
@@ -90,3 +90,3 @@ "homepage": "https://particles.js.org", | ||
"dependencies": { | ||
"@tsparticles/engine": "^3.0.0-beta.4" | ||
"@tsparticles/engine": "^3.0.0-beta.5" | ||
}, | ||
@@ -93,0 +93,0 @@ "publishConfig": { |
@@ -7,3 +7,3 @@ /*! | ||
* How to use? : Check the GitHub README | ||
* v3.0.0-beta.4 | ||
* v3.0.0-beta.5 | ||
*/ | ||
@@ -109,8 +109,2 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
} | ||
get particles_nb() { | ||
return this.quantity; | ||
} | ||
set particles_nb(value) { | ||
this.quantity = (0,engine_root_window_.setRangeValue)(value); | ||
} | ||
load(data) { | ||
@@ -129,3 +123,3 @@ if (!data) { | ||
} | ||
const quantity = data.quantity ?? data.particles_nb; | ||
const quantity = data.quantity; | ||
if (quantity !== undefined) { | ||
@@ -132,0 +126,0 @@ this.quantity = (0,engine_root_window_.setRangeValue)(quantity); |
/*! For license information please see tsparticles.interaction.external.push.min.js.LICENSE.txt */ | ||
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("@tsparticles/engine"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine"],e);else{var r="object"==typeof exports?e(require("@tsparticles/engine")):e(t.window);for(var o in r)("object"==typeof exports?exports:t)[o]=r[o]}}(this,(t=>(()=>{"use strict";var e={533:e=>{e.exports=t}},r={};function o(t){var s=r[t];if(void 0!==s)return s.exports;var i=r[t]={exports:{}};return e[t](i,i.exports,o),i.exports}o.d=(t,e)=>{for(var r in e)o.o(e,r)&&!o.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var s={};return(()=>{o.r(s),o.d(s,{Push:()=>e,loadExternalPushInteraction:()=>i});var t=o(533);class e{constructor(){this.default=!0,this.groups=[],this.quantity=4}get particles_nb(){return this.quantity}set particles_nb(e){this.quantity=(0,t.setRangeValue)(e)}load(e){if(!e)return;void 0!==e.default&&(this.default=e.default),void 0!==e.groups&&(this.groups=e.groups.map((t=>t))),this.groups.length||(this.default=!0);const r=e.quantity??e.particles_nb;void 0!==r&&(this.quantity=(0,t.setRangeValue)(r))}}class r extends t.ExternalInteractorBase{constructor(e){super(e),this.handleClickMode=e=>{if("push"!==e)return;const r=this.container,o=r.actualOptions.interactivity.modes.push;if(!o)return;const s=(0,t.getRangeValue)(o.quantity);if(s<=0)return;const i=(0,t.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(t,...r){t.push||(t.push=new e);for(const e of r)t.push.load(e?.push)}reset(){}}async function i(t,e=!0){await t.addInteractor("externalPush",(t=>new r(t)),e)}})(),s})())); | ||
!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 +0,1 @@ | ||
/*! tsParticles Push External Interaction v3.0.0-beta.4 by Matteo Bruni */ | ||
/*! tsParticles Push External Interaction v3.0.0-beta.5 by Matteo Bruni */ |
@@ -8,5 +8,3 @@ import { type IOptionLoader, type RangeValue, type RecursivePartial } from "@tsparticles/engine"; | ||
constructor(); | ||
get particles_nb(): RangeValue; | ||
set particles_nb(value: RangeValue); | ||
load(data?: RecursivePartial<IPush>): void; | ||
} |
@@ -5,4 +5,3 @@ import type { RangeValue } from "@tsparticles/engine"; | ||
groups: string[]; | ||
particles_nb: RangeValue; | ||
quantity: RangeValue; | ||
} |
@@ -20,8 +20,2 @@ (function (factory) { | ||
} | ||
get particles_nb() { | ||
return this.quantity; | ||
} | ||
set particles_nb(value) { | ||
this.quantity = (0, engine_1.setRangeValue)(value); | ||
} | ||
load(data) { | ||
@@ -40,3 +34,3 @@ if (!data) { | ||
} | ||
const quantity = data.quantity ?? data.particles_nb; | ||
const quantity = data.quantity; | ||
if (quantity !== undefined) { | ||
@@ -43,0 +37,0 @@ this.quantity = (0, engine_1.setRangeValue)(quantity); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
306325
626