UNPKG

tsparticles

Version:

Easily create highly customizable particle, confetti and fireworks animations and use them as animated backgrounds for your website. Ready to use components available also for React, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Riot.js, Inferno.

28 lines (27 loc) 805 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Collisions = void 0; const Bounce_1 = require("../Bounce/Bounce"); const CollisionsOverlap_1 = require("./CollisionsOverlap"); class Collisions { constructor() { this.bounce = new Bounce_1.Bounce(); this.enable = false; this.mode = "bounce"; this.overlap = new CollisionsOverlap_1.CollisionsOverlap(); } load(data) { if (data === undefined) { return; } this.bounce.load(data.bounce); if (data.enable !== undefined) { this.enable = data.enable; } if (data.mode !== undefined) { this.mode = data.mode; } this.overlap.load(data.overlap); } } exports.Collisions = Collisions;