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) 828 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Rotate = void 0; const RotateAnimation_1 = require("./RotateAnimation"); const ValueWithRandom_1 = require("../../ValueWithRandom"); class Rotate extends ValueWithRandom_1.ValueWithRandom { constructor() { super(); this.animation = new RotateAnimation_1.RotateAnimation(); this.direction = "clockwise"; this.path = false; this.value = 0; } load(data) { if (!data) { return; } super.load(data); if (data.direction !== undefined) { this.direction = data.direction; } this.animation.load(data.animation); if (data.path !== undefined) { this.path = data.path; } } } exports.Rotate = Rotate;