Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tsparticles/interaction-external-push

Package Overview
Dependencies
Maintainers
0
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tsparticles/interaction-external-push - npm Package Compare versions

Comparing version 3.6.0-beta.1 to 3.6.0

4

browser/Options/Classes/Push.js

@@ -1,2 +0,2 @@

import { setRangeValue } from "@tsparticles/engine";
import { isNull, setRangeValue } from "@tsparticles/engine";
export class Push {

@@ -9,3 +9,3 @@ constructor() {

load(data) {
if (!data) {
if (isNull(data)) {
return;

@@ -12,0 +12,0 @@ }

@@ -12,3 +12,3 @@ "use strict";

load(data) {
if (!data) {
if ((0, engine_1.isNull)(data)) {
return;

@@ -15,0 +15,0 @@ }

@@ -1,2 +0,2 @@

import { setRangeValue } from "@tsparticles/engine";
import { isNull, setRangeValue } from "@tsparticles/engine";
export class Push {

@@ -9,3 +9,3 @@ constructor() {

load(data) {
if (!data) {
if (isNull(data)) {
return;

@@ -12,0 +12,0 @@ }

{
"name": "@tsparticles/interaction-external-push",
"version": "3.6.0-beta.1",
"version": "3.6.0",
"description": "tsParticles push external interaction",

@@ -90,3 +90,3 @@ "homepage": "https://particles.js.org",

"dependencies": {
"@tsparticles/engine": "^3.6.0-beta.1"
"@tsparticles/engine": "^3.6.0"
},

@@ -93,0 +93,0 @@ "publishConfig": {

@@ -7,3 +7,3 @@ /*!

* How to use? : Check the GitHub README
* v3.6.0-beta.1
* v3.6.0
*/

@@ -38,3 +38,3 @@ /*

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Push: () => (/* binding */ Push)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n\nclass Push {\n constructor() {\n this.default = true;\n this.groups = [];\n this.quantity = 4;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.default !== undefined) {\n this.default = data.default;\n }\n if (data.groups !== undefined) {\n this.groups = data.groups.map(t => t);\n }\n if (!this.groups.length) {\n this.default = true;\n }\n const quantity = data.quantity;\n if (quantity !== undefined) {\n this.quantity = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(quantity);\n }\n }\n}\n\n//# sourceURL=webpack://@tsparticles/interaction-external-push/./dist/browser/Options/Classes/Push.js?");
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Push: () => (/* binding */ Push)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n\nclass Push {\n constructor() {\n this.default = true;\n this.groups = [];\n this.quantity = 4;\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n if (data.default !== undefined) {\n this.default = data.default;\n }\n if (data.groups !== undefined) {\n this.groups = data.groups.map(t => t);\n }\n if (!this.groups.length) {\n this.default = true;\n }\n const quantity = data.quantity;\n if (quantity !== undefined) {\n this.quantity = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(quantity);\n }\n }\n}\n\n//# sourceURL=webpack://@tsparticles/interaction-external-push/./dist/browser/Options/Classes/Push.js?");

@@ -41,0 +41,0 @@ /***/ }),

/*! For license information please see tsparticles.interaction.external.push.min.js.LICENSE.txt */
!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=>(()=>{var t={303: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={};o.r(s),o.d(s,{Push:()=>n,loadExternalPushInteraction:()=>u});var i=o(303);class n{constructor(){this.default=!0,this.groups=[],this.quantity=4}load(e){if(!e)return;void 0!==e.default&&(this.default=e.default),void 0!==e.groups&&(this.groups=e.groups.map((e=>e))),this.groups.length||(this.default=!0);const t=e.quantity;void 0!==t&&(this.quantity=(0,i.setRangeValue)(t))}}class a extends i.ExternalInteractorBase{constructor(e){super(e),this.handleClickMode=e=>{if("push"!==e)return;const t=this.container,r=t.actualOptions.interactivity.modes.push;if(!r)return;const o=(0,i.getRangeValue)(r.quantity);if(o<=0)return;const s=(0,i.itemFromArray)([void 0,...r.groups]),n=void 0!==s?t.actualOptions.particles.groups[s]:void 0;t.particles.push(o,t.interactivity.mouse,n,s)}}clear(){}init(){}interact(){}isEnabled(){return!0}loadModeOptions(e,...t){e.push||(e.push=new n);for(const r of t)e.push.load(r?.push)}reset(){}}async function u(e,t=!0){await e.addInteractor("externalPush",(e=>Promise.resolve(new a(e))),t)}return 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=>(()=>{var t={303: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={};o.r(s),o.d(s,{Push:()=>n,loadExternalPushInteraction:()=>u});var i=o(303);class n{constructor(){this.default=!0,this.groups=[],this.quantity=4}load(e){if((0,i.isNull)(e))return;void 0!==e.default&&(this.default=e.default),void 0!==e.groups&&(this.groups=e.groups.map((e=>e))),this.groups.length||(this.default=!0);const t=e.quantity;void 0!==t&&(this.quantity=(0,i.setRangeValue)(t))}}class a extends i.ExternalInteractorBase{constructor(e){super(e),this.handleClickMode=e=>{if("push"!==e)return;const t=this.container,r=t.actualOptions.interactivity.modes.push;if(!r)return;const o=(0,i.getRangeValue)(r.quantity);if(o<=0)return;const s=(0,i.itemFromArray)([void 0,...r.groups]),n=void 0!==s?t.actualOptions.particles.groups[s]:void 0;t.particles.push(o,t.interactivity.mouse,n,s)}}clear(){}init(){}interact(){}isEnabled(){return!0}loadModeOptions(e,...t){e.push||(e.push=new n);for(const r of t)e.push.load(r?.push)}reset(){}}async function u(e,t=!0){await e.addInteractor("externalPush",(e=>Promise.resolve(new a(e))),t)}return s})()));

@@ -1,1 +0,1 @@

/*! tsParticles Push External Interaction v3.6.0-beta.1 by Matteo Bruni */
/*! tsParticles Push External Interaction v3.6.0 by Matteo Bruni */

@@ -21,3 +21,3 @@ (function (factory) {

load(data) {
if (!data) {
if ((0, engine_1.isNull)(data)) {
return;

@@ -24,0 +24,0 @@ }

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc