UNPKG

tsparticles

Version:

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

21 lines (20 loc) 501 B
export class Parallax { constructor() { this.enable = false; this.force = 2; this.smooth = 10; } load(data) { if (data !== undefined) { if (data.enable !== undefined) { this.enable = data.enable; } if (data.force !== undefined) { this.force = data.force; } if (data.smooth !== undefined) { this.smooth = data.smooth; } } } }