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

@tsparticles/interaction-external-grab

Package Overview
Dependencies
Maintainers
2
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 3.0.0-beta.3 to 3.0.0-beta.4

3

browser/Grabber.js
import { ExternalInteractorBase, getDistance, getLinkColor, getLinkRandomColor, isInArray, mouseMoveEvent, } from "@tsparticles/engine";
import { Grab } from "./Options/Classes/Grab.js";
import { drawGrab } from "./Utils.js";
const grabMode = "grab";
export class Grabber extends ExternalInteractorBase {

@@ -56,3 +57,3 @@ constructor(container) {

const container = this.container, mouse = container.interactivity.mouse, events = (particle?.interactivity ?? container.actualOptions.interactivity).events;
return events.onHover.enable && !!mouse.position && isInArray("grab", events.onHover.mode);
return events.onHover.enable && !!mouse.position && isInArray(grabMode, events.onHover.mode);
}

@@ -59,0 +60,0 @@ loadModeOptions(options, ...sources) {

@@ -7,2 +7,3 @@ "use strict";

const Utils_js_1 = require("./Utils.js");
const grabMode = "grab";
class Grabber extends engine_1.ExternalInteractorBase {

@@ -60,3 +61,3 @@ constructor(container) {

const container = this.container, mouse = container.interactivity.mouse, events = (particle?.interactivity ?? container.actualOptions.interactivity).events;
return events.onHover.enable && !!mouse.position && (0, engine_1.isInArray)("grab", events.onHover.mode);
return events.onHover.enable && !!mouse.position && (0, engine_1.isInArray)(grabMode, events.onHover.mode);
}

@@ -63,0 +64,0 @@ loadModeOptions(options, ...sources) {

import { ExternalInteractorBase, getDistance, getLinkColor, getLinkRandomColor, isInArray, mouseMoveEvent, } from "@tsparticles/engine";
import { Grab } from "./Options/Classes/Grab.js";
import { drawGrab } from "./Utils.js";
const grabMode = "grab";
export class Grabber extends ExternalInteractorBase {

@@ -56,3 +57,3 @@ constructor(container) {

const container = this.container, mouse = container.interactivity.mouse, events = (particle?.interactivity ?? container.actualOptions.interactivity).events;
return events.onHover.enable && !!mouse.position && isInArray("grab", events.onHover.mode);
return events.onHover.enable && !!mouse.position && isInArray(grabMode, events.onHover.mode);
}

@@ -59,0 +60,0 @@ loadModeOptions(options, ...sources) {

{
"name": "@tsparticles/interaction-external-grab",
"version": "3.0.0-beta.3",
"version": "3.0.0-beta.4",
"description": "tsParticles grab external interaction",

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

"canvas-confetti",
"@tsparticles/plugin",
"tsparticles-plugin",
"@tsparticles/interaction"

@@ -91,3 +91,3 @@ ],

"dependencies": {
"@tsparticles/engine": "^3.0.0-beta.3"
"@tsparticles/engine": "^3.0.0-beta.4"
},

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

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

* How to use? : Check the GitHub README
* v3.0.0-beta.3
* v3.0.0-beta.4
*/

@@ -175,2 +175,3 @@ (function webpackUniversalModuleDefinition(root, factory) {

const grabMode = "grab";
class Grabber extends engine_root_window_.ExternalInteractorBase {

@@ -233,3 +234,3 @@ constructor(container) {

events = (particle?.interactivity ?? container.actualOptions.interactivity).events;
return events.onHover.enable && !!mouse.position && (0,engine_root_window_.isInArray)("grab", events.onHover.mode);
return events.onHover.enable && !!mouse.position && (0,engine_root_window_.isInArray)(grabMode, events.onHover.mode);
}

@@ -236,0 +237,0 @@ loadModeOptions(options, ...sources) {

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

/*! tsParticles Grab External Interaction v3.0.0-beta.3 by Matteo Bruni */
/*! tsParticles Grab External Interaction v3.0.0-beta.4 by Matteo Bruni */

@@ -16,2 +16,3 @@ (function (factory) {

const Utils_js_1 = require("./Utils.js");
const grabMode = "grab";
class Grabber extends engine_1.ExternalInteractorBase {

@@ -69,3 +70,3 @@ constructor(container) {

const container = this.container, mouse = container.interactivity.mouse, events = (particle?.interactivity ?? container.actualOptions.interactivity).events;
return events.onHover.enable && !!mouse.position && (0, engine_1.isInArray)("grab", events.onHover.mode);
return events.onHover.enable && !!mouse.position && (0, engine_1.isInArray)(grabMode, events.onHover.mode);
}

@@ -72,0 +73,0 @@ loadModeOptions(options, ...sources) {

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