UNPKG

tsparticles

Version:

Porting of the abandoned Vincent Garreau's particles.js, converted in TypeScript. Added many new cool features and various bug fixes.

30 lines (29 loc) 890 B
import { Bubble } from "./Bubble"; import { Connect } from "./Connect"; import { Grab } from "./Grab"; import { Remove } from "./Remove"; import { Push } from "./Push"; import { Repulse } from "./Repulse"; import { Slow } from "./Slow"; export class Modes { constructor() { this.bubble = new Bubble(); this.connect = new Connect(); this.grab = new Grab(); this.push = new Push(); this.remove = new Remove(); this.repulse = new Repulse(); this.slow = new Slow(); } load(data) { if (data !== undefined) { this.bubble.load(data.bubble); this.connect.load(data.connect); this.grab.load(data.grab); this.push.load(data.push); this.remove.load(data.remove); this.repulse.load(data.repulse); this.slow.load(data.slow); } } }