@tsparticles/interaction-particles-repulse
TypeScript icon, indicating that this package has built-in type declarations

3.6.0 • Public • Published

banner

tsParticles Particles Repulsion Interaction

jsDelivr npmjs npmjs GitHub Sponsors

tsParticles interaction plugin for repulse effect between particles.

How to use it

CDN / Vanilla JS / jQuery

The CDN/Vanilla version JS has one required file in vanilla configuration:

Including the tsparticles.interaction.particles.repulse.min.js file will export the function to load the interaction plugin:

loadParticlesRepulseInteraction

Usage

Once the scripts are loaded you can set up tsParticles and the interaction plugin like this:

(async () => {
  await loadParticlesRepulseInteraction(tsParticles);

  await tsParticles.load({
    id: "tsparticles",
    options: {
      /* options */
    },
  });
})();

ESM / CommonJS

This package is compatible also with ES or CommonJS modules, firstly this needs to be installed, like this:

$ npm install @tsparticles/interaction-particles-repulse

or

$ yarn add @tsparticles/interaction-particles-repulse

Then you need to import it in the app, like this:

const { tsParticles } = require("@tsparticles/engine");
const { loadParticlesRepulseInteraction } = require("@tsparticles/interaction-particles-repulse");

(async () => {
  await loadParticlesRepulseInteraction(tsParticles);
})();

or

import { tsParticles } from "@tsparticles/engine";
import { loadParticlesRepulseInteraction } from "@tsparticles/interaction-particles-repulse";

(async () => {
  await loadParticlesRepulseInteraction(tsParticles);
})();

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
3.6.0561latest
3.0.221next
3.6.0-beta.12beta
3.0.0-alpha.12alpha

Version History

VersionDownloads (Last 7 Days)Published
3.6.0561
3.6.0-beta.12
3.6.0-beta.02
3.5.01,272
3.4.080
3.3.0107
3.2.22
3.1.030
3.0.310
3.0.221
3.0.11
3.0.02
3.0.0-beta.52
3.0.0-beta.42
3.0.0-beta.32
3.0.0-beta.22
3.0.0-beta.12
3.0.0-beta.02
3.0.0-alpha.12
3.0.0-alpha.02

Package Sidebar

Install

npm i @tsparticles/interaction-particles-repulse

Weekly Downloads

2,125

Version

3.6.0

License

MIT

Unpacked Size

314 kB

Total Files

35

Last publish

Collaborators

  • matteobruni
  • ar3s