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.

29 lines (28 loc) 820 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Tilt = void 0; const TiltAnimation_1 = require("./TiltAnimation"); const ValueWithRandom_1 = require("../../ValueWithRandom"); class Tilt extends ValueWithRandom_1.ValueWithRandom { constructor() { super(); this.animation = new TiltAnimation_1.TiltAnimation(); this.direction = "clockwise"; this.enable = false; this.value = 0; } load(data) { if (!data) { return; } super.load(data); this.animation.load(data.animation); if (data.direction !== undefined) { this.direction = data.direction; } if (data.enable !== undefined) { this.enable = data.enable; } } } exports.Tilt = Tilt;