New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@tsparticles/interaction-external-bounce

Package Overview
Dependencies
Maintainers
0
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 3.6.0 to 3.7.0

2

browser/index.js

@@ -0,3 +1,5 @@

import { assertValidVersion } from "@tsparticles/engine";
import { Bouncer } from "./Bouncer.js";
export async function loadExternalBounceInteraction(engine, refresh = true) {
assertValidVersion(engine, "3.7.0");
await engine.addInteractor("externalBounce", container => {

@@ -4,0 +6,0 @@ return Promise.resolve(new Bouncer(container));

@@ -18,4 +18,6 @@ "use strict";

exports.loadExternalBounceInteraction = loadExternalBounceInteraction;
const engine_1 = require("@tsparticles/engine");
const Bouncer_js_1 = require("./Bouncer.js");
async function loadExternalBounceInteraction(engine, refresh = true) {
(0, engine_1.assertValidVersion)(engine, "3.7.0");
await engine.addInteractor("externalBounce", container => {

@@ -22,0 +24,0 @@ return Promise.resolve(new Bouncer_js_1.Bouncer(container));

@@ -0,3 +1,5 @@

import { assertValidVersion } from "@tsparticles/engine";
import { Bouncer } from "./Bouncer.js";
export async function loadExternalBounceInteraction(engine, refresh = true) {
assertValidVersion(engine, "3.7.0");
await engine.addInteractor("externalBounce", container => {

@@ -4,0 +6,0 @@ return Promise.resolve(new Bouncer(container));

4

package.json
{
"name": "@tsparticles/interaction-external-bounce",
"version": "3.6.0",
"version": "3.7.0",
"description": "tsParticles bounce external interaction",

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

"dependencies": {
"@tsparticles/engine": "^3.6.0"
"@tsparticles/engine": "3.7.0"
},

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

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

* How to use? : Check the GitHub README
* v3.6.0
* v3.7.0
*/

@@ -68,3 +68,3 @@ /*

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Bounce: () => (/* reexport safe */ _Options_Classes_Bounce_js__WEBPACK_IMPORTED_MODULE_1__.Bounce),\n/* harmony export */ loadExternalBounceInteraction: () => (/* binding */ loadExternalBounceInteraction)\n/* harmony export */ });\n/* harmony import */ var _Bouncer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Bouncer.js */ \"./dist/browser/Bouncer.js\");\n/* harmony import */ var _Options_Classes_Bounce_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Options/Classes/Bounce.js */ \"./dist/browser/Options/Classes/Bounce.js\");\n\nasync function loadExternalBounceInteraction(engine, refresh = true) {\n await engine.addInteractor(\"externalBounce\", container => {\n return Promise.resolve(new _Bouncer_js__WEBPACK_IMPORTED_MODULE_0__.Bouncer(container));\n }, refresh);\n}\n\n\n\n//# sourceURL=webpack://@tsparticles/interaction-external-bounce/./dist/browser/index.js?");
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Bounce: () => (/* reexport safe */ _Options_Classes_Bounce_js__WEBPACK_IMPORTED_MODULE_2__.Bounce),\n/* harmony export */ loadExternalBounceInteraction: () => (/* binding */ loadExternalBounceInteraction)\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/* harmony import */ var _Bouncer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Bouncer.js */ \"./dist/browser/Bouncer.js\");\n/* harmony import */ var _Options_Classes_Bounce_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Options/Classes/Bounce.js */ \"./dist/browser/Options/Classes/Bounce.js\");\n\n\nasync function loadExternalBounceInteraction(engine, refresh = true) {\n (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.assertValidVersion)(engine, \"3.7.0\");\n await engine.addInteractor(\"externalBounce\", container => {\n return Promise.resolve(new _Bouncer_js__WEBPACK_IMPORTED_MODULE_1__.Bouncer(container));\n }, refresh);\n}\n\n\n\n//# sourceURL=webpack://@tsparticles/interaction-external-bounce/./dist/browser/index.js?");

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

/*! For license information please see tsparticles.interaction.external.bounce.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 o="object"==typeof exports?t(require("@tsparticles/engine")):t(e.window);for(var n in o)("object"==typeof exports?exports:e)[n]=o[n]}}(this,(e=>(()=>{var t={303:t=>{t.exports=e}},o={};function n(e){var i=o[e];if(void 0!==i)return i.exports;var r=o[e]={exports:{}};return t[e](r,r.exports,n),r.exports}n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};n.r(i),n.d(i,{Bounce:()=>p,loadExternalBounceInteraction:()=>b});var r=n(303);const c=2,s=.5,a=Math.PI*s,l=2,u=10;function f(e,t,o,n,i){const s=e.particles.quadTree.query(n,i);for(const e of s)n instanceof r.Circle?(0,r.circleBounce)((0,r.circleBounceDataFromParticle)(e),{position:t,radius:o,mass:o**c*a,velocity:r.Vector.origin,factor:r.Vector.origin}):n instanceof r.Rectangle&&(0,r.rectBounce)(e,(0,r.calculateBounds)(t,o))}function d(e,t,o,n){(0,r.divModeExecute)(o,t,((t,o)=>function(e,t,o,n){const i=document.querySelectorAll(t);i.length&&i.forEach((t=>{const i=t,c=e.retina.pixelRatio,a={x:(i.offsetLeft+i.offsetWidth*s)*c,y:(i.offsetTop+i.offsetHeight*s)*c},f=i.offsetWidth*s*c,d=u*c,p=o.type===r.DivType.circle?new r.Circle(a.x,a.y,f+d):new r.Rectangle(i.offsetLeft*c-d,i.offsetTop*c-d,i.offsetWidth*c+d*l,i.offsetHeight*c+d*l);n(a,f,p)}))}(e,t,o,((t,o,i)=>f(e,t,o,i,n)))))}class p{constructor(){this.distance=200}load(e){(0,r.isNull)(e)||void 0!==e.distance&&(this.distance=e.distance)}}const v="bounce";class y extends r.ExternalInteractorBase{constructor(e){super(e)}clear(){}init(){const e=this.container,t=e.actualOptions.interactivity.modes.bounce;t&&(e.retina.bounceModeDistance=t.distance*e.retina.pixelRatio)}interact(){const e=this.container,t=e.actualOptions.interactivity.events,o=e.interactivity.status===r.mouseMoveEvent,n=t.onHover.enable,i=t.onHover.mode,c=t.onDiv;o&&n&&(0,r.isInArray)(v,i)?function(e,t){const o=e.retina.pixelRatio,n=u*o,i=e.interactivity.mouse.position,c=e.retina.bounceModeDistance;!c||c<0||!i||f(e,i,c,new r.Circle(i.x,i.y,c+n),t)}(this.container,(e=>this.isEnabled(e))):d(this.container,c,v,(e=>this.isEnabled(e)))}isEnabled(e){const t=this.container,o=t.actualOptions,n=t.interactivity.mouse,i=(e?.interactivity??o.interactivity).events,c=i.onDiv;return!!n.position&&i.onHover.enable&&(0,r.isInArray)(v,i.onHover.mode)||(0,r.isDivModeEnabled)(v,c)}loadModeOptions(e,...t){e.bounce||(e.bounce=new p);for(const o of t)e.bounce.load(o?.bounce)}reset(){}}async function b(e,t=!0){await e.addInteractor("externalBounce",(e=>Promise.resolve(new y(e))),t)}return i})()));
!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 o="object"==typeof exports?t(require("@tsparticles/engine")):t(e.window);for(var n in o)("object"==typeof exports?exports:e)[n]=o[n]}}(this,(e=>(()=>{var t={303:t=>{t.exports=e}},o={};function n(e){var i=o[e];if(void 0!==i)return i.exports;var r=o[e]={exports:{}};return t[e](r,r.exports,n),r.exports}n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};n.r(i),n.d(i,{Bounce:()=>p,loadExternalBounceInteraction:()=>b});var r=n(303);const c=2,s=.5,a=Math.PI*s,l=2,u=10;function f(e,t,o,n,i){const s=e.particles.quadTree.query(n,i);for(const e of s)n instanceof r.Circle?(0,r.circleBounce)((0,r.circleBounceDataFromParticle)(e),{position:t,radius:o,mass:o**c*a,velocity:r.Vector.origin,factor:r.Vector.origin}):n instanceof r.Rectangle&&(0,r.rectBounce)(e,(0,r.calculateBounds)(t,o))}function d(e,t,o,n){(0,r.divModeExecute)(o,t,((t,o)=>function(e,t,o,n){const i=document.querySelectorAll(t);i.length&&i.forEach((t=>{const i=t,c=e.retina.pixelRatio,a={x:(i.offsetLeft+i.offsetWidth*s)*c,y:(i.offsetTop+i.offsetHeight*s)*c},f=i.offsetWidth*s*c,d=u*c,p=o.type===r.DivType.circle?new r.Circle(a.x,a.y,f+d):new r.Rectangle(i.offsetLeft*c-d,i.offsetTop*c-d,i.offsetWidth*c+d*l,i.offsetHeight*c+d*l);n(a,f,p)}))}(e,t,o,((t,o,i)=>f(e,t,o,i,n)))))}class p{constructor(){this.distance=200}load(e){(0,r.isNull)(e)||void 0!==e.distance&&(this.distance=e.distance)}}const v="bounce";class y extends r.ExternalInteractorBase{constructor(e){super(e)}clear(){}init(){const e=this.container,t=e.actualOptions.interactivity.modes.bounce;t&&(e.retina.bounceModeDistance=t.distance*e.retina.pixelRatio)}interact(){const e=this.container,t=e.actualOptions.interactivity.events,o=e.interactivity.status===r.mouseMoveEvent,n=t.onHover.enable,i=t.onHover.mode,c=t.onDiv;o&&n&&(0,r.isInArray)(v,i)?function(e,t){const o=e.retina.pixelRatio,n=u*o,i=e.interactivity.mouse.position,c=e.retina.bounceModeDistance;!c||c<0||!i||f(e,i,c,new r.Circle(i.x,i.y,c+n),t)}(this.container,(e=>this.isEnabled(e))):d(this.container,c,v,(e=>this.isEnabled(e)))}isEnabled(e){const t=this.container,o=t.actualOptions,n=t.interactivity.mouse,i=(e?.interactivity??o.interactivity).events,c=i.onDiv;return!!n.position&&i.onHover.enable&&(0,r.isInArray)(v,i.onHover.mode)||(0,r.isDivModeEnabled)(v,c)}loadModeOptions(e,...t){e.bounce||(e.bounce=new p);for(const o of t)e.bounce.load(o?.bounce)}reset(){}}async function b(e,t=!0){(0,r.assertValidVersion)(e,"3.7.0"),await e.addInteractor("externalBounce",(e=>Promise.resolve(new y(e))),t)}return i})()));

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

/*! tsParticles Bounce External Interaction v3.6.0 by Matteo Bruni */
/*! tsParticles Bounce External Interaction v3.7.0 by Matteo Bruni */

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

import type { Engine } from "@tsparticles/engine";
import { type Engine } from "@tsparticles/engine";
export declare function loadExternalBounceInteraction(engine: Engine, refresh?: boolean): Promise<void>;
export * from "./Options/Classes/Bounce.js";
export * from "./Options/Interfaces/IBounce.js";

@@ -21,3 +21,3 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {

else if (typeof define === "function" && define.amd) {
define(["require", "exports", "./Bouncer.js", "./Options/Classes/Bounce.js", "./Options/Interfaces/IBounce.js"], factory);
define(["require", "exports", "@tsparticles/engine", "./Bouncer.js", "./Options/Classes/Bounce.js", "./Options/Interfaces/IBounce.js"], factory);
}

@@ -28,4 +28,6 @@ })(function (require, exports) {

exports.loadExternalBounceInteraction = loadExternalBounceInteraction;
const engine_1 = require("@tsparticles/engine");
const Bouncer_js_1 = require("./Bouncer.js");
async function loadExternalBounceInteraction(engine, refresh = true) {
(0, engine_1.assertValidVersion)(engine, "3.7.0");
await engine.addInteractor("externalBounce", container => {

@@ -32,0 +34,0 @@ return Promise.resolve(new Bouncer_js_1.Bouncer(container));

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