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.0 to 3.0.0-beta.1

browser/package.json

4

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

@@ -5,0 +5,0 @@ constructor(container) {

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

import { Grabber } from "./Grabber";
import { Grabber } from "./Grabber.js";
export async function loadExternalGrabInteraction(engine, refresh = true) {
await engine.addInteractor("externalGrab", (container) => new Grabber(container), refresh);
}
export * from "./Options/Classes/Grab";
export * from "./Options/Classes/GrabLinks";
export * from "./Options/Interfaces/IGrab";
export * from "./Options/Interfaces/IGrabLinks";
export * from "./Options/Classes/Grab.js";
export * from "./Options/Classes/GrabLinks.js";
export * from "./Options/Interfaces/IGrab.js";
export * from "./Options/Interfaces/IGrabLinks.js";

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

import { GrabLinks } from "./GrabLinks";
import { GrabLinks } from "./GrabLinks.js";
export class Grab {

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

@@ -5,4 +5,4 @@ "use strict";

const engine_1 = require("@tsparticles/engine");
const Grab_1 = require("./Options/Classes/Grab");
const Utils_1 = require("./Utils");
const Grab_js_1 = require("./Options/Classes/Grab.js");
const Utils_js_1 = require("./Utils.js");
class Grabber extends engine_1.ExternalInteractorBase {

@@ -55,3 +55,3 @@ constructor(container) {

}
(0, Utils_1.drawGrab)(container, particle, colorLine, opacityLine, mousePos);
(0, Utils_js_1.drawGrab)(container, particle, colorLine, opacityLine, mousePos);
}

@@ -65,3 +65,3 @@ }

if (!options.grab) {
options.grab = new Grab_1.Grab();
options.grab = new Grab_js_1.Grab();
}

@@ -68,0 +68,0 @@ for (const source of sources) {

@@ -18,10 +18,10 @@ "use strict";

exports.loadExternalGrabInteraction = void 0;
const Grabber_1 = require("./Grabber");
const Grabber_js_1 = require("./Grabber.js");
async function loadExternalGrabInteraction(engine, refresh = true) {
await engine.addInteractor("externalGrab", (container) => new Grabber_1.Grabber(container), refresh);
await engine.addInteractor("externalGrab", (container) => new Grabber_js_1.Grabber(container), refresh);
}
exports.loadExternalGrabInteraction = loadExternalGrabInteraction;
__exportStar(require("./Options/Classes/Grab"), exports);
__exportStar(require("./Options/Classes/GrabLinks"), exports);
__exportStar(require("./Options/Interfaces/IGrab"), exports);
__exportStar(require("./Options/Interfaces/IGrabLinks"), exports);
__exportStar(require("./Options/Classes/Grab.js"), exports);
__exportStar(require("./Options/Classes/GrabLinks.js"), exports);
__exportStar(require("./Options/Interfaces/IGrab.js"), exports);
__exportStar(require("./Options/Interfaces/IGrabLinks.js"), exports);
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Grab = void 0;
const GrabLinks_1 = require("./GrabLinks");
const GrabLinks_js_1 = require("./GrabLinks.js");
class Grab {
constructor() {
this.distance = 100;
this.links = new GrabLinks_1.GrabLinks();
this.links = new GrabLinks_js_1.GrabLinks();
}

@@ -10,0 +10,0 @@ get lineLinked() {

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

@@ -5,0 +5,0 @@ constructor(container) {

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

import { Grabber } from "./Grabber";
import { Grabber } from "./Grabber.js";
export async function loadExternalGrabInteraction(engine, refresh = true) {
await engine.addInteractor("externalGrab", (container) => new Grabber(container), refresh);
}
export * from "./Options/Classes/Grab";
export * from "./Options/Classes/GrabLinks";
export * from "./Options/Interfaces/IGrab";
export * from "./Options/Interfaces/IGrabLinks";
export * from "./Options/Classes/Grab.js";
export * from "./Options/Classes/GrabLinks.js";
export * from "./Options/Interfaces/IGrab.js";
export * from "./Options/Interfaces/IGrabLinks.js";

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

import { GrabLinks } from "./GrabLinks";
import { GrabLinks } from "./GrabLinks.js";
export class Grab {

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

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

@@ -71,10 +71,22 @@ "homepage": "https://particles.js.org",

},
"main": "cjs/index.js",
"sideEffects": false,
"jsdelivr": "tsparticles.interaction.external.grab.min.js",
"unpkg": "tsparticles.interaction.external.grab.min.js",
"browser": "browser/index.js",
"main": "cjs/index.js",
"module": "esm/index.js",
"types": "types/index.d.ts",
"sideEffects": false,
"exports": {
".": {
"types": "./types/index.d.ts",
"browser": "./browser/index.js",
"import": "./esm/index.js",
"require": "./cjs/index.js",
"umd": "./umd/index.js",
"default": "./cjs/index.js"
},
"./package.json": "./package.json"
},
"dependencies": {
"@tsparticles/engine": "^3.0.0-beta.0"
"@tsparticles/engine": "^3.0.0-beta.1"
},

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

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

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

@@ -10,0 +10,0 @@ (function webpackUniversalModuleDefinition(root, factory) {

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

/*! tsParticles Grab External Interaction v3.0.0-beta.0 by Matteo Bruni */
/*! tsParticles Grab External Interaction v3.0.0-beta.1 by Matteo Bruni */
import { ExternalInteractorBase, type IModes, type Modes, type Particle, type RecursivePartial } from "@tsparticles/engine";
import type { GrabContainer, GrabMode, IGrabMode } from "./Types";
import type { GrabContainer, GrabMode, IGrabMode } from "./Types.js";
export declare class Grabber extends ExternalInteractorBase<GrabContainer> {

@@ -4,0 +4,0 @@ constructor(container: GrabContainer);

import type { Engine } from "@tsparticles/engine";
export declare function loadExternalGrabInteraction(engine: Engine, refresh?: boolean): Promise<void>;
export * from "./Options/Classes/Grab";
export * from "./Options/Classes/GrabLinks";
export * from "./Options/Interfaces/IGrab";
export * from "./Options/Interfaces/IGrabLinks";
export * from "./Options/Classes/Grab.js";
export * from "./Options/Classes/GrabLinks.js";
export * from "./Options/Interfaces/IGrab.js";
export * from "./Options/Interfaces/IGrabLinks.js";
import type { IOptionLoader, RecursivePartial } from "@tsparticles/engine";
import { GrabLinks } from "./GrabLinks";
import type { IGrab } from "../Interfaces/IGrab";
import { GrabLinks } from "./GrabLinks.js";
import type { IGrab } from "../Interfaces/IGrab.js";
export declare class Grab implements IGrab, IOptionLoader<IGrab> {

@@ -5,0 +5,0 @@ distance: number;

import { type IOptionLoader, OptionsColor, type RecursivePartial } from "@tsparticles/engine";
import type { IGrabLinks } from "../Interfaces/IGrabLinks";
import type { IGrabLinks } from "../Interfaces/IGrabLinks.js";
export declare class GrabLinks implements IGrabLinks, IOptionLoader<IGrabLinks> {

@@ -4,0 +4,0 @@ blink: boolean;

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

import type { GrabMode } from "../../Types";
import type { GrabMode } from "../../Types.js";
import type { Options } from "@tsparticles/engine";

@@ -3,0 +3,0 @@ export type GrabOptions = Options & {

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

import type { IGrabLinks } from "./IGrabLinks";
import type { IGrabLinks } from "./IGrabLinks.js";
export interface IGrab {

@@ -3,0 +3,0 @@ distance: number;

import type { Container, IRgb, OptionsColor, Particle } from "@tsparticles/engine";
import type { Grab } from "./Options/Classes/Grab";
import type { GrabOptions } from "./Options/Classes/GrabOptions";
import type { IGrab } from "./Options/Interfaces/IGrab";
import type { Grab } from "./Options/Classes/Grab.js";
import type { GrabOptions } from "./Options/Classes/GrabOptions.js";
import type { IGrab } from "./Options/Interfaces/IGrab.js";
export type IGrabMode = {

@@ -6,0 +6,0 @@ grab: IGrab;

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

import type { GrabContainer, LinkParticle } from "./Types";
import type { GrabContainer, LinkParticle } from "./Types.js";
import { type ICoordinates, type IRgb } from "@tsparticles/engine";
export declare function drawGrabLine(context: CanvasRenderingContext2D, width: number, begin: ICoordinates, end: ICoordinates, colorLine: IRgb, opacity: number): void;
export declare function drawGrab(container: GrabContainer, particle: LinkParticle, lineColor: IRgb, opacity: number, mousePos: ICoordinates): void;

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

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

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

const engine_1 = require("@tsparticles/engine");
const Grab_1 = require("./Options/Classes/Grab");
const Utils_1 = require("./Utils");
const Grab_js_1 = require("./Options/Classes/Grab.js");
const Utils_js_1 = require("./Utils.js");
class Grabber extends engine_1.ExternalInteractorBase {

@@ -65,3 +65,3 @@ constructor(container) {

}
(0, Utils_1.drawGrab)(container, particle, colorLine, opacityLine, mousePos);
(0, Utils_js_1.drawGrab)(container, particle, colorLine, opacityLine, mousePos);
}

@@ -75,3 +75,3 @@ }

if (!options.grab) {
options.grab = new Grab_1.Grab();
options.grab = new Grab_js_1.Grab();
}

@@ -78,0 +78,0 @@ for (const source of sources) {

@@ -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", "./Grabber", "./Options/Classes/Grab", "./Options/Classes/GrabLinks", "./Options/Interfaces/IGrab", "./Options/Interfaces/IGrabLinks"], factory);
define(["require", "exports", "./Grabber.js", "./Options/Classes/Grab.js", "./Options/Classes/GrabLinks.js", "./Options/Interfaces/IGrab.js", "./Options/Interfaces/IGrabLinks.js"], factory);
}

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

exports.loadExternalGrabInteraction = void 0;
const Grabber_1 = require("./Grabber");
const Grabber_js_1 = require("./Grabber.js");
async function loadExternalGrabInteraction(engine, refresh = true) {
await engine.addInteractor("externalGrab", (container) => new Grabber_1.Grabber(container), refresh);
await engine.addInteractor("externalGrab", (container) => new Grabber_js_1.Grabber(container), refresh);
}
exports.loadExternalGrabInteraction = loadExternalGrabInteraction;
__exportStar(require("./Options/Classes/Grab"), exports);
__exportStar(require("./Options/Classes/GrabLinks"), exports);
__exportStar(require("./Options/Interfaces/IGrab"), exports);
__exportStar(require("./Options/Interfaces/IGrabLinks"), exports);
__exportStar(require("./Options/Classes/Grab.js"), exports);
__exportStar(require("./Options/Classes/GrabLinks.js"), exports);
__exportStar(require("./Options/Interfaces/IGrab.js"), exports);
__exportStar(require("./Options/Interfaces/IGrabLinks.js"), exports);
});

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

else if (typeof define === "function" && define.amd) {
define(["require", "exports", "./GrabLinks"], factory);
define(["require", "exports", "./GrabLinks.js"], factory);
}

@@ -14,7 +14,7 @@ })(function (require, exports) {

exports.Grab = void 0;
const GrabLinks_1 = require("./GrabLinks");
const GrabLinks_js_1 = require("./GrabLinks.js");
class Grab {
constructor() {
this.distance = 100;
this.links = new GrabLinks_1.GrabLinks();
this.links = new GrabLinks_js_1.GrabLinks();
}

@@ -21,0 +21,0 @@ get lineLinked() {

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